Class

NSURLCredentialStorage

An object that manages the credential storage.

Topics

Getting the Credential Storage

sharedCredentialStorage

Returns the shared URL credential storage object.

Getting and Setting Default Credentials

defaultCredentialForProtectionSpace:

Returns the default credential for the specified protectionSpace.

getDefaultCredentialForProtectionSpace:task:completionHandler:

Gets the default credential for the specified protection space and passes it to the provided completion handler.

setDefaultCredential:forProtectionSpace:

Sets the default credential for a specified protection space.

setDefaultCredential:forProtectionSpace:task:

Sets the default credential for a specified protection space and task.

Adding and Removing Credentials

removeCredential:forProtectionSpace:

Removes the specified credential from the credential storage for the specified protection space.

removeCredential:forProtectionSpace:options:

Removes the specified credential from the credential storage for the specified protection space using the given options.

removeCredential:forProtectionSpace:options:task:

Removes the specified credential from the credential storage for the specified protection space and task, using the given options.

setCredential:forProtectionSpace:

Adds a credential to the credential storage for the specified protection space.

setCredential:forProtectionSpace:task:

Adds a credential to the credential storage for the specified protection space and task.

Retrieving Credentials

allCredentials

The credentials for all available protection spaces.

credentialsForProtectionSpace:

Returns a dictionary containing the credentials for the specified protection space.

getCredentialsForProtectionSpace:task:completionHandler:

Gets a dictionary containing the credentials for the specified protection space and task, and passes the dictionary to the provided completion handler.

Notifications

NSURLCredentialStorageChangedNotification

This notification is posted when the set of stored credentials changes.

Relationships

Inherits From

See Also

Authentication and Credentials

NSURLAuthenticationChallenge

A challenge from a server requiring authentication from the client.

NSURLCredential

An authentication credential consisting of authentication information specific to the type of credential and the type of persistent storage to use, if any.

NSURLProtectionSpace

A server or an area on a server, commonly referred to as a realm, that requires authentication.