STSSDKAuthManager
@interface STSSDKAuthManager : NSObject
StraaS.io auth manager.
-
The account id of current vendor.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull accountId;Swift
var accountId: String { get } -
The app token. If the app is authorized, then the token is not nil.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull token;Swift
var token: String { get } -
Using new to create a STSSDKAuthManager instance is unavailable.
Declaration
Objective-C
+ (nonnull instancetype)new; -
Using init to create a STSSDKAuthManager instance is unavailable.
Declaration
Objective-C
- (nonnull instancetype)init; -
Returns the STSSDKAuthManager instance, creating it if it doesn’t exist yet.
Declaration
Objective-C
+ (nonnull STSSDKAuthManager *)sharedManager;Swift
class func shared() -> STSSDKAuthManagerReturn Value
The shared instance of STSSDKAuthManager.
-
Refresh a member access token.
Declaration
Objective-C
- (nonnull NSURLSessionDataTask *) refreshMemberToken:(nonnull NSString *)refreshToken success:(nonnull void (^)(NSString *_Nonnull))success failure:(nonnull void (^)(NSError *_Nonnull))failure;Swift
func refreshMemberToken(_ refreshToken: String, success: @escaping (String) -> Void, failure: @escaping (Error) -> Void) -> URLSessionDataTaskParameters
refreshTokenThe token wants to be refresh
successHandler for successful request. It takes refreshed token argument.
failureError handler.
Return Value
The new session data task. Returns
nilif the application is unauthorized.
View on GitHub
Install in Dash
STSSDKAuthManager Class Reference