authing_ruby 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/authing_ruby.gemspec +30 -0
- data/lib/authing_ruby/GraphQLAPI.rb +151 -0
- data/lib/authing_ruby/authentication/AuthenticationClient.rb +801 -0
- data/lib/authing_ruby/authentication/AuthenticationTokenProvider.rb +42 -0
- data/lib/authing_ruby/authentication/BaseAuthenticationClient.rb +28 -0
- data/lib/authing_ruby/common/GraphqlClient.rb +39 -0
- data/lib/authing_ruby/common/HttpClient.rb +247 -0
- data/lib/authing_ruby/common/PublicKeyManager.rb +42 -0
- data/lib/authing_ruby/graphql/mutations/bindPhone.gql +53 -0
- data/lib/authing_ruby/graphql/mutations/createUser.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/deleteUser.gql +6 -0
- data/lib/authing_ruby/graphql/mutations/deleteUsers.gql +6 -0
- data/lib/authing_ruby/graphql/mutations/loginByEmail.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/loginByPhoneCode.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/loginByPhonePassword.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/loginByUsername.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/refreshAccessToken.gql +7 -0
- data/lib/authing_ruby/graphql/mutations/registerByEmail.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/registerByPhoneCode.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/registerByUsername.gql +54 -0
- data/lib/authing_ruby/graphql/mutations/resetPassword.gql +6 -0
- data/lib/authing_ruby/graphql/mutations/sendEmail.gql +6 -0
- data/lib/authing_ruby/graphql/mutations/updatePassword.gql +53 -0
- data/lib/authing_ruby/graphql/mutations/updateUser.gql +54 -0
- data/lib/authing_ruby/graphql/queries/accessToken.gql +7 -0
- data/lib/authing_ruby/graphql/queries/checkLoginStatus.gql +14 -0
- data/lib/authing_ruby/graphql/queries/checkPasswordStrength.gql +6 -0
- data/lib/authing_ruby/graphql/queries/findUser.gql +64 -0
- data/lib/authing_ruby/graphql/queries/isUserExists.gql +13 -0
- data/lib/authing_ruby/graphql/queries/user.gql +63 -0
- data/lib/authing_ruby/graphql/queries/users.gql +57 -0
- data/lib/authing_ruby/management/AclManagementClient.rb +47 -0
- data/lib/authing_ruby/management/ApplicationsManagementClient.rb +79 -0
- data/lib/authing_ruby/management/ManagementClient.rb +66 -0
- data/lib/authing_ruby/management/ManagementTokenProvider.rb +92 -0
- data/lib/authing_ruby/management/RolesManagementClient.rb +38 -0
- data/lib/authing_ruby/management/UserpoolManagementClient.rb +15 -0
- data/lib/authing_ruby/management/UsersManagementClient.rb +161 -0
- data/lib/authing_ruby/management/WhitelistManagementClient.rb +1 -0
- data/lib/authing_ruby/test/RSA.rb +18 -0
- data/lib/authing_ruby/test/helper.rb +15 -0
- data/lib/authing_ruby/test/js_sdk_test/1.buildAuthorizeUrl.js +43 -0
- data/lib/authing_ruby/test/js_sdk_test/2.buildAuthorizeUrl_PKCE.js +47 -0
- data/lib/authing_ruby/test/js_sdk_test/README.md +5 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +23 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +21 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +303 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +2 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +91 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +1078 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +2801 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +56 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +31 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +250 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +665 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +619 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +179 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +331 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +69 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +125 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +149 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +81 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +110 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +1812 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +236 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +863 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +65 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +195 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +216 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +531 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +184 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +386 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +126 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +74 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +190 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +39 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +159 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +488 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +772 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +304 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +512 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +291 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +676 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +56 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +198 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +146 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +264 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +44 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +106 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +142 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +241 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +753 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +1114 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +114 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +259 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +982 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +96 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +30 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +126 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +31 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +67 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +343 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +5 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +5612 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +240 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +8 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +1078 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +2795 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +28 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +247 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +662 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +616 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +176 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +331 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +66 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +119 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +143 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +78 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +110 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +1809 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +236 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +860 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +65 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +192 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +216 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +528 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +184 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +383 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +123 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +74 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +184 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +39 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +153 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +488 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +750 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +304 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +509 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +291 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +673 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +56 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +195 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +146 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +261 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +44 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +103 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +142 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +238 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +753 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +1111 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +114 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +256 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +982 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +93 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +30 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +123 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +31 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +62 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +336 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +2 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +5612 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +237 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +30 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +1078 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +2811 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +13 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +66 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +6 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +41 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +92 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +260 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +303 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +675 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +232 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +629 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +100 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +189 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +331 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +79 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +135 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +159 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +91 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +110 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +1822 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +236 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +873 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +65 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +205 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +216 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +541 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +184 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +396 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +136 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +74 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +200 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +39 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +169 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +488 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +782 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +304 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +522 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +291 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +686 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +56 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +208 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +146 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +274 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +44 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +116 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +142 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +251 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +753 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +1124 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +114 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +269 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +982 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +106 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +30 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +136 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +31 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +77 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +353 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +15 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +5612 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +250 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +13 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +520 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +413 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +709 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +1715 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +157 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +37 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +279 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +180 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +57 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +5 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +94 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +52 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +79 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +42 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +73 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +25 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +97 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +11 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +71 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +27 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +344 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +84 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +155 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +322 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +60 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +129 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +21 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +45 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.node.json +0 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/webpack.config.js +41 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +685 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +800 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +1756 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +161 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +37 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +303 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +179 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +56 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +57 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +5 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +95 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +52 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +79 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +42 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +87 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +25 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +98 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +11 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +70 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +11 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +27 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +351 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +86 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +28 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +24 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +249 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +234 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +35 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +890 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +797 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +6059 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +136 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +149 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +134 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +66 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +143 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +76 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +268 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +80 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +40 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +54 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +38 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +49 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +44 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +40 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +30 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +47 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +145 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +190 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +192 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +139 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +267 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +150 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +80 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +199 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +326 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +83 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +326 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +779 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +304 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +395 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +19 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +368 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +70 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +43 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +195 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +225 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +10 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +186 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +18 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +148 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +14 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +535 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +59 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +107 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +192 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +249 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +2 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +8 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +116 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +186 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +142 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +315 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +51 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +565 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +5 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +64 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +9 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +9778 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +1962 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +76 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +98 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1754 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +10 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +46 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +3 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +76 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +23 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +373 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +7 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +58 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1593 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +69 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +49 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +78 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +21 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +55 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +20 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +125 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +2 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +38 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +33 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +26 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +37 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +16 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +53 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +29 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +46 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +1 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +152 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +21 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +37 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/readme.md +51 -0
- data/lib/authing_ruby/test/js_sdk_test/package-lock.json +177 -0
- data/lib/authing_ruby/test/js_sdk_test/package.json +15 -0
- data/lib/authing_ruby/test/mini_test/TestApplicationsManagementClient.rb +85 -0
- data/lib/authing_ruby/test/mini_test/TestAuthenticationClient.rb +232 -0
- data/lib/authing_ruby/test/mini_test/TestAuthenticationClientProtocal.rb +238 -0
- data/lib/authing_ruby/test/mini_test/TestHttpClient.rb +53 -0
- data/lib/authing_ruby/test/mini_test/TestManagementClient.rb +193 -0
- data/lib/authing_ruby/test/mini_test/TestManagementTokenProvider.rb +49 -0
- data/lib/authing_ruby/test/mini_test/TestNaiveHttpClient.rb +33 -0
- data/lib/authing_ruby/test/mini_test/TestSMSandEmail.rb +101 -0
- data/lib/authing_ruby/test/mini_test/TestUtils.rb +35 -0
- data/lib/authing_ruby/utils/utils.rb +40 -0
- data/lib/authing_ruby/version.rb +6 -0
- data/lib/authing_ruby.rb +14 -0
- metadata +694 -0
@@ -0,0 +1,1078 @@
|
|
1
|
+
import { AuthenticationTokenProvider } from './AuthenticationTokenProvider';
|
2
|
+
import { GraphqlClient } from '../common/GraphqlClient';
|
3
|
+
import { AuthenticationClientOptions, ICasParams, ILogoutParams, IOauthParams, IOidcParams, PasswordSecurityLevel, ProviderType, SecurityLevel } from './types';
|
4
|
+
import { CheckPasswordStrengthResult, CommonMessage, EmailScene, JwtTokenStatus, PaginatedAuthorizedResources, RefreshToken, RegisterProfile, ResourceType, UpdateUserInput, User, UserDefinedData } from '../../types/graphql.v2';
|
5
|
+
import { QrCodeAuthenticationClient } from './QrCodeAuthenticationClient';
|
6
|
+
import { MfaAuthenticationClient } from './MfaAuthenticationClient';
|
7
|
+
import { HttpClient, NaiveHttpClient } from '../common/HttpClient';
|
8
|
+
import { SocialAuthenticationClient } from './SocialAuthenticationClient';
|
9
|
+
import { KeyValuePair } from '../../types';
|
10
|
+
import { EnterpriseAuthenticationClient } from './EnterpriseAuthenticationClient';
|
11
|
+
import { BaseAuthenticationClient } from './BaseAuthenticationClient';
|
12
|
+
import { ApplicationPublicDetail } from '../management/types';
|
13
|
+
/**
|
14
|
+
* @class AuthenticationClient 认证核心模块
|
15
|
+
* @description 此模块包含注册登录、重置手机号邮箱、修改账号信息等方法,是以你的终端用户(End User)的身份进行请求,适合在需要验证用户身份的情况下使用。
|
16
|
+
*
|
17
|
+
* @example
|
18
|
+
*
|
19
|
+
* 使用方法:
|
20
|
+
*
|
21
|
+
* \`\`\`javascript
|
22
|
+
* import { AuthenticationClient } from "authing-js-sdk"
|
23
|
+
* const authenticationClient = new AuthenticationClient({
|
24
|
+
* appId: "YOUR_APP_ID",
|
25
|
+
* })
|
26
|
+
* authenticationClient.registerByEmail // 使用邮箱注册
|
27
|
+
* authenticationClient.loginByEmail // 使用邮箱登录
|
28
|
+
* \`\`\`
|
29
|
+
*
|
30
|
+
*
|
31
|
+
* @name AuthenticationClient
|
32
|
+
*/
|
33
|
+
export declare class AuthenticationClient {
|
34
|
+
options: AuthenticationClientOptions;
|
35
|
+
baseClient: BaseAuthenticationClient;
|
36
|
+
graphqlClient: GraphqlClient;
|
37
|
+
httpClient: HttpClient;
|
38
|
+
naiveHttpClient: NaiveHttpClient;
|
39
|
+
tokenProvider: AuthenticationTokenProvider;
|
40
|
+
wxqrcode: QrCodeAuthenticationClient;
|
41
|
+
qrcode: QrCodeAuthenticationClient;
|
42
|
+
mfa: MfaAuthenticationClient;
|
43
|
+
social: SocialAuthenticationClient;
|
44
|
+
enterprise: EnterpriseAuthenticationClient;
|
45
|
+
private publicKeyManager;
|
46
|
+
constructor(options: AuthenticationClientOptions);
|
47
|
+
checkLoggedIn(): string;
|
48
|
+
setCurrentUser(user: User): void;
|
49
|
+
setToken(token: string): void;
|
50
|
+
/**
|
51
|
+
* @name registerByEmail
|
52
|
+
* @name_zh 使用邮箱注册
|
53
|
+
* @description 使用邮箱注册,此接口不要求用户对邮箱进行验证,用户注册之后 emailVerified 字段会为 false 。如果你希望邮箱未验证的用户不能进行登录,可以使用 pipeline 对此类请求进行拦截。
|
54
|
+
*
|
55
|
+
* @param {string} email 邮箱
|
56
|
+
* @param {string} password 密码
|
57
|
+
* @param {RegisterProfile} [profile] 用户资料
|
58
|
+
* @param {Object} [options]
|
59
|
+
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
60
|
+
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
61
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
62
|
+
*
|
63
|
+
* @example
|
64
|
+
*
|
65
|
+
* authenticationClient.registerByEmail(
|
66
|
+
* 'test@example.com',
|
67
|
+
* 'passw0rd',
|
68
|
+
* {
|
69
|
+
* nickname: 'Nick'
|
70
|
+
* },
|
71
|
+
* {
|
72
|
+
* generateToken: true
|
73
|
+
* }
|
74
|
+
* )
|
75
|
+
*
|
76
|
+
* @example
|
77
|
+
* authenticationClient.registerByEmail('test@example.com', 'passw0rd')
|
78
|
+
*
|
79
|
+
*
|
80
|
+
* @returns {Promise<User>}
|
81
|
+
* @memberof AuthenticationClient
|
82
|
+
*/
|
83
|
+
registerByEmail(email: string, password: string, profile?: RegisterProfile, options?: {
|
84
|
+
forceLogin?: boolean;
|
85
|
+
generateToken?: boolean;
|
86
|
+
clientIp?: string;
|
87
|
+
/**
|
88
|
+
* @deprecated use customData instead
|
89
|
+
*/
|
90
|
+
params?: Array<{
|
91
|
+
key: string;
|
92
|
+
value: any;
|
93
|
+
}>;
|
94
|
+
/**
|
95
|
+
* @description 将会写入配置的用户自定义字段
|
96
|
+
*/
|
97
|
+
customData?: {
|
98
|
+
[x: string]: any;
|
99
|
+
};
|
100
|
+
/**
|
101
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
102
|
+
*/
|
103
|
+
context?: {
|
104
|
+
[x: string]: any;
|
105
|
+
};
|
106
|
+
}): Promise<User>;
|
107
|
+
/**
|
108
|
+
* @name registerByUsername
|
109
|
+
* @name_zh 使用用户名注册
|
110
|
+
* @description 使用用户名注册
|
111
|
+
*
|
112
|
+
* @param {string} username 用户名
|
113
|
+
* @param {string} password 密码
|
114
|
+
* @param {RegisterProfile} [profile] 用户资料
|
115
|
+
* @param {Object} [options]
|
116
|
+
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
117
|
+
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
118
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
119
|
+
*
|
120
|
+
*
|
121
|
+
* @example
|
122
|
+
*
|
123
|
+
* authenticationClient.registerByUsername(
|
124
|
+
* 'bob',
|
125
|
+
* 'passw0rd',
|
126
|
+
* {
|
127
|
+
* nickname: 'Nick'
|
128
|
+
* },
|
129
|
+
* {
|
130
|
+
* generateToken: true
|
131
|
+
* }
|
132
|
+
* )
|
133
|
+
*
|
134
|
+
* @example
|
135
|
+
* authenticationClient.registerByUsername('bob', 'passw0rd')
|
136
|
+
*
|
137
|
+
*
|
138
|
+
* @returns {Promise<User>}
|
139
|
+
* @memberof AuthenticationClient
|
140
|
+
*/
|
141
|
+
registerByUsername(username: string, password: string, profile?: RegisterProfile, options?: {
|
142
|
+
forceLogin?: boolean;
|
143
|
+
generateToken?: boolean;
|
144
|
+
clientIp?: string;
|
145
|
+
/**
|
146
|
+
* @deprecated use customData instead
|
147
|
+
*/
|
148
|
+
params?: Array<{
|
149
|
+
key: string;
|
150
|
+
value: any;
|
151
|
+
}>;
|
152
|
+
/**
|
153
|
+
* @description 将会写入配置的用户自定义字段
|
154
|
+
*/
|
155
|
+
customData?: {
|
156
|
+
[x: string]: any;
|
157
|
+
};
|
158
|
+
/**
|
159
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
160
|
+
*/
|
161
|
+
context?: {
|
162
|
+
[x: string]: any;
|
163
|
+
};
|
164
|
+
}): Promise<User>;
|
165
|
+
/**
|
166
|
+
* @name registerByPhoneCode
|
167
|
+
* @name_zh 使用手机号注册
|
168
|
+
* @description 使用手机号注册,你可以同时设置该账号的初始密码。发送短信的接口请见 sendSmsCode
|
169
|
+
*
|
170
|
+
* @param {string} phone 手机号
|
171
|
+
* @param {string} code 短信验证码
|
172
|
+
* @param {string} password 初始密码
|
173
|
+
* @param {RegisterProfile} [profile] 用户资料
|
174
|
+
* @param {Object} [options]
|
175
|
+
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
176
|
+
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
177
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
178
|
+
*
|
179
|
+
* @example
|
180
|
+
*
|
181
|
+
* authenticationClient.registerByPhoneCode(
|
182
|
+
* '176xxxx7041',
|
183
|
+
* '1234',
|
184
|
+
* 'passw0rd',
|
185
|
+
* {
|
186
|
+
* nickname: 'Nick'
|
187
|
+
* },
|
188
|
+
* {
|
189
|
+
* generateToken: true
|
190
|
+
* }
|
191
|
+
* )
|
192
|
+
*
|
193
|
+
* @example
|
194
|
+
* authenticationClient.registerByPhoneCode('176xxxx7041', '1234')
|
195
|
+
*
|
196
|
+
*
|
197
|
+
* @returns {Promise<User>}
|
198
|
+
* @memberof AuthenticationClient
|
199
|
+
*/
|
200
|
+
registerByPhoneCode(phone: string, code: string, password?: string, profile?: RegisterProfile, options?: {
|
201
|
+
forceLogin?: boolean;
|
202
|
+
generateToken?: boolean;
|
203
|
+
clientIp?: string;
|
204
|
+
/**
|
205
|
+
* @deprecated use customData instead
|
206
|
+
*/
|
207
|
+
params?: Array<{
|
208
|
+
key: string;
|
209
|
+
value: any;
|
210
|
+
}>;
|
211
|
+
/**
|
212
|
+
* @description 将会写入配置的用户自定义字段
|
213
|
+
*/
|
214
|
+
customData?: {
|
215
|
+
[x: string]: any;
|
216
|
+
};
|
217
|
+
/**
|
218
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
219
|
+
*/
|
220
|
+
context?: {
|
221
|
+
[x: string]: any;
|
222
|
+
};
|
223
|
+
}): Promise<User>;
|
224
|
+
/**
|
225
|
+
* @name checkPasswordStrength
|
226
|
+
* @name_zh 检查密码强度
|
227
|
+
* @description 检查密码强度,详情请见: https://docs.authing.co/v2/guides/security/config-password.html
|
228
|
+
*
|
229
|
+
* @param {string} password
|
230
|
+
* @example
|
231
|
+
* authenticationClient.checkPasswordStrength('weak')
|
232
|
+
*
|
233
|
+
* @example
|
234
|
+
* authenticationClient.checkPasswordStrength('strongPassw0rd!')
|
235
|
+
*
|
236
|
+
* @returns {Promise<CheckPasswordStrengthResult>}
|
237
|
+
* @memberof AuthenticationClient
|
238
|
+
*/
|
239
|
+
checkPasswordStrength(password: string): Promise<CheckPasswordStrengthResult>;
|
240
|
+
/**
|
241
|
+
* @name sendSmsCode
|
242
|
+
* @name_zh 发送短信验证码
|
243
|
+
* @description 发送短信验证码, 短信验证码的有效时间为 60 s。
|
244
|
+
*
|
245
|
+
* @param {string} phone
|
246
|
+
* @example
|
247
|
+
* authenticationClient.sendSmsCode('176xxxx6754')
|
248
|
+
*
|
249
|
+
* @returns {Promise<CommonMessage>}
|
250
|
+
* @memberof AuthenticationClient
|
251
|
+
*/
|
252
|
+
sendSmsCode(phone: string): Promise<CommonMessage>;
|
253
|
+
/**
|
254
|
+
* @name loginByEmail
|
255
|
+
* @name_zh 使用邮箱登录
|
256
|
+
* @description 使用邮箱登录,该接口默认不会限制未验证的邮箱进行登录,如果你希望邮箱未验证的用户不能进行登录,可以使用 pipeline 对此类请求进行拦截。
|
257
|
+
*
|
258
|
+
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
259
|
+
*
|
260
|
+
* @param {string} email 邮箱
|
261
|
+
* @param {string} password 密码
|
262
|
+
* @param {Object} [options]
|
263
|
+
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
264
|
+
* @param {string} [options.captchaCode] 图形验证码
|
265
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
266
|
+
*
|
267
|
+
* @example
|
268
|
+
*
|
269
|
+
* authenticationClient.loginByEmail(
|
270
|
+
* 'test@example.com',
|
271
|
+
* 'passw0rd',
|
272
|
+
* {
|
273
|
+
* autoRegister: true,
|
274
|
+
* captchaCode: 'xj72'
|
275
|
+
* }
|
276
|
+
* )
|
277
|
+
*
|
278
|
+
* @example
|
279
|
+
* authenticationClient.loginByEmail('test@example.com', 'passw0rd')
|
280
|
+
*
|
281
|
+
*
|
282
|
+
* @returns {Promise<User>}
|
283
|
+
* @memberof AuthenticationClient
|
284
|
+
*/
|
285
|
+
loginByEmail(email: string, password: string, options?: {
|
286
|
+
autoRegister?: boolean;
|
287
|
+
captchaCode?: string;
|
288
|
+
clientIp?: string;
|
289
|
+
/**
|
290
|
+
* @deprecated use customData instead
|
291
|
+
*/
|
292
|
+
params?: Array<{
|
293
|
+
key: string;
|
294
|
+
value: any;
|
295
|
+
}>;
|
296
|
+
/**
|
297
|
+
* @description 将会写入配置的用户自定义字段
|
298
|
+
*/
|
299
|
+
customData?: {
|
300
|
+
[x: string]: any;
|
301
|
+
};
|
302
|
+
/**
|
303
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
304
|
+
*/
|
305
|
+
context?: {
|
306
|
+
[x: string]: any;
|
307
|
+
};
|
308
|
+
}): Promise<User>;
|
309
|
+
/**
|
310
|
+
* @name loginByUsername
|
311
|
+
* @name_zh 使用用户名登录
|
312
|
+
* @description 使用用户名登录。
|
313
|
+
*
|
314
|
+
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
315
|
+
*
|
316
|
+
* @param {string} username 用户名
|
317
|
+
* @param {string} password 密码
|
318
|
+
* @param {Object} [options]
|
319
|
+
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
320
|
+
* @param {string} [options.captchaCode] 图形验证码
|
321
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
322
|
+
*
|
323
|
+
*
|
324
|
+
* @example
|
325
|
+
*
|
326
|
+
* authenticationClient.loginByEmail(
|
327
|
+
* 'test@example.com',
|
328
|
+
* 'passw0rd',
|
329
|
+
* {
|
330
|
+
* autoRegister: true,
|
331
|
+
* captchaCode: 'xj72'
|
332
|
+
* }
|
333
|
+
* )
|
334
|
+
*
|
335
|
+
* @example
|
336
|
+
* authenticationClient.loginByEmail('test@example.com', 'passw0rd')
|
337
|
+
*
|
338
|
+
*
|
339
|
+
* @returns {Promise<User>}
|
340
|
+
* @memberof AuthenticationClient
|
341
|
+
*/
|
342
|
+
loginByUsername(username: string, password: string, options?: {
|
343
|
+
autoRegister?: boolean;
|
344
|
+
captchaCode?: string;
|
345
|
+
clientIp?: string;
|
346
|
+
/**
|
347
|
+
* @deprecated use customData instead
|
348
|
+
*/
|
349
|
+
params?: Array<{
|
350
|
+
key: string;
|
351
|
+
value: any;
|
352
|
+
}>;
|
353
|
+
/**
|
354
|
+
* @description 将会写入配置的用户自定义字段
|
355
|
+
*/
|
356
|
+
customData?: {
|
357
|
+
[x: string]: any;
|
358
|
+
};
|
359
|
+
/**
|
360
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
361
|
+
*/
|
362
|
+
context?: {
|
363
|
+
[x: string]: any;
|
364
|
+
};
|
365
|
+
}): Promise<User>;
|
366
|
+
/**
|
367
|
+
* @name loginByPhoneCode
|
368
|
+
* @name_zh 使用手机号验证码登录
|
369
|
+
* @description 使用手机号验证码登录。
|
370
|
+
*
|
371
|
+
*
|
372
|
+
* @param {string} phone 手机号
|
373
|
+
* @param {string} code 短信验证码
|
374
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
375
|
+
*
|
376
|
+
* @example
|
377
|
+
*
|
378
|
+
* authenticationClient.loginByPhoneCode(
|
379
|
+
* '176xxxx7041',
|
380
|
+
* '1234',
|
381
|
+
* )
|
382
|
+
*
|
383
|
+
*
|
384
|
+
* @returns {Promise<User>}
|
385
|
+
* @memberof AuthenticationClient
|
386
|
+
*/
|
387
|
+
loginByPhoneCode(phone: string, code: string, options?: {
|
388
|
+
clientIp?: string;
|
389
|
+
/**
|
390
|
+
* @deprecated use customData instead
|
391
|
+
*/
|
392
|
+
params?: Array<{
|
393
|
+
key: string;
|
394
|
+
value: any;
|
395
|
+
}>;
|
396
|
+
/**
|
397
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
398
|
+
*/
|
399
|
+
context?: {
|
400
|
+
[x: string]: any;
|
401
|
+
};
|
402
|
+
/**
|
403
|
+
* @description 将会写入配置的用户自定义字段
|
404
|
+
*/
|
405
|
+
customData?: {
|
406
|
+
[x: string]: any;
|
407
|
+
};
|
408
|
+
}): Promise<User>;
|
409
|
+
/**
|
410
|
+
* @name loginByPhonePassword
|
411
|
+
* @name_zh 使用手机号密码登录
|
412
|
+
* @description 使用手机号密码登录。
|
413
|
+
*
|
414
|
+
*
|
415
|
+
* @param {string} phone 手机号
|
416
|
+
* @param {string} password 密码
|
417
|
+
* @param {Object} [options]
|
418
|
+
* @param {string} [options.captchaCode] 图形验证码
|
419
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
420
|
+
*
|
421
|
+
* @example
|
422
|
+
*
|
423
|
+
* authenticationClient.loginByPhonePassword(
|
424
|
+
* '176xxxx7041',
|
425
|
+
* 'passw0rd',
|
426
|
+
* {
|
427
|
+
* captchaCode: 'xj72'
|
428
|
+
* }
|
429
|
+
* )
|
430
|
+
*
|
431
|
+
* @example
|
432
|
+
* authenticationClient.loginByPhonePassword('176xxxx7041', 'passw0rd')
|
433
|
+
*
|
434
|
+
*
|
435
|
+
* @returns {Promise<User>}
|
436
|
+
* @memberof AuthenticationClient
|
437
|
+
*/
|
438
|
+
loginByPhonePassword(phone: string, password: string, options?: {
|
439
|
+
captchaCode?: string;
|
440
|
+
autoRegister?: boolean;
|
441
|
+
clientIp?: string;
|
442
|
+
/**
|
443
|
+
* @deprecated use customData instead
|
444
|
+
*/
|
445
|
+
params?: Array<{
|
446
|
+
key: string;
|
447
|
+
value: any;
|
448
|
+
}>;
|
449
|
+
/**
|
450
|
+
* @description 将会写入配置的用户自定义字段
|
451
|
+
*/
|
452
|
+
customData?: {
|
453
|
+
[x: string]: any;
|
454
|
+
};
|
455
|
+
/**
|
456
|
+
* @description 请求上下文,将会传递到 Pipeline 中
|
457
|
+
*/
|
458
|
+
context?: {
|
459
|
+
[x: string]: any;
|
460
|
+
};
|
461
|
+
}): Promise<User>;
|
462
|
+
loginBySubAccount(account: string, password: string, options?: {
|
463
|
+
captchaCode?: string;
|
464
|
+
clientIp?: string;
|
465
|
+
}): Promise<User>;
|
466
|
+
/**
|
467
|
+
* @name checkLoginStatus
|
468
|
+
* @name_zh 检测 Token 登录状态
|
469
|
+
* @description 检测 Token 登录状态
|
470
|
+
*
|
471
|
+
* @param {string} token 用户的登录凭证 token
|
472
|
+
*
|
473
|
+
* @example
|
474
|
+
*
|
475
|
+
* authenticationClient.checkLoginStatus('TOKEN')
|
476
|
+
*
|
477
|
+
* @returns {Promise<JwtTokenStatus>}
|
478
|
+
* @memberof AuthenticationClient
|
479
|
+
*/
|
480
|
+
checkLoginStatus(token?: string): Promise<JwtTokenStatus>;
|
481
|
+
/**
|
482
|
+
* @name sendEmail
|
483
|
+
* @name_zh 发送邮件
|
484
|
+
* @description 发送邮件
|
485
|
+
*
|
486
|
+
* @param {string} email 邮箱
|
487
|
+
* @param {EmailScene} scene 发送场景,可选值为 RESET_PASSWORD(发送重置密码邮件,邮件中包含验证码)、VerifyEmail(发送验证邮箱的邮件)、ChangeEmail(发送修改邮箱邮件,邮件中包含验证码)
|
488
|
+
*
|
489
|
+
* @example
|
490
|
+
*
|
491
|
+
* import { EmailScene } from "authing-js-sdk"
|
492
|
+
* authenticationClient.sendEmail('test@example.com', EmailScene.RESET_PASSWORD)
|
493
|
+
*
|
494
|
+
* @returns {Promise<CommonMessage>}
|
495
|
+
* @memberof AuthenticationClient
|
496
|
+
*/
|
497
|
+
sendEmail(email: string, scene: EmailScene): Promise<CommonMessage>;
|
498
|
+
/**
|
499
|
+
* @name resetPasswordByPhoneCode
|
500
|
+
* @name_zh 通过短信验证码重置密码
|
501
|
+
* @description 通过短信验证码重置密码,你需要先调用 sendSmsCode 接口发送重置密码邮件。
|
502
|
+
*
|
503
|
+
* @param {string} phone 手机号
|
504
|
+
* @param {string} code 验证码
|
505
|
+
* @param {string} newPassword 新的密码
|
506
|
+
*
|
507
|
+
* @example
|
508
|
+
*
|
509
|
+
* authenticationClient.resetPasswordByPhoneCode('176xxxx7041', '1234', 'passw0rd')
|
510
|
+
*
|
511
|
+
* @returns {Promise<CommonMessage>}
|
512
|
+
* @memberof AuthenticationClient
|
513
|
+
*/
|
514
|
+
resetPasswordByPhoneCode(phone: string, code: string, newPassword: string): Promise<CommonMessage>;
|
515
|
+
/**
|
516
|
+
* @name resetPasswordByEmailCode
|
517
|
+
* @name_zh 通过邮件验证码重置密码
|
518
|
+
* @description 通过邮件验证码重置密码,你需要先调用 sendEmail 接口发送重置密码邮件。
|
519
|
+
*
|
520
|
+
* @param {string} phone 手机号
|
521
|
+
* @param {string} code 验证码
|
522
|
+
* @param {string} newPassword 新的密码
|
523
|
+
*
|
524
|
+
* @example
|
525
|
+
*
|
526
|
+
* authenticationClient.resetPasswordByEmailCode('test@example.com', '1234', 'passw0rd')
|
527
|
+
*
|
528
|
+
* @returns {Promise<CommonMessage>}
|
529
|
+
* @memberof AuthenticationClient
|
530
|
+
*/
|
531
|
+
resetPasswordByEmailCode(email: string, code: string, newPassword: string): Promise<CommonMessage>;
|
532
|
+
/**
|
533
|
+
* @name updateProfile
|
534
|
+
* @name_zh 修改用户资料
|
535
|
+
* @description 修改用户资料,此接口不能用于修改手机号、邮箱、密码,如果需要请调用 updatePhone、updateEmail、updatePassword 接口。
|
536
|
+
*
|
537
|
+
* @param {UpdateUserInput} updates 修改的用户资料
|
538
|
+
* @param {string} updates.username 用户名
|
539
|
+
* @param {string} updates.nickname 昵称
|
540
|
+
* @param {string} updates.photo 头像
|
541
|
+
* @param {string} updates.company 公司
|
542
|
+
* @param {string} updates.browser 浏览器
|
543
|
+
* @param {string} updates.device 设备
|
544
|
+
* @param {string} updates.lastIP 最近登录的 IP
|
545
|
+
* @param {string} updates.name Name
|
546
|
+
* @param {string} updates.givenName Given Name
|
547
|
+
* @param {string} updates.familyName Family Name
|
548
|
+
* @param {string} updates.middleName Middle Name
|
549
|
+
* @param {string} updates.profile Profile Url
|
550
|
+
* @param {string} updates.preferredUsername Preferred Name
|
551
|
+
* @param {string} updates.website 个人网站
|
552
|
+
* @param {string} updates.gender 性别, F 表示男性、W 表示女性、未知表示 U
|
553
|
+
* @param {string} updates.birthdate 生日
|
554
|
+
* @param {string} updates.zoneinfo 时区
|
555
|
+
* @param {string} updates.locale 语言
|
556
|
+
* @param {string} updates.address 地址
|
557
|
+
* @param {string} updates.streetAddress 街道地址
|
558
|
+
* @param {string} updates.locality
|
559
|
+
* @param {string} updates.region 地域
|
560
|
+
* @param {string} updates.postalCode 邮编
|
561
|
+
* @param {string} updates.city 城市
|
562
|
+
* @param {string} updates.province 省份
|
563
|
+
* @param {string} updates.country 国家
|
564
|
+
*
|
565
|
+
* @example
|
566
|
+
*
|
567
|
+
* authenticationClient.updateProfile({
|
568
|
+
* nickname: "Nick",
|
569
|
+
* lastIp: "111.111.111.111"
|
570
|
+
* })
|
571
|
+
*
|
572
|
+
* @returns {Promise<User>}
|
573
|
+
* @memberof AuthenticationClient
|
574
|
+
*/
|
575
|
+
updateProfile(updates: UpdateUserInput): Promise<User>;
|
576
|
+
/**
|
577
|
+
* @name updatePassword
|
578
|
+
* @name_zh 更新用户密码
|
579
|
+
* @description 更新用户密码
|
580
|
+
*
|
581
|
+
* @param {string} newPassword 新密码
|
582
|
+
* @param {string} [oldPassword] 旧密码,如果用户没有设置密码,可以不填。
|
583
|
+
*
|
584
|
+
* @example
|
585
|
+
*
|
586
|
+
* authenticationClient.updatePassword('passw0rd') // 由手机号、社会化登录等其他方式注册的,首次没有设置密码,oldPassword 留空。
|
587
|
+
*
|
588
|
+
* @example
|
589
|
+
*
|
590
|
+
* authenticationClient.updatePassword('passw0rd', 'oldPassw0rd') // 用户之前设置了密码
|
591
|
+
*
|
592
|
+
* @returns {Promise<User>}
|
593
|
+
* @memberof AuthenticationClient
|
594
|
+
*/
|
595
|
+
updatePassword(newPassword: string, oldPassword?: string): Promise<User>;
|
596
|
+
/**
|
597
|
+
* @name updatePhone
|
598
|
+
* @name_zh 更新用户手机号
|
599
|
+
* @description 更新用户手机号。和修改邮箱一样,默认情况下,如果用户当前已经绑定了手机号,需要同时验证原有手机号(目前账号绑定的手机号)和当前邮箱(将要绑定的手机号)。
|
600
|
+
* 也就是说,用户 A 当前绑定的手机号为 15888888888,想修改为 15899999999,那么就需要同时验证这两个手机号。
|
601
|
+
* 开发者也可以选择不开启 “验证原有手机号“ ,可以在 Authing 控制台 的 设置目录下的安全信息模块进行关闭。
|
602
|
+
* 用户首次绑定手机号请使用 bindPhone 接口。
|
603
|
+
*
|
604
|
+
* @param {string} phone 新手机号
|
605
|
+
* @param {string} phoneCode 新手机号的验证码
|
606
|
+
* @param {string} [oldPhone] 旧手机号
|
607
|
+
* @param {string} [oldPhoneCode] 旧手机号的验证码
|
608
|
+
*
|
609
|
+
* @example
|
610
|
+
*
|
611
|
+
* authenticationClient.updatePhone('176xxxx7041', '1234') // 关闭了“验证原有手机号“选项
|
612
|
+
*
|
613
|
+
* @example
|
614
|
+
*
|
615
|
+
* authenticationClient.updatePhone('176xxxx7041', '1234', '156xxxx9876', '1234') // 开启了“验证原有手机号“选项
|
616
|
+
*
|
617
|
+
*
|
618
|
+
* @returns {Promise<User>}
|
619
|
+
* @memberof AuthenticationClient
|
620
|
+
*/
|
621
|
+
updatePhone(phone: string, phoneCode: string, oldPhone?: string, oldPhoneCode?: string): Promise<User>;
|
622
|
+
/**
|
623
|
+
* @name updateEmail
|
624
|
+
* @name_zh 更新用户邮箱
|
625
|
+
* @description 如果用户已经绑定了邮箱,默认情况下,需要同时验证原有邮箱(目前账号绑定的邮箱)和当前邮箱(将要绑定的邮箱)。也就是说,用户 A 当前绑定的邮箱为 123456@qq.com,想修改为 1234567@qq.com,那么就需要同时验证这两个邮箱。
|
626
|
+
* 开发者也可以选择不开启 “验证原有邮箱“ ,可以在 Authing 控制台 的 设置目录下的安全信息模块进行关闭。
|
627
|
+
* 用户首次绑定手机号请使用 bindEmail 接口。
|
628
|
+
*
|
629
|
+
* @param {string} email 新邮箱
|
630
|
+
* @param {string} emailCode 新邮箱的验证码
|
631
|
+
* @param {string} [oldEmail] 旧邮箱
|
632
|
+
* @param {string} [oldEmailCode] 旧邮箱的验证码
|
633
|
+
*
|
634
|
+
* @example
|
635
|
+
*
|
636
|
+
* authenticationClient.updateEmail('test@example.com', '1234') // 关闭了“验证原有邮箱“选项
|
637
|
+
*
|
638
|
+
* @example
|
639
|
+
*
|
640
|
+
* authenticationClient.updateEmail('test@example.com', '1234', 'test2@example.com', '1234') // 开启了“验证原有邮箱“选项
|
641
|
+
*
|
642
|
+
*
|
643
|
+
* @returns {Promise<User>}
|
644
|
+
* @memberof AuthenticationClient
|
645
|
+
*/
|
646
|
+
updateEmail(email: string, emailCode: string, oldEmail?: string, oldEmailCode?: string): Promise<User>;
|
647
|
+
/**
|
648
|
+
* @name refreshToken
|
649
|
+
* @name_zh 刷新当前用户的 token
|
650
|
+
* @description 刷新当前用户的 token,调用此接口要求先登录。
|
651
|
+
*
|
652
|
+
* @example
|
653
|
+
*
|
654
|
+
* authenticationClient.updateEmail()
|
655
|
+
*
|
656
|
+
* @returns {Promise<RefreshToken>}
|
657
|
+
* @memberof AuthenticationClient
|
658
|
+
*/
|
659
|
+
refreshToken(): Promise<RefreshToken>;
|
660
|
+
/**
|
661
|
+
* @name linkAccount
|
662
|
+
* @name_zh 关联账号
|
663
|
+
* @description 将社交账号绑定到主账号(手机号、邮箱账号)。
|
664
|
+
*
|
665
|
+
* @param {Object} options
|
666
|
+
* @param {string} options.primaryUserToken 主账号 Token
|
667
|
+
* @param {string} options.secondaryUserToken 社交账号 Token
|
668
|
+
*
|
669
|
+
* @example
|
670
|
+
*
|
671
|
+
* authenticationClient.linkAccount({ primaryUserToken: '', secondaryUserToken: '' })
|
672
|
+
*
|
673
|
+
* @returns {{code: 200, message: "绑定成功"}}
|
674
|
+
* @memberof AuthenticationClient
|
675
|
+
*/
|
676
|
+
linkAccount(options: {
|
677
|
+
primaryUserToken: string;
|
678
|
+
secondaryUserToken: string;
|
679
|
+
}): Promise<{
|
680
|
+
code: number;
|
681
|
+
message: string;
|
682
|
+
}>;
|
683
|
+
/**
|
684
|
+
* @name unLinkAccount
|
685
|
+
* @name_zh 解除账号绑定
|
686
|
+
* @description 将社交账号从主账号(手机号、邮箱账号)解绑。
|
687
|
+
*
|
688
|
+
* @param {Object} options
|
689
|
+
* @param {string} options.primaryUserToken 主账号 Token
|
690
|
+
* @param {string} options.provider 社交账号的提供商名称
|
691
|
+
*
|
692
|
+
* @example
|
693
|
+
*
|
694
|
+
* authenticationClient.unLinkAccount({ primaryUserToken: '', provider: 'wechat:pc' })
|
695
|
+
*
|
696
|
+
* @returns {{code: 200, message: "解绑成功"}}
|
697
|
+
* @memberof AuthenticationClient
|
698
|
+
*/
|
699
|
+
unLinkAccount(options: {
|
700
|
+
primaryUserToken: string;
|
701
|
+
provider: ProviderType;
|
702
|
+
}): Promise<{
|
703
|
+
code: number;
|
704
|
+
message: string;
|
705
|
+
}>;
|
706
|
+
/**
|
707
|
+
* @name bindPhone
|
708
|
+
* @name_zh 绑定手机号
|
709
|
+
* @description 用户初次绑定手机号,如果需要修改手机号请使用 updatePhone 接口。
|
710
|
+
*
|
711
|
+
* @param {string} phone
|
712
|
+
* @param {string} phoneCode
|
713
|
+
*
|
714
|
+
* @example
|
715
|
+
*
|
716
|
+
* authenticationClient.bindPhone('176xxxx7041', '1234')
|
717
|
+
*
|
718
|
+
* @returns {Promise<User>}
|
719
|
+
* @memberof AuthenticationClient
|
720
|
+
*/
|
721
|
+
bindPhone(phone: string, phoneCode: string): Promise<User>;
|
722
|
+
/**
|
723
|
+
* @name unbindPhone
|
724
|
+
* @name_zh 解绑手机号
|
725
|
+
* @description 用户解绑手机号
|
726
|
+
*
|
727
|
+
* @example
|
728
|
+
*
|
729
|
+
* authenticationClient.unbindPhone()
|
730
|
+
*
|
731
|
+
* @returns {Promise<User>}
|
732
|
+
* @memberof AuthenticationClient
|
733
|
+
*/
|
734
|
+
unbindPhone(): Promise<User>;
|
735
|
+
/**
|
736
|
+
* @name bindEmail
|
737
|
+
* @name_zh 绑定邮箱号
|
738
|
+
* @description 用户邮箱号
|
739
|
+
*
|
740
|
+
* @param {string} email
|
741
|
+
* @param {string} emailCode
|
742
|
+
*
|
743
|
+
* @example
|
744
|
+
*
|
745
|
+
* authenticationClient.bindEmail('test@example.com', '1234')
|
746
|
+
*
|
747
|
+
* @returns {Promise<User>}
|
748
|
+
* @memberof AuthenticationClient
|
749
|
+
*/
|
750
|
+
bindEmail(email: string, emailCode: string): Promise<User>;
|
751
|
+
/**
|
752
|
+
* @name unbindEmail
|
753
|
+
* @name_zh 解绑邮箱号
|
754
|
+
* @description 用户解绑邮箱号
|
755
|
+
*
|
756
|
+
* @example
|
757
|
+
*
|
758
|
+
* authenticationClient.unbindPhone()
|
759
|
+
*
|
760
|
+
* @returns {Promise<User>}
|
761
|
+
* @memberof AuthenticationClient
|
762
|
+
*/
|
763
|
+
unbindEmail(): Promise<User>;
|
764
|
+
/**
|
765
|
+
* @name getCurrentUser
|
766
|
+
* @name_zh 获取当前登录的用户信息
|
767
|
+
* @description 获取当前登录的用户信息
|
768
|
+
*
|
769
|
+
* @example
|
770
|
+
*
|
771
|
+
* authenticationClient.getCurrentUser()
|
772
|
+
*
|
773
|
+
* @returns {Promise<User>}
|
774
|
+
* @memberof AuthenticationClient
|
775
|
+
*/
|
776
|
+
getCurrentUser(): Promise<User | null>;
|
777
|
+
/**
|
778
|
+
* @name logout
|
779
|
+
* @name_zh 退出登录
|
780
|
+
* @description 退出登录,清空 localStorage 里的 user 和 token
|
781
|
+
*
|
782
|
+
* @example
|
783
|
+
*
|
784
|
+
* authenticationClient.logout()
|
785
|
+
*
|
786
|
+
* @returns {null}
|
787
|
+
* @memberof AuthenticationClient
|
788
|
+
*/
|
789
|
+
logout(): Promise<void>;
|
790
|
+
/**
|
791
|
+
* @name listUdv
|
792
|
+
* @name_zh 获取当前用户的自定义数据列表
|
793
|
+
* @description 获取当前用户的自定义数据列表
|
794
|
+
* @deprecated use getUdfValue instead
|
795
|
+
*
|
796
|
+
* @example
|
797
|
+
*
|
798
|
+
* authenticationClient.listUdv()
|
799
|
+
*
|
800
|
+
* @returns {Promise<Array<UserDefinedData>>}
|
801
|
+
* @memberof AuthenticationClient
|
802
|
+
*/
|
803
|
+
listUdv(): Promise<Array<UserDefinedData>>;
|
804
|
+
/**
|
805
|
+
* @name setUdv
|
806
|
+
* @name_zh 添加自定义数据
|
807
|
+
* @description 添加自定义数据
|
808
|
+
*
|
809
|
+
* @param {string} key 自定义字段的 key
|
810
|
+
* @param {any} value 自定义数据的值,值的类型必须要和用户池定义的自定义字段类型一致。
|
811
|
+
*
|
812
|
+
* @example
|
813
|
+
*
|
814
|
+
* authenticationClient.setUdv('school', '清华大学') // 要求用户必须定义了 school 这个字段。
|
815
|
+
*
|
816
|
+
* @returns {Promise<Array<UserDefinedData>>}
|
817
|
+
* @memberof AuthenticationClient
|
818
|
+
*/
|
819
|
+
setUdv(key: string, value: any): Promise<Array<UserDefinedData>>;
|
820
|
+
/**
|
821
|
+
* @name removeUdv
|
822
|
+
* @name_zh 删除自定义数据
|
823
|
+
* @description 删除自定义数据
|
824
|
+
*
|
825
|
+
* @param key 自定义字段的 key
|
826
|
+
*
|
827
|
+
* @example
|
828
|
+
*
|
829
|
+
* authenticationClient.removeUdv('school')
|
830
|
+
*
|
831
|
+
*
|
832
|
+
* @returns {Promise<Array<UserDefinedData>>}
|
833
|
+
* @memberof AuthenticationClient
|
834
|
+
*/
|
835
|
+
removeUdv(key: string): Promise<Array<UserDefinedData>>;
|
836
|
+
/**
|
837
|
+
* @name listOrg
|
838
|
+
* @name_zh 获取用户所在组织机构
|
839
|
+
* @description 获取用户所在的组织机构立碑,以及他所属的节点在此组织机构内的完整路径。
|
840
|
+
*
|
841
|
+
* @example
|
842
|
+
*
|
843
|
+
* const data = await authenticationClient.listOrgs();
|
844
|
+
*
|
845
|
+
* @returns {Promise<UserOrgList>}
|
846
|
+
*
|
847
|
+
* @memberof AuthenticationClient
|
848
|
+
*/
|
849
|
+
listOrgs(): Promise<any>;
|
850
|
+
/**
|
851
|
+
* @name loginByLdap
|
852
|
+
* @name_zh 使用 LDAP 用户名登录
|
853
|
+
* @description 使用 LDAP 用户名登录。
|
854
|
+
*
|
855
|
+
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
856
|
+
*
|
857
|
+
* @param {string} username 用户名
|
858
|
+
* @param {string} password 密码
|
859
|
+
* @param {Object} [options]
|
860
|
+
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
861
|
+
* @param {string} [options.captchaCode] 图形验证码
|
862
|
+
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
863
|
+
*
|
864
|
+
*
|
865
|
+
* @example
|
866
|
+
* const authenticationClient = new AuthenticationClient({
|
867
|
+
* appId: '应用 ID'
|
868
|
+
* })
|
869
|
+
*
|
870
|
+
* authenticationClient.loginByLdap(
|
871
|
+
* 'admin',
|
872
|
+
* 'admin',
|
873
|
+
* )
|
874
|
+
*
|
875
|
+
*
|
876
|
+
* @returns {Promise<User>}
|
877
|
+
* @memberof AuthenticationClient
|
878
|
+
*/
|
879
|
+
loginByLdap(username: string, password: string, options?: {
|
880
|
+
autoRegister?: boolean;
|
881
|
+
captchaCode?: string;
|
882
|
+
clientIp?: string;
|
883
|
+
}): Promise<User>;
|
884
|
+
/**
|
885
|
+
* @name loginByAd
|
886
|
+
* @name_zh 使用 AD 用户名登录
|
887
|
+
* @description 使用 AD 用户名登录。
|
888
|
+
*
|
889
|
+
* @param {string} username 用户名
|
890
|
+
* @param {string} password 密码
|
891
|
+
*
|
892
|
+
*
|
893
|
+
* @example
|
894
|
+
* const authenticationClient = new AuthenticationClient({
|
895
|
+
* appId: '应用 ID'
|
896
|
+
* })
|
897
|
+
*
|
898
|
+
* authenticationClient.loginByAd(
|
899
|
+
* 'admin',
|
900
|
+
* 'admin',
|
901
|
+
* )
|
902
|
+
*
|
903
|
+
* @returns {Promise<User>}
|
904
|
+
* @memberof AuthenticationClient
|
905
|
+
*/
|
906
|
+
loginByAd(username: string, password: string): Promise<User>;
|
907
|
+
/**
|
908
|
+
* @description 上传图片
|
909
|
+
*/
|
910
|
+
private uploadPhoto;
|
911
|
+
/**
|
912
|
+
* @deprecated use uploadAvatar instead
|
913
|
+
* @description 更新用户头像
|
914
|
+
*/
|
915
|
+
updateAvatar(options?: {
|
916
|
+
accept?: string;
|
917
|
+
}): Promise<User>;
|
918
|
+
/**
|
919
|
+
* @description 一键上传图片并更新用户头像
|
920
|
+
*
|
921
|
+
* @param {Object} options
|
922
|
+
* @param {string} options.accept 支持的图片格式,默认为 'image/*'
|
923
|
+
*
|
924
|
+
* @example
|
925
|
+
* const authenticationClient = new AuthenticationClient({
|
926
|
+
* appId: 'APP_ID',
|
927
|
+
* appHost: 'https://xxx.authing.cn'
|
928
|
+
* })
|
929
|
+
*
|
930
|
+
* // 会自动打开浏览器文件上传框,并自动完成图片文件上传 CDN、修改用户头像操作。
|
931
|
+
* authenticationClient.uploadAvatar()
|
932
|
+
*
|
933
|
+
* // 只支持 png 格式图片
|
934
|
+
* authenticationClient.uploadAvatar({
|
935
|
+
* accept: '.png'
|
936
|
+
* })
|
937
|
+
*
|
938
|
+
* @returns
|
939
|
+
*/
|
940
|
+
uploadAvatar(options?: {
|
941
|
+
accept?: string;
|
942
|
+
}): Promise<User>;
|
943
|
+
/**
|
944
|
+
* @description 获取当前用户的所有自定义数据
|
945
|
+
*
|
946
|
+
*/
|
947
|
+
getUdfValue(): Promise<KeyValuePair>;
|
948
|
+
/**
|
949
|
+
* @description 设置自定义字段值
|
950
|
+
*
|
951
|
+
*/
|
952
|
+
setUdfValue(data: KeyValuePair): Promise<void>;
|
953
|
+
/**
|
954
|
+
* @description 删除用户自定义数据
|
955
|
+
*/
|
956
|
+
removeUdfValue(key: string): Promise<void>;
|
957
|
+
/**
|
958
|
+
* @name getSecurityLevel
|
959
|
+
* @name_zh 用户安全等级
|
960
|
+
* @description 获取用户的安全等级评分
|
961
|
+
*
|
962
|
+
* @example
|
963
|
+
*
|
964
|
+
* const data = await authenticationClient.getSecurityLevel();
|
965
|
+
*
|
966
|
+
* @returns {Promise<SecurityLevel>}
|
967
|
+
*
|
968
|
+
* @memberof AuthenticationClient
|
969
|
+
*/
|
970
|
+
getSecurityLevel(): Promise<SecurityLevel>;
|
971
|
+
/**
|
972
|
+
* @description 获取用户被授权的所有资源
|
973
|
+
*
|
974
|
+
* @param userId
|
975
|
+
* @param namespace
|
976
|
+
*/
|
977
|
+
listAuthorizedResources(namespace: string, options?: {
|
978
|
+
resourceType?: ResourceType;
|
979
|
+
}): Promise<PaginatedAuthorizedResources>;
|
980
|
+
/**
|
981
|
+
* @name computedPasswordSecurityLevel
|
982
|
+
* @name_zh 计算密码安全等级
|
983
|
+
* @description 计算密码安全等级
|
984
|
+
*
|
985
|
+
* @example
|
986
|
+
*
|
987
|
+
* const data = authenticationClient.computedPasswordSecurityLevel('xxxxxxxx');
|
988
|
+
*
|
989
|
+
* @returns {PasswordSecurityLevel}
|
990
|
+
*
|
991
|
+
* @memberof AuthenticationClient
|
992
|
+
*/
|
993
|
+
computedPasswordSecurityLevel(password: string): PasswordSecurityLevel;
|
994
|
+
_generateTokenRequest(params: {
|
995
|
+
[x: string]: string;
|
996
|
+
}): string;
|
997
|
+
_generateBasicAuthToken(appId?: string, secret?: string): string;
|
998
|
+
/**
|
999
|
+
* @param {string} code 授权码 code
|
1000
|
+
* @param {string} codeVerifier 校验码 codeVerifier
|
1001
|
+
*/
|
1002
|
+
_getAccessTokenByCodeWithClientSecretPost(code: string, codeVerifier?: string): Promise<any>;
|
1003
|
+
/**
|
1004
|
+
* @param {string} code 授权码 code
|
1005
|
+
* @param {string} codeVerifier 校验码 codeVerifier
|
1006
|
+
*/
|
1007
|
+
_getAccessTokenByCodeWithClientSecretBasic(code: string, codeVerifier?: string): Promise<any>;
|
1008
|
+
/**
|
1009
|
+
* @param {string} code 授权码 code
|
1010
|
+
* @param {string} codeVerifier 校验码 codeVerifier
|
1011
|
+
*/
|
1012
|
+
_getAccessTokenByCodeWithNone(code: string, codeVerifier?: string): Promise<any>;
|
1013
|
+
getAccessTokenByCode(code: string, options?: {
|
1014
|
+
codeVerifier?: string;
|
1015
|
+
}): Promise<any>;
|
1016
|
+
generateCodeChallenge(): string;
|
1017
|
+
getCodeChallengeDigest(options: {
|
1018
|
+
codeChallenge: string;
|
1019
|
+
method: 'S256' | 'plain';
|
1020
|
+
}): string;
|
1021
|
+
getAccessTokenByClientCredentials(scope: string, options?: {
|
1022
|
+
accessKey: string;
|
1023
|
+
accessSecret: string;
|
1024
|
+
}): Promise<any>;
|
1025
|
+
getUserInfoByAccessToken(accessToken: string, options?: {
|
1026
|
+
method?: 'POST' | 'GET';
|
1027
|
+
tokenPlace?: 'query' | 'header' | 'body';
|
1028
|
+
}): Promise<any>;
|
1029
|
+
buildAuthorizeUrl(options?: IOidcParams | IOauthParams | ICasParams): string;
|
1030
|
+
_buildOidcAuthorizeUrl(options: IOidcParams): string;
|
1031
|
+
_buildOauthAuthorizeUrl(options: IOauthParams): string;
|
1032
|
+
_buildSamlAuthorizeUrl(): string;
|
1033
|
+
_buildCasAuthorizeUrl(options: ICasParams): string;
|
1034
|
+
_buildCasLogoutUrl(options: ILogoutParams): string;
|
1035
|
+
_buildOidcLogoutUrl(options: ILogoutParams): string;
|
1036
|
+
_buildEasyLogoutUrl(options?: ILogoutParams): string;
|
1037
|
+
buildLogoutUrl(options?: ILogoutParams): string;
|
1038
|
+
_getNewAccessTokenByRefreshTokenWithClientSecretPost(refreshToken: string): Promise<any>;
|
1039
|
+
_getNewAccessTokenByRefreshTokenWithClientSecretBasic(refreshToken: string): Promise<any>;
|
1040
|
+
_getNewAccessTokenByRefreshTokenWithNone(refreshToken: string): Promise<any>;
|
1041
|
+
getNewAccessTokenByRefreshToken(refreshToken: string): Promise<any>;
|
1042
|
+
_revokeTokenWithClientSecretPost(token: string): Promise<any>;
|
1043
|
+
_revokeTokenWithClientSecretBasic(token: string): Promise<any>;
|
1044
|
+
_revokeTokenWithNone(token: string): Promise<any>;
|
1045
|
+
revokeToken(token: string): Promise<boolean>;
|
1046
|
+
_introspectTokenWithClientSecretPost(token: string): Promise<any>;
|
1047
|
+
_introspectTokenWithClientSecretBasic(token: string): Promise<any>;
|
1048
|
+
_introspectTokenWithNone(token: string): Promise<any>;
|
1049
|
+
introspectToken(token: string): Promise<any>;
|
1050
|
+
validateTicketV1(ticket: string, service: string): Promise<{
|
1051
|
+
message: string;
|
1052
|
+
username: any;
|
1053
|
+
valid: boolean;
|
1054
|
+
}>;
|
1055
|
+
/**
|
1056
|
+
* 判断 "我" 是否有某个角色
|
1057
|
+
* @param roleCode 角色 Code
|
1058
|
+
* @param namespace 权限分组 ID
|
1059
|
+
*/
|
1060
|
+
hasRole(roleCode: string, namespace?: string): Promise<boolean>;
|
1061
|
+
/**
|
1062
|
+
* @description 获取当前用户能够访问的应用
|
1063
|
+
*/
|
1064
|
+
listApplications(params?: {
|
1065
|
+
page: number;
|
1066
|
+
limit: number;
|
1067
|
+
}): Promise<{
|
1068
|
+
totalCount: number;
|
1069
|
+
list: ApplicationPublicDetail[];
|
1070
|
+
}>;
|
1071
|
+
/**
|
1072
|
+
* @description 检验 idToken 或 accessToken
|
1073
|
+
*/
|
1074
|
+
validateToken(options: {
|
1075
|
+
accessToken?: string;
|
1076
|
+
idToken?: string;
|
1077
|
+
}): Promise<any>;
|
1078
|
+
}
|