OAuthManager.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #import <Foundation/Foundation.h>
  2. #import <UIKit/UIKit.h>
  3. #import "ResultListener.h"
  4. @interface OAuthManager : NSObject
  5. + (instancetype)getInstance:(NSString*) apiKey pubKey:(NSString*)pubKey;
  6. //免密登录初始化
  7. -(void) registerApp;
  8. //预取号
  9. -(void) getAccessToken:(double) timeout listener:(resultListener)listener;
  10. //免密登录
  11. -(void) login :(UIViewController*)uiController listener:(resultListener) listener timeout:(double)timeout;
  12. //获取用户信息
  13. -(void) user:(NSString *) accessToken listener:(resultListener) listener;
  14. //修改UI
  15. -(void) customUIWithParams:(NSDictionary *)customUIParams customViews:(void(^)(UIView *customAreaView))customViews;
  16. //自定义跳转
  17. -(void)setLoginSuccessPage:(UIViewController *)uiController;
  18. //获取AccessCode
  19. -(void) getAccessCode :(resultListener) listener timeout:(double)timeout;
  20. //认证手机号
  21. -(void) oauth:(NSString*)mobile accessCode:(NSString*)accessCode listener:(resultListener) listener;
  22. /**
  23. * 是否使用测试环境
  24. *
  25. * @param isDebug true/false
  26. */
  27. - (void) setDebug:(Boolean) isDebug ;
  28. - (void) isLog:(Boolean) isLog;
  29. @end