TapLogin-Unity/Plugins/iOS/TapLoginSDK.framework/Headers/TTSDKAccessToken.h

70 lines
1.9 KiB
C
Raw Normal View History

2023-10-20 15:49:54 +08:00
//
// TTSDKAccessToken.h
// TapTapSDK
//
// Created by TapTap on 2017/10/17.
// Copyright © 2017年 易玩. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* @brief TapTap
*
*
*/
@interface TTSDKAccessToken : NSObject
/// 唯一标志
@property (nonatomic, copy) NSString * kid;
/// 认证码
@property (nonatomic, copy) NSString * accessToken;
/// 认证码类型
@property (nonatomic, copy) NSString * tokenType;
/// mac密钥
@property (nonatomic, copy) NSString * macKey;
/// mac密钥计算方式
@property (nonatomic, copy) NSString * macAlgorithm;
/// 用户授权的权限,多个时以逗号隔开
@property (nonatomic, copy) NSString * scope;
/// 用户授权的权限 Array 形式
@property (nonatomic, copy) NSArray<NSString *> * scopeArray;
/// 根据JSON生成 TTSDKAccessToken
/// @param accessTokenJsonString json字符串类型的AccessToken
+ (TTSDKAccessToken *)build:(NSString *)accessTokenJsonString;
/// 通过参数生成实例
+ (TTSDKAccessToken *)build:(NSString *)kid accessToken:(NSString *)accessToken tokenType:(NSString *)tokenType macKey:(NSString *)macKey macAlgorithm:(NSString *)macAlgorithm;
+ (TTSDKAccessToken *)build:(NSString *)kid accessToken:(NSString *)accessToken tokenType:(NSString *)tokenType macKey:(NSString *)macKey macAlgorithm:(NSString *)macAlgorithm scope:(NSArray *)scope;
/// 转换成json字符串
- (NSString *)toJsonString;
- (NSDictionary *)toDictionary;
+ (NSArray *)scopeStringToArray:(NSString *)scopeString;
+ (TTSDKAccessToken *)createWithQueryStr:(NSString *)queryStr;
+ (TTSDKAccessToken *)createWithDictionary:(NSDictionary *)dic;
- (NSString *)toQueryString;
/**
* @brief
*
* nil
*/
+ (TTSDKAccessToken *)currentAccessToken;
+ (void)setCurrentToken:(TTSDKAccessToken *)token;
@end