authing_ruby 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (505) hide show
  1. checksums.yaml +7 -0
  2. data/authing_ruby.gemspec +30 -0
  3. data/lib/authing_ruby/GraphQLAPI.rb +151 -0
  4. data/lib/authing_ruby/authentication/AuthenticationClient.rb +801 -0
  5. data/lib/authing_ruby/authentication/AuthenticationTokenProvider.rb +42 -0
  6. data/lib/authing_ruby/authentication/BaseAuthenticationClient.rb +28 -0
  7. data/lib/authing_ruby/common/GraphqlClient.rb +39 -0
  8. data/lib/authing_ruby/common/HttpClient.rb +247 -0
  9. data/lib/authing_ruby/common/PublicKeyManager.rb +42 -0
  10. data/lib/authing_ruby/graphql/mutations/bindPhone.gql +53 -0
  11. data/lib/authing_ruby/graphql/mutations/createUser.gql +54 -0
  12. data/lib/authing_ruby/graphql/mutations/deleteUser.gql +6 -0
  13. data/lib/authing_ruby/graphql/mutations/deleteUsers.gql +6 -0
  14. data/lib/authing_ruby/graphql/mutations/loginByEmail.gql +54 -0
  15. data/lib/authing_ruby/graphql/mutations/loginByPhoneCode.gql +54 -0
  16. data/lib/authing_ruby/graphql/mutations/loginByPhonePassword.gql +54 -0
  17. data/lib/authing_ruby/graphql/mutations/loginByUsername.gql +54 -0
  18. data/lib/authing_ruby/graphql/mutations/refreshAccessToken.gql +7 -0
  19. data/lib/authing_ruby/graphql/mutations/registerByEmail.gql +54 -0
  20. data/lib/authing_ruby/graphql/mutations/registerByPhoneCode.gql +54 -0
  21. data/lib/authing_ruby/graphql/mutations/registerByUsername.gql +54 -0
  22. data/lib/authing_ruby/graphql/mutations/resetPassword.gql +6 -0
  23. data/lib/authing_ruby/graphql/mutations/sendEmail.gql +6 -0
  24. data/lib/authing_ruby/graphql/mutations/updatePassword.gql +53 -0
  25. data/lib/authing_ruby/graphql/mutations/updateUser.gql +54 -0
  26. data/lib/authing_ruby/graphql/queries/accessToken.gql +7 -0
  27. data/lib/authing_ruby/graphql/queries/checkLoginStatus.gql +14 -0
  28. data/lib/authing_ruby/graphql/queries/checkPasswordStrength.gql +6 -0
  29. data/lib/authing_ruby/graphql/queries/findUser.gql +64 -0
  30. data/lib/authing_ruby/graphql/queries/isUserExists.gql +13 -0
  31. data/lib/authing_ruby/graphql/queries/user.gql +63 -0
  32. data/lib/authing_ruby/graphql/queries/users.gql +57 -0
  33. data/lib/authing_ruby/management/AclManagementClient.rb +47 -0
  34. data/lib/authing_ruby/management/ApplicationsManagementClient.rb +79 -0
  35. data/lib/authing_ruby/management/ManagementClient.rb +66 -0
  36. data/lib/authing_ruby/management/ManagementTokenProvider.rb +92 -0
  37. data/lib/authing_ruby/management/RolesManagementClient.rb +38 -0
  38. data/lib/authing_ruby/management/UserpoolManagementClient.rb +15 -0
  39. data/lib/authing_ruby/management/UsersManagementClient.rb +161 -0
  40. data/lib/authing_ruby/management/WhitelistManagementClient.rb +1 -0
  41. data/lib/authing_ruby/test/RSA.rb +18 -0
  42. data/lib/authing_ruby/test/helper.rb +15 -0
  43. data/lib/authing_ruby/test/js_sdk_test/1.buildAuthorizeUrl.js +43 -0
  44. data/lib/authing_ruby/test/js_sdk_test/2.buildAuthorizeUrl_PKCE.js +47 -0
  45. data/lib/authing_ruby/test/js_sdk_test/README.md +5 -0
  46. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +23 -0
  47. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +21 -0
  48. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +303 -0
  49. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +2 -0
  50. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +91 -0
  51. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +7 -0
  52. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +20 -0
  53. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +1078 -0
  54. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +2801 -0
  55. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
  56. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +56 -0
  57. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
  58. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +31 -0
  59. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
  60. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +250 -0
  61. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
  62. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +665 -0
  63. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
  64. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +619 -0
  65. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
  66. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +179 -0
  67. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +331 -0
  68. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +69 -0
  69. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +14 -0
  70. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +125 -0
  71. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +19 -0
  72. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +149 -0
  73. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +18 -0
  74. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +81 -0
  75. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +110 -0
  76. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +1812 -0
  77. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +236 -0
  78. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +863 -0
  79. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +65 -0
  80. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +195 -0
  81. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +216 -0
  82. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +531 -0
  83. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +184 -0
  84. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +386 -0
  85. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +58 -0
  86. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +126 -0
  87. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +74 -0
  88. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +190 -0
  89. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +39 -0
  90. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +159 -0
  91. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +488 -0
  92. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +772 -0
  93. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +304 -0
  94. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +512 -0
  95. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +291 -0
  96. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +676 -0
  97. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +56 -0
  98. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +198 -0
  99. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +146 -0
  100. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +264 -0
  101. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +44 -0
  102. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +106 -0
  103. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +142 -0
  104. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +241 -0
  105. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +753 -0
  106. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +1114 -0
  107. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +114 -0
  108. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +259 -0
  109. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +982 -0
  110. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +96 -0
  111. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +30 -0
  112. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +126 -0
  113. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +31 -0
  114. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +67 -0
  115. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +53 -0
  116. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +343 -0
  117. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +1 -0
  118. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +5 -0
  119. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +5612 -0
  120. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +240 -0
  121. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +7 -0
  122. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +3 -0
  123. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +7 -0
  124. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +8 -0
  125. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +1078 -0
  126. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +2795 -0
  127. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
  128. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +53 -0
  129. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
  130. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +28 -0
  131. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
  132. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +247 -0
  133. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
  134. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +662 -0
  135. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
  136. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +616 -0
  137. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
  138. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +176 -0
  139. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +331 -0
  140. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +66 -0
  141. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +14 -0
  142. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +119 -0
  143. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +19 -0
  144. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +143 -0
  145. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +18 -0
  146. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +78 -0
  147. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +110 -0
  148. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +1809 -0
  149. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +236 -0
  150. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +860 -0
  151. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +65 -0
  152. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +192 -0
  153. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +216 -0
  154. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +528 -0
  155. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +184 -0
  156. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +383 -0
  157. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +58 -0
  158. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +123 -0
  159. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +74 -0
  160. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +184 -0
  161. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +39 -0
  162. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +153 -0
  163. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +488 -0
  164. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +750 -0
  165. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +304 -0
  166. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +509 -0
  167. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +291 -0
  168. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +673 -0
  169. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +56 -0
  170. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +195 -0
  171. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +146 -0
  172. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +261 -0
  173. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +44 -0
  174. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +103 -0
  175. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +142 -0
  176. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +238 -0
  177. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +753 -0
  178. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +1111 -0
  179. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +114 -0
  180. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +256 -0
  181. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +982 -0
  182. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +93 -0
  183. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +30 -0
  184. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +123 -0
  185. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +31 -0
  186. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +62 -0
  187. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +53 -0
  188. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +336 -0
  189. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +1 -0
  190. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +2 -0
  191. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +5612 -0
  192. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +237 -0
  193. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +7 -0
  194. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +1 -0
  195. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +7 -0
  196. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +30 -0
  197. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +1078 -0
  198. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +2811 -0
  199. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
  200. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +66 -0
  201. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
  202. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +41 -0
  203. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
  204. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +260 -0
  205. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
  206. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +675 -0
  207. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
  208. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +629 -0
  209. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
  210. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +189 -0
  211. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +331 -0
  212. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +79 -0
  213. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +14 -0
  214. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +135 -0
  215. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +19 -0
  216. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +159 -0
  217. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +18 -0
  218. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +91 -0
  219. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +110 -0
  220. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +1822 -0
  221. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +236 -0
  222. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +873 -0
  223. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +65 -0
  224. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +205 -0
  225. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +216 -0
  226. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +541 -0
  227. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +184 -0
  228. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +396 -0
  229. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +58 -0
  230. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +136 -0
  231. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +74 -0
  232. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +200 -0
  233. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +39 -0
  234. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +169 -0
  235. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +488 -0
  236. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +782 -0
  237. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +304 -0
  238. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +522 -0
  239. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +291 -0
  240. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +686 -0
  241. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +56 -0
  242. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +208 -0
  243. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +146 -0
  244. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +274 -0
  245. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +44 -0
  246. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +116 -0
  247. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +142 -0
  248. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +251 -0
  249. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +753 -0
  250. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +1124 -0
  251. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +114 -0
  252. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +269 -0
  253. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +982 -0
  254. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +106 -0
  255. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +30 -0
  256. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +136 -0
  257. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +31 -0
  258. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +77 -0
  259. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +53 -0
  260. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +353 -0
  261. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +1 -0
  262. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +15 -0
  263. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +5612 -0
  264. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +250 -0
  265. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +7 -0
  266. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +13 -0
  267. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +520 -0
  268. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +413 -0
  269. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +19 -0
  270. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +709 -0
  271. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +162 -0
  272. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +1715 -0
  273. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +1 -0
  274. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +3 -0
  275. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +1 -0
  276. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +157 -0
  277. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +1 -0
  278. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +37 -0
  279. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +279 -0
  280. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +180 -0
  281. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +53 -0
  282. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +19 -0
  283. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +57 -0
  284. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +5 -0
  285. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +94 -0
  286. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +52 -0
  287. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +7 -0
  288. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +20 -0
  289. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +18 -0
  290. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +79 -0
  291. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +42 -0
  292. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +73 -0
  293. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +25 -0
  294. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +20 -0
  295. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +97 -0
  296. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +7 -0
  297. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +11 -0
  298. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +71 -0
  299. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  300. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +53 -0
  301. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  302. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  303. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  304. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  305. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  306. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +27 -0
  307. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +344 -0
  308. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +84 -0
  309. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +18 -0
  310. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +155 -0
  311. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +1 -0
  312. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +1 -0
  313. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +322 -0
  314. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +60 -0
  315. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +129 -0
  316. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +21 -0
  317. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +45 -0
  318. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.node.json +0 -0
  319. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/webpack.config.js +41 -0
  320. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +685 -0
  321. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +19 -0
  322. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +800 -0
  323. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +162 -0
  324. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +1756 -0
  325. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +1 -0
  326. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +3 -0
  327. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +1 -0
  328. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +161 -0
  329. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +1 -0
  330. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +37 -0
  331. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +303 -0
  332. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +179 -0
  333. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +56 -0
  334. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +19 -0
  335. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +57 -0
  336. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +5 -0
  337. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +95 -0
  338. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +52 -0
  339. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +7 -0
  340. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +20 -0
  341. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +18 -0
  342. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +79 -0
  343. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +42 -0
  344. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +87 -0
  345. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +25 -0
  346. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +20 -0
  347. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +98 -0
  348. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +7 -0
  349. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +11 -0
  350. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +70 -0
  351. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +14 -0
  352. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +53 -0
  353. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
  354. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
  355. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +11 -0
  356. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
  357. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
  358. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
  359. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +27 -0
  360. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +351 -0
  361. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +86 -0
  362. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +28 -0
  363. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +24 -0
  364. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +249 -0
  365. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +234 -0
  366. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +35 -0
  367. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +890 -0
  368. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +797 -0
  369. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +6059 -0
  370. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
  371. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +136 -0
  372. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +18 -0
  373. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +18 -0
  374. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +149 -0
  375. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +18 -0
  376. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +134 -0
  377. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +66 -0
  378. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +18 -0
  379. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +18 -0
  380. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +18 -0
  381. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +18 -0
  382. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +18 -0
  383. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +18 -0
  384. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +18 -0
  385. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +18 -0
  386. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +18 -0
  387. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +143 -0
  388. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +18 -0
  389. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +76 -0
  390. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +268 -0
  391. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +80 -0
  392. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
  393. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +58 -0
  394. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +40 -0
  395. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +54 -0
  396. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +38 -0
  397. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +49 -0
  398. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +44 -0
  399. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +40 -0
  400. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +30 -0
  401. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +18 -0
  402. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +47 -0
  403. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +145 -0
  404. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +190 -0
  405. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +192 -0
  406. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +139 -0
  407. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +267 -0
  408. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +150 -0
  409. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +80 -0
  410. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +199 -0
  411. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +326 -0
  412. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +83 -0
  413. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +326 -0
  414. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +779 -0
  415. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +304 -0
  416. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +395 -0
  417. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +19 -0
  418. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +58 -0
  419. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +368 -0
  420. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +70 -0
  421. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +1 -0
  422. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +43 -0
  423. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +195 -0
  424. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +225 -0
  425. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +10 -0
  426. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +186 -0
  427. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +18 -0
  428. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +148 -0
  429. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +14 -0
  430. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +1 -0
  431. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +1 -0
  432. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +535 -0
  433. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +59 -0
  434. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +107 -0
  435. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +192 -0
  436. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +249 -0
  437. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +2 -0
  438. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +8 -0
  439. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +116 -0
  440. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +186 -0
  441. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +142 -0
  442. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +315 -0
  443. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +3 -0
  444. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +3 -0
  445. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +51 -0
  446. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +565 -0
  447. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +5 -0
  448. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
  449. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +3 -0
  450. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +64 -0
  451. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +9 -0
  452. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
  453. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +9778 -0
  454. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +1962 -0
  455. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +3 -0
  456. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +76 -0
  457. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +98 -0
  458. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1754 -0
  459. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +10 -0
  460. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +46 -0
  461. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +3 -0
  462. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +76 -0
  463. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +23 -0
  464. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +373 -0
  465. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +7 -0
  466. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +58 -0
  467. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1593 -0
  468. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +69 -0
  469. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +1 -0
  470. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +49 -0
  471. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +78 -0
  472. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +21 -0
  473. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +55 -0
  474. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +20 -0
  475. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +125 -0
  476. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +1 -0
  477. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +2 -0
  478. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +38 -0
  479. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +33 -0
  480. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +26 -0
  481. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +37 -0
  482. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +16 -0
  483. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +53 -0
  484. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +29 -0
  485. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +46 -0
  486. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +1 -0
  487. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +152 -0
  488. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +21 -0
  489. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +37 -0
  490. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/readme.md +51 -0
  491. data/lib/authing_ruby/test/js_sdk_test/package-lock.json +177 -0
  492. data/lib/authing_ruby/test/js_sdk_test/package.json +15 -0
  493. data/lib/authing_ruby/test/mini_test/TestApplicationsManagementClient.rb +85 -0
  494. data/lib/authing_ruby/test/mini_test/TestAuthenticationClient.rb +232 -0
  495. data/lib/authing_ruby/test/mini_test/TestAuthenticationClientProtocal.rb +238 -0
  496. data/lib/authing_ruby/test/mini_test/TestHttpClient.rb +53 -0
  497. data/lib/authing_ruby/test/mini_test/TestManagementClient.rb +193 -0
  498. data/lib/authing_ruby/test/mini_test/TestManagementTokenProvider.rb +49 -0
  499. data/lib/authing_ruby/test/mini_test/TestNaiveHttpClient.rb +33 -0
  500. data/lib/authing_ruby/test/mini_test/TestSMSandEmail.rb +101 -0
  501. data/lib/authing_ruby/test/mini_test/TestUtils.rb +35 -0
  502. data/lib/authing_ruby/utils/utils.rb +40 -0
  503. data/lib/authing_ruby/version.rb +6 -0
  504. data/lib/authing_ruby.rb +14 -0
  505. metadata +694 -0
@@ -0,0 +1,100 @@
1
+ import { AuthenticationTokenProvider } from './AuthenticationTokenProvider';
2
+ import { AuthenticationClientOptions } from './types';
3
+ import { HttpClient } from '../common/HttpClient';
4
+ import { User } from '../../types/graphql.v2';
5
+ import { BaseAuthenticationClient } from './BaseAuthenticationClient';
6
+ /**
7
+ * @class SocialAuthenticationClient 社会化登录模块
8
+ * @description 此模块封装了社会化登录的功能,可以通过简洁的 API 快速使用社会化登录获取用户信息。
9
+ *
10
+ * 发起社会化登录授权请求:
11
+ *
12
+ * \`\`\`javascript
13
+ * import { AuthenticationClient } from "authing-js-sdk"
14
+ * const authenticationClient = new AuthenticationClient({
15
+ * appId: "YOUR_APP_ID",
16
+ * })
17
+ * await authenticationClient.social.authorize("github", {
18
+ * onSuccess: (user) => { console.log(user) },
19
+ * onError: (code, message) => { }
20
+ * })
21
+ * \`\`\`
22
+ *
23
+ *
24
+ * @name SocialAuthenticationClient
25
+ */
26
+ export declare class SocialAuthenticationClient {
27
+ options: AuthenticationClientOptions;
28
+ tokenProvider: AuthenticationTokenProvider;
29
+ httpClient: HttpClient;
30
+ baseClient: BaseAuthenticationClient;
31
+ constructor(options: AuthenticationClientOptions, tokenProvider: AuthenticationTokenProvider, httpClient: HttpClient);
32
+ /**
33
+ * @name authorize
34
+ * @name_zh 发送授权登录请求
35
+ * @description 发送授权登录请求,该方法会直接打开一个新窗口,跳转到第三方社会化登录服务商(如 GitHub、微信、钉钉等)的登录授权页面,用户
36
+ * 完成授权之后,会自动关闭此窗口,并触发 onSuccess 回调函数,通过此函数,你可以获取到用户信息。
37
+ *
38
+ * @param {string} provider 社会化登录服务商的标志。
39
+ * @param {object} [options]
40
+ * @param {boolean} [options.popup=true] 是否通过弹窗的方式打开社会化登录窗口,如果设置为 false,将会以 window.open 的方式打开一个新的浏览器 tab 。
41
+ * @param {Function} [options.onSuccess] 用户同意授权事件回调函数,第一个参数为用户信息。
42
+ * @param {Function} [options.onError] 社会化登录失败事件回调函数,第一个参数 code 为错误码,第二个参数 message 为错误提示。详细的错误码列表请见:详细说明请见:[Authing 错误代码列表](https://docs.authing.co/advanced/error-code.html)
43
+ * @param {object} [options.position] 只有当 options.popup 为 ture 的时候有效,弹出窗口的位置,默认为 { w: 585, h: 649 } 。
44
+ * @param {object} [options.authorizationParams] 请求时的额外参数
45
+ *
46
+ * @example
47
+ *
48
+ * // 使用 GitHub 登录
49
+ *
50
+ * const authenticationClient = new AuthenticationClient({
51
+ * appId: "YOUR_APP_ID",
52
+ * })
53
+ *
54
+ * await authenticationClient.social.authorize("github", {
55
+ * onSuccess: (user) => { console.log(user) },
56
+ * onError: (code, message) => { },
57
+ * // 自定义弹出窗口的位置
58
+ * position: {
59
+ * w: 100,
60
+ * h: 100
61
+ * }
62
+ * })
63
+ *
64
+ * @example
65
+ *
66
+ * // 使用新建浏览器 tab 的形式打开社会化登录页面
67
+ *
68
+ * const authenticationClient = new AuthenticationClient({
69
+ * appId: "YOUR_APP_ID",
70
+ * })
71
+ *
72
+ * await authenticationClient.social.authorize("github", {
73
+ * popup: false,
74
+ * onSuccess: (user) => { console.log(user) },
75
+ * onError: (code, message) => { },
76
+ * })
77
+ *
78
+ * @memberof SocialAuthenticationClient
79
+ */
80
+ authorize(provider: string, options?: {
81
+ popup?: boolean;
82
+ onSuccess?: (user: User) => void;
83
+ onError?: (code: number, message: string) => void;
84
+ position?: {
85
+ w: number;
86
+ h: number;
87
+ };
88
+ authorization_params?: Record<string, any>;
89
+ authorizationParams?: Record<string, any>;
90
+ context?: {
91
+ [x: string]: any;
92
+ };
93
+ /**
94
+ * @description 将会写入配置的用户自定义字段
95
+ */
96
+ customData?: {
97
+ [x: string]: any;
98
+ };
99
+ }): Promise<void>;
100
+ }
@@ -0,0 +1,176 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (_) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { objectToQueryString, popupCenter, isWechatBrowser, } from '../utils';
38
+ import { BaseAuthenticationClient } from './BaseAuthenticationClient';
39
+ /**
40
+ * @class SocialAuthenticationClient 社会化登录模块
41
+ * @description 此模块封装了社会化登录的功能,可以通过简洁的 API 快速使用社会化登录获取用户信息。
42
+ *
43
+ * 发起社会化登录授权请求:
44
+ *
45
+ * \`\`\`javascript
46
+ * import { AuthenticationClient } from "authing-js-sdk"
47
+ * const authenticationClient = new AuthenticationClient({
48
+ * appId: "YOUR_APP_ID",
49
+ * })
50
+ * await authenticationClient.social.authorize("github", {
51
+ * onSuccess: (user) => { console.log(user) },
52
+ * onError: (code, message) => { }
53
+ * })
54
+ * \`\`\`
55
+ *
56
+ *
57
+ * @name SocialAuthenticationClient
58
+ */
59
+ var SocialAuthenticationClient = /** @class */ (function () {
60
+ function SocialAuthenticationClient(options, tokenProvider, httpClient) {
61
+ this.options = options;
62
+ this.tokenProvider = tokenProvider;
63
+ this.httpClient = httpClient;
64
+ this.baseClient = new BaseAuthenticationClient(options);
65
+ }
66
+ /**
67
+ * @name authorize
68
+ * @name_zh 发送授权登录请求
69
+ * @description 发送授权登录请求,该方法会直接打开一个新窗口,跳转到第三方社会化登录服务商(如 GitHub、微信、钉钉等)的登录授权页面,用户
70
+ * 完成授权之后,会自动关闭此窗口,并触发 onSuccess 回调函数,通过此函数,你可以获取到用户信息。
71
+ *
72
+ * @param {string} provider 社会化登录服务商的标志。
73
+ * @param {object} [options]
74
+ * @param {boolean} [options.popup=true] 是否通过弹窗的方式打开社会化登录窗口,如果设置为 false,将会以 window.open 的方式打开一个新的浏览器 tab 。
75
+ * @param {Function} [options.onSuccess] 用户同意授权事件回调函数,第一个参数为用户信息。
76
+ * @param {Function} [options.onError] 社会化登录失败事件回调函数,第一个参数 code 为错误码,第二个参数 message 为错误提示。详细的错误码列表请见:详细说明请见:[Authing 错误代码列表](https://docs.authing.co/advanced/error-code.html)
77
+ * @param {object} [options.position] 只有当 options.popup 为 ture 的时候有效,弹出窗口的位置,默认为 { w: 585, h: 649 } 。
78
+ * @param {object} [options.authorizationParams] 请求时的额外参数
79
+ *
80
+ * @example
81
+ *
82
+ * // 使用 GitHub 登录
83
+ *
84
+ * const authenticationClient = new AuthenticationClient({
85
+ * appId: "YOUR_APP_ID",
86
+ * })
87
+ *
88
+ * await authenticationClient.social.authorize("github", {
89
+ * onSuccess: (user) => { console.log(user) },
90
+ * onError: (code, message) => { },
91
+ * // 自定义弹出窗口的位置
92
+ * position: {
93
+ * w: 100,
94
+ * h: 100
95
+ * }
96
+ * })
97
+ *
98
+ * @example
99
+ *
100
+ * // 使用新建浏览器 tab 的形式打开社会化登录页面
101
+ *
102
+ * const authenticationClient = new AuthenticationClient({
103
+ * appId: "YOUR_APP_ID",
104
+ * })
105
+ *
106
+ * await authenticationClient.social.authorize("github", {
107
+ * popup: false,
108
+ * onSuccess: (user) => { console.log(user) },
109
+ * onError: (code, message) => { },
110
+ * })
111
+ *
112
+ * @memberof SocialAuthenticationClient
113
+ */
114
+ SocialAuthenticationClient.prototype.authorize = function (provider, options) {
115
+ return __awaiter(this, void 0, void 0, function () {
116
+ var position, _a, popup, onSuccess, onError, authorization_params, authorizationParams, context, customData, query, url, onMessage;
117
+ var _this = this;
118
+ return __generator(this, function (_b) {
119
+ options = options || {};
120
+ position = options.position, _a = options.popup, popup = _a === void 0 ? true : _a, onSuccess = options.onSuccess, onError = options.onError, authorization_params = options.authorization_params, authorizationParams = options.authorizationParams, context = options.context, customData = options.customData;
121
+ query = {
122
+ from_guard: '1',
123
+ app_id: this.options.appId,
124
+ authorization_params: JSON.stringify(authorization_params || authorizationParams)
125
+ };
126
+ if (context) {
127
+ query.context = JSON.stringify(context);
128
+ }
129
+ if (customData) {
130
+ query.custom_data = JSON.stringify(customData);
131
+ }
132
+ url = this.baseClient.appHost + "/connections/social/" + provider + objectToQueryString(query);
133
+ onMessage = function (e) {
134
+ var _a = e.data, code = _a.code, message = _a.message, userInfo = _a.data, event = _a.event;
135
+ event = event || {};
136
+ var source = event.source, eventType = event.eventType;
137
+ if (source !== 'authing' || eventType !== 'socialLogin') {
138
+ return;
139
+ }
140
+ try {
141
+ var parsedMsg = JSON.parse(message);
142
+ message = parsedMsg.message;
143
+ code = parsedMsg.code;
144
+ }
145
+ catch (e) {
146
+ // do nothing...
147
+ }
148
+ if (code === 200) {
149
+ // 保存用户的 token
150
+ _this.tokenProvider.setUser(userInfo);
151
+ onSuccess && onSuccess(userInfo);
152
+ }
153
+ else {
154
+ onError && onError(code, message);
155
+ }
156
+ window.removeEventListener('message', onMessage);
157
+ };
158
+ window.addEventListener('message', onMessage);
159
+ if (isWechatBrowser()) {
160
+ // 在微信内直接打开
161
+ window.location.href = url;
162
+ }
163
+ else if (popup) {
164
+ popupCenter(url, position);
165
+ }
166
+ else {
167
+ window.open(url);
168
+ }
169
+ return [2 /*return*/];
170
+ });
171
+ });
172
+ };
173
+ return SocialAuthenticationClient;
174
+ }());
175
+ export { SocialAuthenticationClient };
176
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU29jaWFsQXV0aGVudGljYXRpb25DbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL2F1dGhlbnRpY2F0aW9uL1NvY2lhbEF1dGhlbnRpY2F0aW9uQ2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUdBLE9BQU8sRUFDTCxtQkFBbUIsRUFDbkIsV0FBVyxFQUNYLGVBQWUsR0FDaEIsTUFBTSxVQUFVLENBQUM7QUFFbEIsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFdEU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFDSDtJQU1FLG9DQUNFLE9BQW9DLEVBQ3BDLGFBQTBDLEVBQzFDLFVBQXNCO1FBRXRCLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxhQUFhLEdBQUcsYUFBYSxDQUFDO1FBQ25DLElBQUksQ0FBQyxVQUFVLEdBQUcsVUFBVSxDQUFDO1FBQzdCLElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSx3QkFBd0IsQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUMxRCxDQUFDO0lBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O09BK0NHO0lBQ0csOENBQVMsR0FBZixVQUNFLFFBQWdCLEVBQ2hCLE9BZUM7Ozs7O2dCQUVELE9BQU8sR0FBRyxPQUFPLElBQUksRUFBRSxDQUFDO2dCQUV0QixRQUFRLEdBUU4sT0FBTyxTQVJELEVBQ1IsS0FPRSxPQUFPLE1BUEcsRUFBWixLQUFLLG1CQUFHLElBQUksS0FBQSxFQUNaLFNBQVMsR0FNUCxPQUFPLFVBTkEsRUFDVCxPQUFPLEdBS0wsT0FBTyxRQUxGLEVBQ1Asb0JBQW9CLEdBSWxCLE9BQU8scUJBSlcsRUFDcEIsbUJBQW1CLEdBR2pCLE9BQU8sb0JBSFUsRUFDbkIsT0FBTyxHQUVMLE9BQU8sUUFGRixFQUNQLFVBQVUsR0FDUixPQUFPLFdBREMsQ0FDQTtnQkFDTixLQUFLLEdBQTJCO29CQUNwQyxVQUFVLEVBQUUsR0FBRztvQkFDZixNQUFNLEVBQUUsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLO29CQUMxQixvQkFBb0IsRUFBRSxJQUFJLENBQUMsU0FBUyxDQUNsQyxvQkFBb0IsSUFBSSxtQkFBbUIsQ0FDNUM7aUJBQ0YsQ0FBQztnQkFDRixJQUFJLE9BQU8sRUFBRTtvQkFDWCxLQUFLLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7aUJBQ3pDO2dCQUNELElBQUksVUFBVSxFQUFFO29CQUNkLEtBQUssQ0FBQyxXQUFXLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQyxVQUFVLENBQUMsQ0FBQztpQkFDaEQ7Z0JBQ0ssR0FBRyxHQUNQLElBQUksQ0FBQyxVQUFVLENBQUMsT0FBTyw0QkFDRixRQUFRLEdBQUcsbUJBQW1CLENBQUMsS0FBSyxDQUFHLENBQUM7Z0JBQ3pELFNBQVMsR0FBRyxVQUFDLENBQWU7b0JBQzVCLElBQUEsS0FBMkMsQ0FBQyxDQUFDLElBQUksRUFBL0MsSUFBSSxVQUFBLEVBQUUsT0FBTyxhQUFBLEVBQVEsUUFBUSxVQUFBLEVBQUUsS0FBSyxXQUFXLENBQUM7b0JBQ3RELEtBQUssR0FBRyxLQUFLLElBQUksRUFBRSxDQUFDO29CQUNaLElBQUEsTUFBTSxHQUFnQixLQUFLLE9BQXJCLEVBQUUsU0FBUyxHQUFLLEtBQUssVUFBVixDQUFXO29CQUNwQyxJQUFJLE1BQU0sS0FBSyxTQUFTLElBQUksU0FBUyxLQUFLLGFBQWEsRUFBRTt3QkFDdkQsT0FBTztxQkFDUjtvQkFFRCxJQUFJO3dCQUNGLElBQU0sU0FBUyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7d0JBQ3RDLE9BQU8sR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFDO3dCQUM1QixJQUFJLEdBQUcsU0FBUyxDQUFDLElBQUksQ0FBQztxQkFDdkI7b0JBQUMsT0FBTyxDQUFDLEVBQUU7d0JBQ1YsZ0JBQWdCO3FCQUNqQjtvQkFDRCxJQUFJLElBQUksS0FBSyxHQUFHLEVBQUU7d0JBQ2hCLGNBQWM7d0JBQ2QsS0FBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7d0JBQ3JDLFNBQVMsSUFBSSxTQUFTLENBQUMsUUFBUSxDQUFDLENBQUM7cUJBQ2xDO3lCQUFNO3dCQUNMLE9BQU8sSUFBSSxPQUFPLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDO3FCQUNuQztvQkFDRCxNQUFNLENBQUMsbUJBQW1CLENBQUMsU0FBUyxFQUFFLFNBQVMsQ0FBQyxDQUFDO2dCQUNuRCxDQUFDLENBQUM7Z0JBQ0YsTUFBTSxDQUFDLGdCQUFnQixDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQztnQkFFOUMsSUFBSSxlQUFlLEVBQUUsRUFBRTtvQkFDckIsV0FBVztvQkFDWCxNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUM7aUJBQzVCO3FCQUFNLElBQUksS0FBSyxFQUFFO29CQUNoQixXQUFXLENBQUMsR0FBRyxFQUFFLFFBQVEsQ0FBQyxDQUFDO2lCQUM1QjtxQkFBTTtvQkFDTCxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO2lCQUNsQjs7OztLQUNGO0lBQ0gsaUNBQUM7QUFBRCxDQUFDLEFBbEpELElBa0pDIn0=
@@ -0,0 +1,331 @@
1
+ import { GraphqlClient } from '../common/GraphqlClient';
2
+ import { HttpClient } from '../common/HttpClient';
3
+ import { AuthenticationTokenProvider } from './AuthenticationTokenProvider';
4
+ import { Lang } from '../../types';
5
+ /**
6
+ * 初始化 AuthenticationClientOptions 的参数
7
+ */
8
+ export interface AuthenticationClientOptions {
9
+ /** 应用 ID */
10
+ appId: string;
11
+ /** 应用完整域名,如 https://sample-app.authing.cn,不带最后的斜线 '/'。 */
12
+ appHost?: string;
13
+ /** 应用密钥 */
14
+ secret?: string;
15
+ /** 应用身份协议 */
16
+ protocol?: 'oauth' | 'oidc' | 'saml' | 'cas';
17
+ /** 获取 token 端点认证方式 */
18
+ tokenEndPointAuthMethod?: 'client_secret_post' | 'client_secret_basic' | 'none';
19
+ /** 检查 token 端点认证方式 */
20
+ introspectionEndPointAuthMethod?: 'client_secret_post' | 'client_secret_basic' | 'none';
21
+ /** 撤回 token 端点认证方式 */
22
+ revocationEndPointAuthMethod?: 'client_secret_post' | 'client_secret_basic' | 'none';
23
+ /** 应用回调地址 */
24
+ redirectUri?: string;
25
+ /** 请求超时时间 **/
26
+ timeout?: number;
27
+ /** 错误回调函数, 默认为 (err: Error) => { throw err } 直接抛出报错 **/
28
+ onError?: (code: number, message: string, data?: any) => void;
29
+ /** Websocket 服务器域名 */
30
+ websocketHost?: string;
31
+ /** 请求来源 */
32
+ requestFrom?: string;
33
+ /** token */
34
+ token?: string;
35
+ /** 加密函数 */
36
+ encryptFunction?: (plainText: string, publicKey: string) => Promise<string>;
37
+ /** 密码传输加密公钥 */
38
+ publicKey?: string;
39
+ httpClient?: typeof HttpClient;
40
+ graphqlClient?: typeof GraphqlClient;
41
+ tokenProvider?: typeof AuthenticationTokenProvider;
42
+ /**
43
+ * 语言
44
+ */
45
+ lang?: Lang;
46
+ /**
47
+ * @deprecated 该参数已经废弃,请使用 appHost
48
+ */
49
+ host?: string;
50
+ /**
51
+ * @deprecated 该参数已经废弃,请使用 appHost
52
+ */
53
+ domain?: string;
54
+ }
55
+ export interface QRCodeUserInfo {
56
+ nickname: string;
57
+ photo: string;
58
+ id?: string;
59
+ email?: string;
60
+ emailVerified?: boolean;
61
+ unionid?: string;
62
+ openid?: string;
63
+ oauth?: string;
64
+ registerMethod?: string;
65
+ username?: string;
66
+ company?: string;
67
+ token?: string;
68
+ phone?: string;
69
+ tokenExpiredAt?: string;
70
+ loginsCount?: number;
71
+ lastIP?: string;
72
+ signedUp?: string;
73
+ blocked?: boolean;
74
+ isDeleted?: boolean;
75
+ }
76
+ export interface QRCodeStatus {
77
+ random: string;
78
+ /** 二维码状态: 0 - 未使用, 1 - 已扫码, 2 - 已授权, 3 - 取消授权, -1 - 已过期 */
79
+ status: number;
80
+ ticket?: string;
81
+ userInfo?: QRCodeUserInfo;
82
+ }
83
+ export interface QRCodeGenarateResult {
84
+ random: string;
85
+ url: string;
86
+ }
87
+ export declare type IMfaAuthenticators = Array<{
88
+ id: string;
89
+ createdAt: string;
90
+ updatedAt: string;
91
+ userId: string;
92
+ enable: boolean;
93
+ secret: string;
94
+ authenticatorType: string;
95
+ recoveryCode: string;
96
+ }>;
97
+ export declare type IMfaAssociation = {
98
+ authenticator_type: string;
99
+ secret: string;
100
+ qrcode_uri: string;
101
+ qrcode_data_url: string;
102
+ recovery_code: string;
103
+ };
104
+ export declare type IMfaConfirmAssociation = {
105
+ code: number;
106
+ message: string;
107
+ };
108
+ export declare type IMfaDeleteAssociation = {
109
+ code: number;
110
+ message: string;
111
+ };
112
+ /**
113
+ * 密码安全等级
114
+ */
115
+ export declare enum PasswordSecurityLevel {
116
+ LOW = 1,
117
+ MIDDLE = 2,
118
+ HIGH = 3
119
+ }
120
+ export interface SecurityLevel {
121
+ email: boolean;
122
+ mfa: boolean;
123
+ password: boolean;
124
+ phone: boolean;
125
+ passwordSecurityLevel: PasswordSecurityLevel | null;
126
+ score: number;
127
+ }
128
+ export declare enum SocialConnectionProvider {
129
+ ALIPAY = "alipay",
130
+ GOOGLE = "google",
131
+ WECHATPC = "wechat:pc",
132
+ WECHATMP = "wechat:webpage-authorization",
133
+ WECHAT_MINIPROGRAM = "wechat:miniprogram:default",
134
+ WECHAT_MINIPROGRAM_QRCODE = "wechat:miniprogram:qrconnect",
135
+ WECHAT_MINIPROGRAM_APPLAUNCH = "wechat:miniprogram:app-launch",
136
+ WECHATMOBILE = "wechat:mobile",
137
+ GITHUB = "github",
138
+ QQ = "qq",
139
+ WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
140
+ WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
141
+ WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
142
+ DINGTALK = "dingtalk",
143
+ WEIBO = "weibo",
144
+ APPLE = "apple",
145
+ APPLE_WEB = "apple:web",
146
+ OAUTH = "oauth",
147
+ BAIDU = "baidu"
148
+ }
149
+ export declare enum Protocol {
150
+ OIDC = "oidc",
151
+ OAUTH = "oauth",
152
+ SAML = "saml",
153
+ CAS = "cas",
154
+ AZURE_AD = "azure-ad"
155
+ }
156
+ export declare enum AppPasswordStrengthLimit {
157
+ NoCheck = 0,
158
+ Low = 1,
159
+ Middle = 2,
160
+ High = 3
161
+ }
162
+ export declare enum RegisterMethods {
163
+ Email = "email",
164
+ Phone = "phone"
165
+ }
166
+ export declare enum LoginMethods {
167
+ LDAP = "ldap",
168
+ AppQr = "app-qrcode",
169
+ Password = "password",
170
+ PhoneCode = "phone-code",
171
+ WxMinQr = "wechat-miniprogram-qrcode",
172
+ AD = "ad"
173
+ }
174
+ export interface IOAuthConnectionConfig {
175
+ authEndPoint: string;
176
+ tokenEndPoint: string;
177
+ scope: string;
178
+ clientId: string;
179
+ clientSecret: string;
180
+ authUrlTemplate: string;
181
+ codeToTokenScript: string;
182
+ tokenToUserInfoScript: string;
183
+ tokenToUserInfoScriptFuncId: string;
184
+ codeToTokenScriptFuncId: string;
185
+ authUrl?: string;
186
+ }
187
+ export interface ISamlConnectionConfig {
188
+ signInEndPoint: string;
189
+ samlRequest?: string;
190
+ samlIdpCert: string;
191
+ samlSpCert: string;
192
+ samlSpKey: string;
193
+ signOutEndPoint: string;
194
+ signSamlRequest: boolean;
195
+ signatureAlgorithm: string;
196
+ digestAlgorithm: string;
197
+ protocolBinding: string;
198
+ }
199
+ export interface ICasConnectionConfig {
200
+ casConnectionLoginUrl: string;
201
+ }
202
+ export declare enum OIDCConnectionMode {
203
+ FRONT_CHANNEL = "FRONT_CHANNEL",
204
+ BACK_CHANNEL = "BACK_CHANNEL"
205
+ }
206
+ export interface IAzureAdConnectionConfig {
207
+ microsoftAzureAdDomain: string;
208
+ clientId: string;
209
+ syncUserProfileOnLogin: string;
210
+ emailVerifiedDefault: boolean;
211
+ authorizationUrl: string;
212
+ callbackUrl: string;
213
+ }
214
+ export interface OIDCConnectionConfig {
215
+ issuerUrl: string;
216
+ authorizationEdpoint: string;
217
+ responseType: string;
218
+ mode: OIDCConnectionMode;
219
+ clientId: string;
220
+ clientSecret: string;
221
+ scopes: string;
222
+ redirectUri: string;
223
+ }
224
+ export interface ApplicationConfig {
225
+ id: string;
226
+ cdnBase: string;
227
+ userPoolId: string;
228
+ rootUserPoolId: string;
229
+ publicKey: string;
230
+ passwordStrength: AppPasswordStrengthLimit;
231
+ css: string;
232
+ name: string;
233
+ logo: string;
234
+ redirectUris: string[];
235
+ registerDisabled: boolean;
236
+ registerTabs: {
237
+ list: RegisterMethods[];
238
+ default: string;
239
+ title: {
240
+ [x: string]: string;
241
+ };
242
+ };
243
+ loginTabs: {
244
+ list: LoginMethods[];
245
+ default: string;
246
+ title: {
247
+ [x: string]: string;
248
+ };
249
+ };
250
+ socialConnections: {
251
+ provider: string;
252
+ name: string;
253
+ authorizationUrl: string;
254
+ }[];
255
+ agreementEnabled: boolean;
256
+ extendsFieldsEnabled: boolean;
257
+ identityProviders: {
258
+ identifier: string;
259
+ protocol: Protocol;
260
+ displayName: string;
261
+ logo: string;
262
+ config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
263
+ }[];
264
+ ssoPageComponentDisplay: {
265
+ autoRegisterThenLoginHintInfo: boolean;
266
+ forgetPasswordBtn: boolean;
267
+ idpBtns: boolean;
268
+ loginBtn: boolean;
269
+ loginByPhoneCodeTab: boolean;
270
+ loginByUserPasswordTab: boolean;
271
+ loginMethodNav: boolean;
272
+ phoneCodeInput: boolean;
273
+ registerBtn: boolean;
274
+ registerByEmailTab: boolean;
275
+ registerByPhoneTab: boolean;
276
+ registerMethodNav: boolean;
277
+ socialLoginBtns: boolean;
278
+ userPasswordInput: boolean;
279
+ wxMpScanTab: boolean;
280
+ };
281
+ protocol: Protocol;
282
+ oidcConfig: OidcClientMetadata;
283
+ enableSubAccount: boolean;
284
+ userPoolInWhitelist: boolean;
285
+ userPortal: UserPortalConfig;
286
+ /** websocket 域名*/
287
+ websocket: string;
288
+ verifyCodeLength: number;
289
+ }
290
+ export interface OidcClientMetadata {
291
+ grant_types: string[];
292
+ client_id: string;
293
+ redirect_uris: string[];
294
+ scope: string;
295
+ response_types: ResponseType[];
296
+ }
297
+ export interface UserPortalConfig {
298
+ cdnBase: string;
299
+ assetsBase: string;
300
+ assetsVersion: string;
301
+ icpRecord: string;
302
+ psbRecord: string;
303
+ }
304
+ export interface IOidcParams {
305
+ appId?: string;
306
+ redirectUri?: string;
307
+ responseType?: 'code' | 'code id_token token' | 'code id_token' | 'code token' | 'id_token token' | 'id_token' | 'none';
308
+ responseMode?: 'query' | 'fragment' | 'form_post';
309
+ state?: string;
310
+ nonce?: string;
311
+ scope?: string;
312
+ codeChallengeMethod?: 'plain' | 'S256';
313
+ codeChallenge?: string;
314
+ }
315
+ export interface IOauthParams {
316
+ appId?: string;
317
+ redirectUri?: string;
318
+ responseType?: 'code' | 'token';
319
+ state?: string;
320
+ scope?: string;
321
+ }
322
+ export interface ILogoutParams {
323
+ expert?: boolean;
324
+ redirectUri?: string;
325
+ idToken?: string;
326
+ }
327
+ export interface ICasParams {
328
+ service?: string;
329
+ }
330
+ export declare type TotpSource = 'APPLICATION' | 'SELF';
331
+ export declare type ProviderType = 'wechat:pc' | 'github' | 'google' | 'qq' | 'apple' | 'baidu' | 'alipay' | 'lark:app-store' | 'lark:custom-app' | 'weibo' | 'dingtalk' | 'wechat:webpage-authorization' | 'alipay' | 'wechat:miniprogram:default' | 'wechat:mobile' | 'wechatwork:service-provider:authorization' | 'wechatwork:service-provider:qrconnect' | 'wechatwork:corp:qrconnect' | 'wechat:miniprogram:app-launch' | 'wechat:miniprogram:qrconnect';
@@ -0,0 +1,66 @@
1
+ /**
2
+ * 密码安全等级
3
+ */
4
+ export var PasswordSecurityLevel;
5
+ (function (PasswordSecurityLevel) {
6
+ PasswordSecurityLevel[PasswordSecurityLevel["LOW"] = 1] = "LOW";
7
+ PasswordSecurityLevel[PasswordSecurityLevel["MIDDLE"] = 2] = "MIDDLE";
8
+ PasswordSecurityLevel[PasswordSecurityLevel["HIGH"] = 3] = "HIGH";
9
+ })(PasswordSecurityLevel || (PasswordSecurityLevel = {}));
10
+ export var SocialConnectionProvider;
11
+ (function (SocialConnectionProvider) {
12
+ SocialConnectionProvider["ALIPAY"] = "alipay";
13
+ SocialConnectionProvider["GOOGLE"] = "google";
14
+ SocialConnectionProvider["WECHATPC"] = "wechat:pc";
15
+ SocialConnectionProvider["WECHATMP"] = "wechat:webpage-authorization";
16
+ SocialConnectionProvider["WECHAT_MINIPROGRAM"] = "wechat:miniprogram:default";
17
+ SocialConnectionProvider["WECHAT_MINIPROGRAM_QRCODE"] = "wechat:miniprogram:qrconnect";
18
+ SocialConnectionProvider["WECHAT_MINIPROGRAM_APPLAUNCH"] = "wechat:miniprogram:app-launch";
19
+ SocialConnectionProvider["WECHATMOBILE"] = "wechat:mobile";
20
+ SocialConnectionProvider["GITHUB"] = "github";
21
+ SocialConnectionProvider["QQ"] = "qq";
22
+ SocialConnectionProvider["WECHATWORK_ADDRESS_BOOK"] = "wechatwork:addressbook";
23
+ SocialConnectionProvider["WECHATWORK_CORP_QRCONNECT"] = "wechatwork:corp:qrconnect";
24
+ SocialConnectionProvider["WECHATWORK_SERVICEPROVIDER_QRCONNECT"] = "wechatwork:service-provider:qrconnect";
25
+ SocialConnectionProvider["DINGTALK"] = "dingtalk";
26
+ SocialConnectionProvider["WEIBO"] = "weibo";
27
+ SocialConnectionProvider["APPLE"] = "apple";
28
+ SocialConnectionProvider["APPLE_WEB"] = "apple:web";
29
+ SocialConnectionProvider["OAUTH"] = "oauth";
30
+ SocialConnectionProvider["BAIDU"] = "baidu";
31
+ })(SocialConnectionProvider || (SocialConnectionProvider = {}));
32
+ export var Protocol;
33
+ (function (Protocol) {
34
+ Protocol["OIDC"] = "oidc";
35
+ Protocol["OAUTH"] = "oauth";
36
+ Protocol["SAML"] = "saml";
37
+ Protocol["CAS"] = "cas";
38
+ Protocol["AZURE_AD"] = "azure-ad";
39
+ })(Protocol || (Protocol = {}));
40
+ export var AppPasswordStrengthLimit;
41
+ (function (AppPasswordStrengthLimit) {
42
+ AppPasswordStrengthLimit[AppPasswordStrengthLimit["NoCheck"] = 0] = "NoCheck";
43
+ AppPasswordStrengthLimit[AppPasswordStrengthLimit["Low"] = 1] = "Low";
44
+ AppPasswordStrengthLimit[AppPasswordStrengthLimit["Middle"] = 2] = "Middle";
45
+ AppPasswordStrengthLimit[AppPasswordStrengthLimit["High"] = 3] = "High";
46
+ })(AppPasswordStrengthLimit || (AppPasswordStrengthLimit = {}));
47
+ export var RegisterMethods;
48
+ (function (RegisterMethods) {
49
+ RegisterMethods["Email"] = "email";
50
+ RegisterMethods["Phone"] = "phone";
51
+ })(RegisterMethods || (RegisterMethods = {}));
52
+ export var LoginMethods;
53
+ (function (LoginMethods) {
54
+ LoginMethods["LDAP"] = "ldap";
55
+ LoginMethods["AppQr"] = "app-qrcode";
56
+ LoginMethods["Password"] = "password";
57
+ LoginMethods["PhoneCode"] = "phone-code";
58
+ LoginMethods["WxMinQr"] = "wechat-miniprogram-qrcode";
59
+ LoginMethods["AD"] = "ad"; // 对应企业身份源的 Windows AD 登录
60
+ })(LoginMethods || (LoginMethods = {}));
61
+ export var OIDCConnectionMode;
62
+ (function (OIDCConnectionMode) {
63
+ OIDCConnectionMode["FRONT_CHANNEL"] = "FRONT_CHANNEL";
64
+ OIDCConnectionMode["BACK_CHANNEL"] = "BACK_CHANNEL";
65
+ })(OIDCConnectionMode || (OIDCConnectionMode = {}));
66
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGliL2F1dGhlbnRpY2F0aW9uL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9JQTs7R0FFRztBQUNILE1BQU0sQ0FBTixJQUFZLHFCQUlYO0FBSkQsV0FBWSxxQkFBcUI7SUFDL0IsK0RBQU8sQ0FBQTtJQUNQLHFFQUFVLENBQUE7SUFDVixpRUFBUSxDQUFBO0FBQ1YsQ0FBQyxFQUpXLHFCQUFxQixLQUFyQixxQkFBcUIsUUFJaEM7QUFnQkQsTUFBTSxDQUFOLElBQVksd0JBb0JYO0FBcEJELFdBQVksd0JBQXdCO0lBQ2xDLDZDQUFpQixDQUFBO0lBQ2pCLDZDQUFpQixDQUFBO0lBQ2pCLGtEQUFzQixDQUFBO0lBQ3RCLHFFQUF5QyxDQUFBO0lBQ3pDLDZFQUFpRCxDQUFBO0lBQ2pELHNGQUEwRCxDQUFBO0lBQzFELDBGQUE4RCxDQUFBO0lBQzlELDBEQUE4QixDQUFBO0lBQzlCLDZDQUFpQixDQUFBO0lBQ2pCLHFDQUFTLENBQUE7SUFDVCw4RUFBa0QsQ0FBQTtJQUNsRCxtRkFBdUQsQ0FBQTtJQUN2RCwwR0FBOEUsQ0FBQTtJQUM5RSxpREFBcUIsQ0FBQTtJQUNyQiwyQ0FBZSxDQUFBO0lBQ2YsMkNBQWUsQ0FBQTtJQUNmLG1EQUF1QixDQUFBO0lBQ3ZCLDJDQUFlLENBQUE7SUFDZiwyQ0FBZSxDQUFBO0FBQ2pCLENBQUMsRUFwQlcsd0JBQXdCLEtBQXhCLHdCQUF3QixRQW9CbkM7QUFFRCxNQUFNLENBQU4sSUFBWSxRQU1YO0FBTkQsV0FBWSxRQUFRO0lBQ2xCLHlCQUFhLENBQUE7SUFDYiwyQkFBZSxDQUFBO0lBQ2YseUJBQWEsQ0FBQTtJQUNiLHVCQUFXLENBQUE7SUFDWCxpQ0FBcUIsQ0FBQTtBQUN2QixDQUFDLEVBTlcsUUFBUSxLQUFSLFFBQVEsUUFNbkI7QUFFRCxNQUFNLENBQU4sSUFBWSx3QkFLWDtBQUxELFdBQVksd0JBQXdCO0lBQ2xDLDZFQUFPLENBQUE7SUFDUCxxRUFBRyxDQUFBO0lBQ0gsMkVBQU0sQ0FBQTtJQUNOLHVFQUFJLENBQUE7QUFDTixDQUFDLEVBTFcsd0JBQXdCLEtBQXhCLHdCQUF3QixRQUtuQztBQUVELE1BQU0sQ0FBTixJQUFZLGVBR1g7QUFIRCxXQUFZLGVBQWU7SUFDekIsa0NBQWUsQ0FBQTtJQUNmLGtDQUFlLENBQUE7QUFDakIsQ0FBQyxFQUhXLGVBQWUsS0FBZixlQUFlLFFBRzFCO0FBRUQsTUFBTSxDQUFOLElBQVksWUFPWDtBQVBELFdBQVksWUFBWTtJQUN0Qiw2QkFBYSxDQUFBO0lBQ2Isb0NBQW9CLENBQUE7SUFDcEIscUNBQXFCLENBQUE7SUFDckIsd0NBQXdCLENBQUE7SUFDeEIscURBQXFDLENBQUE7SUFDckMseUJBQVMsQ0FBQSxDQUFDLHlCQUF5QjtBQUNyQyxDQUFDLEVBUFcsWUFBWSxLQUFaLFlBQVksUUFPdkI7QUE4Q0QsTUFBTSxDQUFOLElBQVksa0JBR1g7QUFIRCxXQUFZLGtCQUFrQjtJQUM1QixxREFBK0IsQ0FBQTtJQUMvQixtREFBNkIsQ0FBQTtBQUMvQixDQUFDLEVBSFcsa0JBQWtCLEtBQWxCLGtCQUFrQixRQUc3QiJ9