猎豆优选

TBSDKAccountInfo.h 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // '########'########::'######:'########:'##:::'##:
  2. // ... ##..::##.... ##'##... ##:##.... ##:##::'##::
  3. // ::: ##::::##:::: ##:##:::..::##:::: ##:##:'##:::
  4. // ::: ##::::########:. ######::##:::: ##:#####::::
  5. // ::: ##::::##.... ##:..... ##:##:::: ##:##. ##:::
  6. // ::: ##::::##:::: ##'##::: ##:##:::: ##:##:. ##::
  7. // ::: ##::::########:. ######::########::##::. ##:
  8. // :::..::::........:::......::........::..::::..::
  9. //
  10. // Created by 亿刀 iTeam on 13-4-7.
  11. // Copyright (c) 2013年 亿刀 Iteam. All rights reserved.
  12. //
  13. #import <Foundation/Foundation.h>
  14. #import <mtopext/MtopAuthProtocol.h>
  15. #import <mtopext/LoginProtocol.h>
  16. @protocol IAccountSource <NSObject>
  17. - (id<LoginProtocol>) loginModule;
  18. - (id<MtopAuthProtocol>) authModule;
  19. @end
  20. @interface TBSDKAccountInfo : NSObject
  21. /**
  22. * 一下参数只有二方有效
  23. */
  24. @property (nonatomic, strong) NSString *appToken;
  25. @property (nonatomic, strong) NSString *pubkey;
  26. @property (nonatomic, strong) NSString *topSession;
  27. @property (nonatomic, strong) NSString *nick;
  28. @property (nonatomic, strong) NSString *userId;
  29. @property (nonatomic, strong) NSString *loginToken;
  30. @property (nonatomic, strong) NSString *ecode;
  31. @property (nonatomic, strong) NSString *logintime;
  32. @property (nonatomic, strong) id cookies;
  33. @property (nonatomic, strong) NSString *ssoToken;
  34. @property (nonatomic, strong) NSString *loginKey;
  35. @property (nonatomic, strong) NSString *password;
  36. @property (nonatomic, strong) NSString *sidInvalidTime;
  37. @property (nonatomic) BOOL isSidInvalid;
  38. /**
  39. * 一下参数只有三方有效
  40. */
  41. @property (atomic, strong) NSString *openToken;
  42. /**
  43. * 一下参数二三方均有效
  44. */
  45. @property (nonatomic, strong) NSString *sid;
  46. /**
  47. * 每个实例均有自己的Accout,不再是单例,该接口废弃。
  48. */
  49. + (TBSDKAccountInfo *)shareInstance DEPRECATED_MSG_ATTRIBUTE("为保证代码兼容性,暂未删除");
  50. /**
  51. * 每个实例均有自己的Accout,不再是单例,该接口废弃。
  52. */
  53. + (BOOL)isLoggedIn DEPRECATED_MSG_ATTRIBUTE("为保证代码兼容性,暂未删除");
  54. - (instancetype)initWithSource:(id<IAccountSource>)source;
  55. - (BOOL)isLogin;
  56. - (NSString *)fetchAuthToken:(AuthParamObj *)authParam;
  57. @end