洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
3.9 KiB

8 months ago
  1. //
  2. // ASSSecureSdk.h
  3. // APSecSecuritySDK
  4. //
  5. // Created by xingchen on 15/2/26.
  6. // Copyright (c) 2015年 Alipay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. //初始化API的字典参数中,TID的key
  10. //key for TID in the NSDictionary parameter for initToken:callback: API
  11. extern NSString * const ASS_TID;
  12. //初始化API的字典参数中,userid的key
  13. //key for USERID in the NSDictionary parameter for initToken:callback: API
  14. extern NSString * const ASS_USERID;
  15. //初始化API的字典参数中,环境变量的key
  16. //key for server environment configuration in the NSDictionary parameter for initToken:callback: API
  17. extern NSString * const ASS_ENVIRONMENT;
  18. //初始化API的字典参数中,环境变量的value,代表线上环境
  19. //value for server configuration in the NSDictionary parameter for initToken:callback: API, stands for online environment
  20. extern NSString * const ASS_ENVIRONMENT_ONLINE;
  21. //初始化API的字典参数中,环境变量的value,代表测试环境
  22. //value for server configuration in the NSDictionary parameter for initToken:callback: API, stands for test environment
  23. extern NSString * const ASS_ENVIRONMENT_SIT;
  24. //初始化API的字典参数中,环境变量的value,代表开发环境
  25. //value for server configuration in the NSDictionary parameter for initToken:callback: API, stands for daily environment
  26. extern NSString * const ASS_ENVIRONMENT_DAILY;
  27. //初始化API的字典参数中,环境变量的value,代表预发环境
  28. //value for server configuration in the NSDictionary parameter for initToken:callback: API, stands for pre online environment
  29. extern NSString * const ASS_ENVIRONMENT_PRE;
  30. //初始化API的字典参数中,设置RPC网关地址的key。
  31. //key for RPC server gateway address in the NSDictionary parameter for initToken:callback: API.
  32. //If value for this key is specified, the value for ASS_ENVIRONMENT will be ignored.
  33. extern NSString* const ASS_RPC_GATEWAY_ADDR;
  34. //rpc header workspaceid key
  35. extern NSString* const ASS_RPC_WORKSPACEID;
  36. //rpc header appid key
  37. extern NSString* const ASS_RPC_APPID;
  38. //初始化API的字典参数中,设置UMID网关host地址的key。
  39. //host 要设置的线上地址,如ynuf.alipay.com,不要带协议头,不要带后面的参数,只能传纯host地址
  40. //key for UMID server host in the NSDictionary parameter for initToken:callback: API.
  41. //host should only contain online address such as ynuf.alipay.com, without protocol or parameters.
  42. extern NSString* const ASS_UMID_HOST;
  43. //初始化API的字典参数中,设置加密的umid。
  44. extern NSString * const ASS_ENCODE_UMID;
  45. /*!
  46. @typedef ASSStatusCode
  47. Possible return codes
  48. @constant ASSStatusCodeOk Completed, No errors
  49. @constant ASSStatusCodeInvalidParam input param invalid
  50. @constant ASSStatusCodeAppNameNil appName is nil
  51. @constant ASSStatusCodeAppKeyNil appKeyClient is nil
  52. @constant ASSStatusCodeConnectionError network connection failure
  53. */
  54. typedef NS_ENUM(NSInteger, ASSStatusCode)
  55. {
  56. ASSStatusCodeOk = 0,
  57. ASSStatusCodeInvalidParam,
  58. ASSStatusCodeAppNameNil,
  59. ASSStatusCodeAppKeyNil,
  60. ASSStatusCodeConnectionError,
  61. };
  62. typedef NS_ENUM(NSInteger, ASSAddressFlag)
  63. {
  64. ASSAddressFlagIndonesia = 1,
  65. ASSAddressFlagMalaysia = 2,
  66. ASSAddressFlagPilipinas = 3,
  67. ASSAddressFlagSingapore = 4,
  68. ASSAddressFlagIpayVn = 11,
  69. ASSAddressFlagIpayId = 12,
  70. ASSAddressFlagIpayMy = 13,
  71. ASSAddressFlagIpaySg = 14,
  72. ASSAddressFlagIpayTh = 15,
  73. ASSAddressFlagIpayPh = 16,
  74. ASSAddressFlagIpayDefault = 17,
  75. };
  76. @interface APSecureSdk : NSObject
  77. /**
  78. */
  79. + (id)sharedInstance;
  80. /*
  81. *
  82. */
  83. - (void)setSecuritySDKConfig:(ASSAddressFlag)address;
  84. /**
  85. */
  86. - (void)initWithRpcConfiguration:(NSDictionary *) config;
  87. //===================测试联调 api====================//
  88. - (void)setRpcConfiguration:(NSDictionary *) config;
  89. @end