AliyunIdentityManager.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // ZIMIdentityManager.h
  3. // AliyunIdentityManager
  4. //
  5. // Created by richard on 31/10/2017.
  6. // Copyright © 2017 Alipay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. //version 1.5.1
  10. //ext params keys
  11. extern NSString *const kZIMInitOperationTypeKey; //init operation type
  12. extern NSString *const kZIMValidateOperationTypeKey; //validate operation type
  13. extern NSString *const kZIMGatewayURLKey; //rpc gateway url
  14. extern NSString *const kZIMRpcHeaderKey; //ext rpc header
  15. extern NSString *const kZIMCurrentViewControllerKey; // current view controller
  16. extern NSString *const kZIMFastUploadKey;
  17. extern NSString *const kZIMBisProtocolKey;
  18. extern NSString *const kZIMResponseKey;
  19. extern NSString *const kZIMValidateResponseKey;
  20. extern NSString *const kZIMCertNoKey;
  21. extern NSString *const kZIMCertNameKey;
  22. extern NSString *const ZIM_EXT_PARAMS_KEY_OCR_BOTTOM_BUTTON_COLOR; //设置颜色的值,值内容为:#FFFFFF 格式,必须为6位
  23. extern NSString *const ZIM_EXT_PARAMS_KEY_OCR_BOTTOM_BUTTON_CLICKED_COLOR; //设置按钮点击颜色的值,值内容为:#FFFFFF 格式 ,必须为6位
  24. extern NSString *const ZIM_EXT_PARAMS_KEY_USE_VIDEO; //返回本地视频的key
  25. extern NSString *const ZIM_EXT_PARAMS_KEY_OCR_FACE_CIRCLE_COLOR;
  26. extern NSString *const ZIM_EXT_PARAMS_KEY_USE_VIDEO_UPLOAD; //返回本地视频上传到服务端的key
  27. extern NSString *const ZIM_EXT_PARAMS_KEY_MODEL_FILE_PATH; //设置文件路径
  28. extern NSString *const ZIM_EXT_PARAMS_KEY_ACTIVITYINDICATOR_COLOR;
  29. @class ZIMResponse;
  30. typedef void (^ZIMCallback)(ZIMResponse *response);
  31. typedef void (^ZIMQuitCallback)(BOOL succes, NSDictionary * reason);
  32. typedef void(^ZIMMsgProxyHandler)(NSDictionary *params);
  33. //msg字典中{@"requestData",""}的字符串是ZimValidateRequest对象
  34. //PB格式下:是ZimValidateRequest对象bytes内容做base64生成的字符串。
  35. //JSON格式下,将ZimValidateRequest对象序列化成json字符串,然后base64生成的字符串
  36. @protocol ZIMMsgProxyDelegate <NSObject>
  37. - (void)didReceivedMsg:(NSDictionary *)msg withHandler:(ZIMMsgProxyHandler)handler;
  38. @end
  39. @interface AliyunIdentityManager : NSObject
  40. @property(nonatomic, weak)id<ZIMMsgProxyDelegate> delegate;
  41. + (AliyunIdentityManager *)sharedInstance;
  42. - (void)verifyWith:(NSString *)zimId
  43. extParams:(NSDictionary *)params
  44. onCompletion:(ZIMCallback)callback;
  45. - (NSArray *)getlogArray;
  46. - (void)quit:(NSDictionary *) params
  47. onCompletion:(ZIMQuitCallback)callback;
  48. + (NSDictionary *)getMetaInfo;
  49. + (NSString *)version;
  50. + (NSString *)sdkVersion;
  51. + (NSString *)protocolVersion;
  52. #ifdef FEATURE_LOCAL_MATCH
  53. + (void)processValidateResult:(BOOL) result forUser:(NSString *) userid andzimID:(NSString *) zimID;
  54. + (void)processValidateResult:(BOOL) result forUser:(NSString *) userid;
  55. #endif
  56. -(void) sendlog:(NSDictionary*)paramDic withSeedID:(NSString*)seedId;
  57. @end
  58. #import <AliyunIdentityManager/PoPGatewayNetwork.h>
  59. #import <AliyunIdentityManager/OATechGatewayNetwork.h>
  60. #import <AliyunIdentityManager/AliyunIdentityPublicApi.h>
  61. #import <AliyunIdentityManager/ZimRpcManager.h>
  62. #import <AliyunIdentityManager/ZimJSApiHandler.h>
  63. #import <AliyunIdentityManager/AliyunSdk.h>
  64. #import <AliyunIdentityManager/ZimInitRequest.h>
  65. #import <AliyunIdentityManager/ZimValidateRequest.h>
  66. #import <AliyunIdentityManager/ZimValidateResponse.h>
  67. #import <AliyunIdentityManager/ZIMResponse.h>
  68. #import <UIKit/UIKit.h>
  69. //! Project version number for AliyunIdentityManager.
  70. FOUNDATION_EXPORT double AliyunIdentityManagerVersionNumber;
  71. //! Project version string for AliyunIdentityManager.
  72. FOUNDATION_EXPORT const unsigned char AliyunIdentityManagerVersionString[];