AuthSDK.h
991 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// AuthSDK.h
// AuthSDK
//
// Created by jardgechen on 16/8/31.
// Copyright © 2016年 tencent. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ValidatorTool.h"
extern NSString *const OcrOnlyNotification;
typedef void(^HttpRequestSuccessBlock)(id responseObject);
typedef void(^HttpRequestFailBlock)(NSError *error);
@protocol AuthSDKDelegate <NSObject>
/**
回调函数
@param result 返回的结果
*/
-(void)onResultBack:(NSDictionary *)result;
@end
@interface AuthSDK : NSObject
/**
初始化服务器URL
@return 构造函数
*/
-(instancetype)init;
- (void) setServerURL:(NSString *)serverURL;
- (void) setLimitErrorTime:(int)limiErrorTime;
-(NSString *)getSDKVersion;
/**
开始流程
@param token 需要传入的token, 不需要时可传入nil
@param vc 父controller
@param delegate 需要实现回调的Controller
*/
-(void)startAuthWithToken:(NSString *)token parent:(UIViewController *)vc delegate:(id<AuthSDKDelegate>)delegate;
@end