SPiDKeychainWrapper Class Reference
| Inherits from | NSObject |
| Declared in | SPiDKeychainWrapper.h SPiDKeychainWrapper.m |
Overview
SPiDKeychainWrapper is a wrapper used to simplfy keychain access.
It is used by the SPiDClient for all keychain operations.
Note that all keychain items are available in the iPhone simulator to all apps since the application is not signed!
Tasks
Public methods
-
+ getAccessTokenFromKeychainForIdentifier:Get access token from keychain Tries to load the access token from the keychain
-
+ storeInKeychainAccessTokenWithValue:forIdentifier:Saves access token to keychain Tries to save the access token to the keychain
-
+ updateAccessTokenInKeychainWithValue:forIdentifier:Update access token in keychain Tries to update the access token in the keychain
-
+ removeAccessTokenFromKeychainForIdentifier:Remove access token from keychain Tries to remove the access token from the keychain
Private methods
-
+ serviceNameForSPiDGenerates a service name to use for the keychain
-
+ setupSearchQueryForIdentifier:Creates the basic search query used for all keychain operations
Class Methods
getAccessTokenFromKeychainForIdentifier:
Get access token from keychain Tries to load the access token from the keychain
+ (SPiDAccessToken *)getAccessTokenFromKeychainForIdentifier:(NSString *)identifierParameters
- identifier
Unique identification for this keychain item
Return Value
Access token if available otherwise nil
Declared In
SPiDKeychainWrapper.hremoveAccessTokenFromKeychainForIdentifier:
Remove access token from keychain Tries to remove the access token from the keychain
+ (void)removeAccessTokenFromKeychainForIdentifier:(NSString *)identifierParameters
- identifier
Unique identification for this keychain item
Declared In
SPiDKeychainWrapper.hserviceNameForSPiD
Generates a service name to use for the keychain
+ (NSString *)serviceNameForSPiDReturn Value
Service name
Discussion
The service will have the form ‘bundleIdentifier-SPiD’
Declared In
SPiDKeychainWrapper.msetupSearchQueryForIdentifier:
Creates the basic search query used for all keychain operations
+ (NSMutableDictionary *)setupSearchQueryForIdentifier:(NSString *)identifierParameters
- identifier
Unique identifier for the keychain item
Return Value
Query as a NSMutableDictionary
Declared In
SPiDKeychainWrapper.mstoreInKeychainAccessTokenWithValue:forIdentifier:
Saves access token to keychain Tries to save the access token to the keychain
+ (BOOL)storeInKeychainAccessTokenWithValue:(SPiDAccessToken *)accessToken forIdentifier:(NSString *)identifierParameters
- accessToken
Access token to save
- identifier
Unique identification for this keychain item
Return Value
Access token if available otherwise nil
Declared In
SPiDKeychainWrapper.hupdateAccessTokenInKeychainWithValue:forIdentifier:
Update access token in keychain Tries to update the access token in the keychain
+ (BOOL)updateAccessTokenInKeychainWithValue:(SPiDAccessToken *)accessToken forIdentifier:(NSString *)identifierParameters
- accessToken
Access token to save
- identifier
Unique identification for this keychain item
Return Value
YES if successful otherwise NO
Declared In
SPiDKeychainWrapper.h