Accela SDK for iOS  V3.0
/Users/alan/Accela/AccelaMobile/AccelaMobile/AMTokenCachingStrategy.h
00001 //
00002 //  AMTokenCachingStrategy.h
00003 //  TestCase
00004 //
00005 //  Created by Alan on 12/7/12.
00006 //
00007 //
00008 
00009 #import <Foundation/Foundation.h>
00010 
00011 @interface AMTokenCachingStrategy : NSObject
00012 
00018 - (id)init;
00019 
00028 - (id)initWithUserDefaultTokenInformationKeyName:(NSString*)tokenInformationKeyName;
00029 
00035 - (void)cacheTokenInformation:(NSDictionary*)tokenInformation;
00036 
00044 - (NSDictionary*)fetchTokenInformation;
00045 
00046 - (void)clearToken;
00047 
00048 + (AMTokenCachingStrategy*)defaultInstance;
00049 
00058 + (BOOL)isValidTokenInformation:(NSDictionary*)tokenInformation;
00059 
00060 @end
00061 
00062 // The key to use with token information dictionaries to get and set the token value
00063 extern NSString *const AMTokenInformationTokenKey;
00064 
00065 // The to use with token information dictionaries to get and set the expiration date
00066 extern NSString *const AMTokenInformationExpirationDateKey;
00067 
00068 // The to use with token information dictionaries to get and set the refresh date
00069 extern NSString *const AMTokenInformationRefreshDateKey;
00070 
00071 // The key to use with token information dictionaries to get the related user's fbid
00072 extern NSString *const AMTokenInformationUserAMIDKey;
00073 
00074 // The key to use with token information dictionaries to determine whether the token was fetched via Accela Login
00075 extern NSString *const AMTokenInformationIsAccelaLoginKey;
00076 
00077 // The key to use with token information dictionaries to determine whether the token was fetched via the OS
00078 extern NSString *const AMTokenInformationLoginTypeLoginKey;
00079 
00080 // The key to use with token information dictionaries to get the latest known permissions
00081 extern NSString *const AMTokenInformationPermissionsKey;
 All Classes Functions Properties