# NSURLCredential class documentation

Software documentation for the NSURLCredential class
Foundation/NSURLCredential.h
NSCopying
Represents a user/password credential
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.
credentialWithUser:
user
password:
password
persistence:
persistence
Returns an autoreleased instance initialised using the -initWithUser:password:persistence: method.
hasPassword
Determine whether the credential has a password.
initWithUser:
user
password:
password
persistence:
persistence
Initialises and returns the receiver with a user name and password.
The user identifies the credential and must be specified but the password may be `nil`.
isEqual:
other
Tests two credentials for equality... credentials are considered to be equal if their -user methods return the same value, since you cannot have more than one credential for a suser within an NSURLProtectionSpace .
password
Returns the password for the receiver.
May require prompting of the user to authorize retrieval.
May return `nil` if retrieval of the password fails (eg authorization failure) even if the credential actually has a password. Call the -hasPassword method to determine whether the credential has a password
persistence
Return the presistence of this credential.
user
Returns the user string for the receiver