SPTSession Class Reference
| Inherits from | NSObject |
| Conforms to | NSSecureCoding |
| Declared in | SPTSession.h |
Overview
For persisting the session, you may use NSKeyedArchiver to obtain an NSData instance, which can
be stored securely using Keychain Services.
Note: A session is valid for a certain period of time, and may be renewed without user intervention using SPTAuth.
Tasks
Initialisation
-
– initWithUserName:accessToken:expirationDate: -
– initWithUserName:accessToken:encryptedRefreshToken:expirationDate: -
– initWithUserName:accessToken:expirationTimeInterval:
Properties
-
– isValid -
canonicalUsernameproperty -
accessTokenproperty -
encryptedRefreshTokenproperty -
expirationDateproperty -
tokenTypeproperty
Properties
accessToken
The access token of the authenticated user.
@property (nonatomic, copy, readonly) NSString *accessTokenDeclared In
SPTSession.hcanonicalUsername
The canonical username of the authenticated user.
@property (nonatomic, copy, readonly) NSString *canonicalUsernameDeclared In
SPTSession.hencryptedRefreshToken
The encrypted refresh token.
@property (nonatomic, copy, readonly) NSString *encryptedRefreshTokenDeclared In
SPTSession.hInstance Methods
initWithUserName:accessToken:encryptedRefreshToken:expirationDate:
The deignated initializer for SPTSession.
- (instancetype)initWithUserName:(NSString *)userName accessToken:(NSString *)accessToken encryptedRefreshToken:(NSString *)encryptedRefreshToken expirationDate:(NSDate *)expirationDateParameters
- userName
The username of the user.
- accessToken
The access token of the user.
- encryptedRefreshToken
The encrypted refresh token of the user.
- expirationDate
The expiration date of the access token.
Return Value
An initialized SPTSession object.
Declared In
SPTSession.hinitWithUserName:accessToken:expirationDate:
The deignated initializer for SPTSession.
- (instancetype)initWithUserName:(NSString *)userName accessToken:(NSString *)accessToken expirationDate:(NSDate *)expirationDateParameters
- userName
The username of the user.
- accessToken
The access token of the user.
- expirationDate
The expiration date of the access token.
Return Value
An initialized SPTSession object.
Declared In
SPTSession.hinitWithUserName:accessToken:expirationTimeInterval:
Initializer that takes an NSTimeInterval until the access token expires, instead of an NSDate.
- (instancetype)initWithUserName:(NSString *)userName accessToken:(NSString *)accessToken expirationTimeInterval:(NSTimeInterval)timeIntervalParameters
- userName
The username of the user.
- accessToken
The access token of the user.
- timeInterval
The time interval until the access token expires.
Return Value
An initialized SPTSession object.
Declared In
SPTSession.h