NSURLCredentialStorage Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in iOS 2.0 and later. |
| Companion guide | |
| Declared in | NSURLCredentialStorage.h |
Overview
NSURLCredentialStorage implements a singleton (shared object) that manages the credential storage.
Tasks
Getting the Credential Storage
Getting and Setting Default Credentials
Adding and Removing Credentials
Retrieving Credentials
Class Methods
sharedCredentialStorage
Returns the shared URL credential storage object.
Return Value
The shared NSURLCredentialStorage object.
Availability
- Available in iOS 2.0 and later.
Declared In
NSURLCredentialStorage.hInstance Methods
allCredentials
Returns a dictionary containing the credentials for all available protection spaces.
Return Value
A dictionary containing the credentials for all available protection spaces. The dictionary has keys corresponding to the NSURLProtectionSpace objects. The values for the NSURLProtectionSpace keys consist of dictionaries where the keys are user name strings, and the value is the corresponding NSURLCredential object.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
NSURLCredentialStorage.hcredentialsForProtectionSpace:
Returns a dictionary containing the credentials for the specified protection space.
Parameters
- protectionSpace
The protection space whose credentials you want to retrieve.
Return Value
A dictionary containing the credentials for protectionSpace. The dictionary’s keys are user name strings, and the value is the corresponding NSURLCredential.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
NSURLCredentialStorage.hdefaultCredentialForProtectionSpace:
Returns the default credential for the specified protectionSpace.
Parameters
- protectionSpace
The URL protection space of interest.
Return Value
The default credential for protectionSpace or nil if no default has been set.
Availability
- Available in iOS 2.0 and later.
Declared In
NSURLCredentialStorage.hremoveCredential:forProtectionSpace:
Removes a specified credential from the credential storage for the specified protection space.
Parameters
- credential
The credential to remove.
- protectionSpace
The protection space from which to remove the credential.
Availability
- Available in iOS 2.0 and later.
See Also
Declared In
NSURLCredentialStorage.hsetCredential:forProtectionSpace:
Adds credential to the credential storage for the specified protectionSpace.
Parameters
- credential
The credential to add. If a credential with the same user name already exists in protectionSpace, then credential replaces the existing object.
- protectionSpace
The protection space to which to add the credential.
Availability
- Available in iOS 2.0 and later.
Declared In
NSURLCredentialStorage.hsetDefaultCredential:forProtectionSpace:
Sets the default credential for a specified protection space.
Parameters
- credential
The URL credential to set as the default for protectionSpace. If the receiver does not contain credential in the specified protectionSpace it will be added.
- protectionSpace
The protection space whose default credential is being set.
Availability
- Available in iOS 2.0 and later.
Declared In
NSURLCredentialStorage.hNotifications
NSURLCredentialStorageChangedNotification
The notification object is the NSURLCredentialStorage instance. This notification does not contain a userInfo dictionary.
Availability
- Available in iOS 2.0 and later.
Declared In
NSURLCredentialStorage.h© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)