Access to resources is controlled by Protection Spaces which are added to the top-level Protection Spaces object. Two kinds of protection spaces are available:
A SimpleUserProtectionSpace has all of HostProtectionSpace's functionality and you can also provide a list of users and passwords for authentication.