# NSURLProtectionSpace class documentation

Software documentation for the NSURLProtectionSpace class
Foundation/NSURLProtectionSpace.h
NSCopying
Class to encapsulate a protection space... where authentication is required.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
authenticationMethod
Returns the authentication method used for this protection space.
host
Returns the host (or proxy host) set in the receiver.
initWithHost:
host
port:
port
protocol:
protocol
realm:
realm
authenticationMethod:
authenticationMethod
Initialises the receiver with host, port, and protocol identifying the protection space. For some protocols the realm identifies a space within the host, for others it may be `nil`.
initWithProxyHost:
host
port:
port
type:
type
realm:
realm
authenticationMethod:
authenticationMethod
This is like -initWithHost:port:protocol:realm:authenticationMethod: except that it uses a proxy host and proxy type rather than an actual host and a protocol.
isProxy
Returns a flag to indicate whether this protection space is on a proxy server or not.
port
Returns the port set for this receiver or zero if none was set.
protocol
Returns the protocol of the receiver or `nil` if it is a proxy.
proxyType
Returns the proxy type set for the receiver or `nil` if it's not a proxy.
realm
Returns the realm (or `nil`) which was set in the receiver upon initialisation.
receivesCredentialSecurely
Returns a flag to indicate whether the password for this protection space will be sent over a secure mechanism.