SPiDAccessToken Class Reference
| Inherits from | NSObject |
| Conforms to | NSCoding |
| Declared in | SPiDAccessToken.h SPiDAccessToken.m |
Tasks
Properties
-
userIDUser ID for the current client
property -
accessTokenThe OAuth 2.0 access token
property -
expiresAtExpiry date for the access token
property -
refreshTokenRefresh token used for refreshing the access token
property
Public methods
-
– initWithUserID:accessToken:expiresAt:refreshToken:Initializes the AccessToken from the parameters
-
– initWithDictionary:Initializes the AccessToken from a dictionary
-
– initWithCoder:Decodes the access token
-
– encodeWithCoder:Encodes the access token
-
– stringFromObject: -
– hasExpiredChecks if the access token has expired
-
– isClientTokenChecks if the access token is a client token
Properties
accessToken
The OAuth 2.0 access token
@property (strong, nonatomic) NSString *accessTokenDeclared In
SPiDAccessToken.hexpiresAt
Expiry date for the access token
@property (strong, nonatomic) NSDate *expiresAtDeclared In
SPiDAccessToken.hInstance Methods
encodeWithCoder:
Encodes the access token
- (void)encodeWithCoder:(NSCoder *)coderParameters
- coder
Encoder to use
Declared In
SPiDAccessToken.hhasExpired
Checks if the access token has expired
- (BOOL)hasExpiredDiscussion
@Return Returns YES if access token has expired
Declared In
SPiDAccessToken.hinitWithCoder:
Decodes the access token
- (id)initWithCoder:(NSCoder *)decoderParameters
- decoder
Decoder to use
Return Value
SPiDAccessToken
Declared In
SPiDAccessToken.hinitWithDictionary:
Initializes the AccessToken from a dictionary
- (id)initWithDictionary:(NSDictionary *)dictionaryParameters
- dictionary
Received data from SPiD
Return Value
SPiDAccessToken
Declared In
SPiDAccessToken.hinitWithUserID:accessToken:expiresAt:refreshToken:
Initializes the AccessToken from the parameters
- (id)initWithUserID:(NSString *)userID accessToken:(NSString *)accessToken expiresAt:(NSDate *)expiresAt refreshToken:(NSString *)refreshTokenParameters
- userID
Current user ID
- accessToken
Access token
- expiresAt
Access token expires at date
- refreshToken
Refresh token
Return Value
SPiDAccessToken
Declared In
SPiDAccessToken.h