Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/Foundation.framework |
Availability | Available in Mac OS X v10.2 with Safari 1.0 installed. Available in Mac OS X v10.2.7 and later. |
Companion guide | |
Declared in | NSURLCredentialStorage.h |
NSURLCredentialStorage implements a singleton (shared object) that manages the credential storage.
Returns the shared URL credential storage object.
+ (NSURLCredentialStorage *)sharedCredentialStorage
The shared NSURLCredentialStorage object.
NSURLCredentialStorage.h
Returns a dictionary containing the credentials for all available protection spaces.
- (NSDictionary *)allCredentials
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.
NSURLCredentialStorage.h
Returns a dictionary containing the credentials for the specified protection space.
- (NSDictionary *)credentialsForProtectionSpace:(NSURLProtectionSpace *)protectionSpace
The protection space whose credentials you want to retrieve.
A dictionary containing the credentials for protectionSpace. The dictionary’s keys are user name strings, and the value is the corresponding NSURLCredential
.
NSURLCredentialStorage.h
Returns the default credential for the specified protectionSpace.
- (NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)protectionSpace
The URL protection space of interest.
The default credential for protectionSpace or nil
if no default has been set.
NSURLCredentialStorage.h
Removes a specified credential from the credential storage for the specified protection space.
- (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace
The credential to remove.
The protection space from which to remove the credential.
NSURLCredentialStorage.h
Adds credential to the credential storage for the specified protectionSpace.
- (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace
The credential to add. If a credential with the same user name already exists in protectionSpace, then credential replaces the existing object.
The protection space to which to add the credential.
NSURLCredentialStorage.h
Sets the default credential for a specified protection space.
- (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace
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.
The protection space whose default credential is being set.
NSURLCredentialStorage.h
This notification is posted when the set of stored credentials changes.
The notification object is the NSURLCredentialStorage
instance. This notification does not contain a userInfo
dictionary.
NSURLCredentialStorage.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)