authing_ruby 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/authing_ruby.gemspec +4 -2
- data/lib/authing_ruby/common/PublicKeyManager.rb +12 -1
- data/lib/authing_ruby/version.rb +1 -1
- metadata +10 -467
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +0 -520
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +0 -2859
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +0 -250
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +0 -665
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +0 -622
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +0 -127
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +0 -151
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +0 -81
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +0 -2002
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +0 -863
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +0 -533
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +0 -404
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +0 -203
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +0 -159
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +0 -840
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +0 -512
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +0 -711
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +0 -198
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +0 -264
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +0 -241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +0 -1251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +0 -259
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +0 -96
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +0 -67
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +0 -343
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +0 -2853
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +0 -247
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +0 -662
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +0 -619
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +0 -177
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +0 -1999
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +0 -860
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +0 -530
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +0 -401
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +0 -197
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +0 -153
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +0 -818
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +0 -509
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +0 -708
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +0 -103
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +0 -238
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +0 -1248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +0 -256
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +0 -93
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +0 -62
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +0 -336
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +0 -248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +0 -2869
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +0 -260
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +0 -675
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +0 -632
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +0 -137
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +0 -2012
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +0 -873
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +0 -205
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +0 -543
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +0 -414
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +0 -213
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +0 -169
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +0 -850
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +0 -522
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +0 -721
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +0 -208
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +0 -274
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +0 -1261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +0 -269
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +0 -77
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +0 -353
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +0 -413
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +0 -709
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +0 -1715
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +0 -157
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +0 -279
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +0 -94
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +0 -73
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +0 -97
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +0 -71
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +0 -344
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +0 -84
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +0 -155
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +0 -322
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +0 -60
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +0 -129
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +0 -45
- 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 +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +0 -685
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +0 -800
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +0 -1756
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +0 -179
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +0 -95
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +0 -351
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +0 -86
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +0 -234
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +0 -35
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +0 -890
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +0 -797
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +0 -6059
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +0 -149
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +0 -134
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +0 -143
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +0 -268
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +0 -54
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +0 -47
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +0 -139
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +0 -267
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +0 -150
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +0 -199
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +0 -83
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +0 -779
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +0 -395
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +0 -368
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +0 -43
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +0 -225
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/CHANGELOG.md +0 -210
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/LICENSE +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/README.md +0 -275
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/config.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/cli-options.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/env-options.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/main.js +0 -118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/package.json +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/index.d.ts +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/test.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tsconfig.json +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tslint.json +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +0 -148
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +0 -531
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +0 -107
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +0 -315
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +0 -51
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +0 -565
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +0 -88
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +0 -64
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +0 -9
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +0 -9778
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +0 -1962
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +0 -1754
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +0 -373
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +0 -1593
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +0 -55
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +0 -125
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +0 -33
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +0 -26
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +0 -16
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +0 -29
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +0 -152
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/readme.md +0 -51
@@ -1,315 +0,0 @@
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
2
|
-
var extendStatics = function (d, b) {
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
-
return extendStatics(d, b);
|
7
|
-
};
|
8
|
-
return function (d, b) {
|
9
|
-
if (typeof b !== "function" && b !== null)
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
-
extendStatics(d, b);
|
12
|
-
function __() { this.constructor = d; }
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
-
};
|
15
|
-
})();
|
16
|
-
import { hex2b64 } from "./lib/jsbn/base64";
|
17
|
-
import { Hex } from "./lib/asn1js/hex";
|
18
|
-
import { Base64 } from "./lib/asn1js/base64";
|
19
|
-
import { ASN1 } from "./lib/asn1js/asn1";
|
20
|
-
import { RSAKey } from "./lib/jsbn/rsa";
|
21
|
-
import { parseBigInt } from "./lib/jsbn/jsbn";
|
22
|
-
import { KJUR } from "./lib/jsrsasign/asn1-1.0";
|
23
|
-
/**
|
24
|
-
* Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.
|
25
|
-
* This object is just a decorator for parsing the key parameter
|
26
|
-
* @param {string|Object} key - The key in string format, or an object containing
|
27
|
-
* the parameters needed to build a RSAKey object.
|
28
|
-
* @constructor
|
29
|
-
*/
|
30
|
-
var JSEncryptRSAKey = /** @class */ (function (_super) {
|
31
|
-
__extends(JSEncryptRSAKey, _super);
|
32
|
-
function JSEncryptRSAKey(key) {
|
33
|
-
var _this = _super.call(this) || this;
|
34
|
-
// Call the super constructor.
|
35
|
-
// RSAKey.call(this);
|
36
|
-
// If a key key was provided.
|
37
|
-
if (key) {
|
38
|
-
// If this is a string...
|
39
|
-
if (typeof key === "string") {
|
40
|
-
_this.parseKey(key);
|
41
|
-
}
|
42
|
-
else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||
|
43
|
-
JSEncryptRSAKey.hasPublicKeyProperty(key)) {
|
44
|
-
// Set the values for the key.
|
45
|
-
_this.parsePropertiesFrom(key);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
return _this;
|
49
|
-
}
|
50
|
-
/**
|
51
|
-
* Method to parse a pem encoded string containing both a public or private key.
|
52
|
-
* The method will translate the pem encoded string in a der encoded string and
|
53
|
-
* will parse private key and public key parameters. This method accepts public key
|
54
|
-
* in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).
|
55
|
-
*
|
56
|
-
* @todo Check how many rsa formats use the same format of pkcs #1.
|
57
|
-
*
|
58
|
-
* The format is defined as:
|
59
|
-
* PublicKeyInfo ::= SEQUENCE {
|
60
|
-
* algorithm AlgorithmIdentifier,
|
61
|
-
* PublicKey BIT STRING
|
62
|
-
* }
|
63
|
-
* Where AlgorithmIdentifier is:
|
64
|
-
* AlgorithmIdentifier ::= SEQUENCE {
|
65
|
-
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
66
|
-
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
67
|
-
* }
|
68
|
-
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
69
|
-
* RSAPublicKey ::= SEQUENCE {
|
70
|
-
* modulus INTEGER, -- n
|
71
|
-
* publicExponent INTEGER -- e
|
72
|
-
* }
|
73
|
-
* it's possible to examine the structure of the keys obtained from openssl using
|
74
|
-
* an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/
|
75
|
-
* @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer
|
76
|
-
* @private
|
77
|
-
*/
|
78
|
-
JSEncryptRSAKey.prototype.parseKey = function (pem) {
|
79
|
-
try {
|
80
|
-
var modulus = 0;
|
81
|
-
var public_exponent = 0;
|
82
|
-
var reHex = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/;
|
83
|
-
var der = reHex.test(pem) ? Hex.decode(pem) : Base64.unarmor(pem);
|
84
|
-
var asn1 = ASN1.decode(der);
|
85
|
-
// Fixes a bug with OpenSSL 1.0+ private keys
|
86
|
-
if (asn1.sub.length === 3) {
|
87
|
-
asn1 = asn1.sub[2].sub[0];
|
88
|
-
}
|
89
|
-
if (asn1.sub.length === 9) {
|
90
|
-
// Parse the private key.
|
91
|
-
modulus = asn1.sub[1].getHexStringValue(); // bigint
|
92
|
-
this.n = parseBigInt(modulus, 16);
|
93
|
-
public_exponent = asn1.sub[2].getHexStringValue(); // int
|
94
|
-
this.e = parseInt(public_exponent, 16);
|
95
|
-
var private_exponent = asn1.sub[3].getHexStringValue(); // bigint
|
96
|
-
this.d = parseBigInt(private_exponent, 16);
|
97
|
-
var prime1 = asn1.sub[4].getHexStringValue(); // bigint
|
98
|
-
this.p = parseBigInt(prime1, 16);
|
99
|
-
var prime2 = asn1.sub[5].getHexStringValue(); // bigint
|
100
|
-
this.q = parseBigInt(prime2, 16);
|
101
|
-
var exponent1 = asn1.sub[6].getHexStringValue(); // bigint
|
102
|
-
this.dmp1 = parseBigInt(exponent1, 16);
|
103
|
-
var exponent2 = asn1.sub[7].getHexStringValue(); // bigint
|
104
|
-
this.dmq1 = parseBigInt(exponent2, 16);
|
105
|
-
var coefficient = asn1.sub[8].getHexStringValue(); // bigint
|
106
|
-
this.coeff = parseBigInt(coefficient, 16);
|
107
|
-
}
|
108
|
-
else if (asn1.sub.length === 2) {
|
109
|
-
// Parse the public key.
|
110
|
-
var bit_string = asn1.sub[1];
|
111
|
-
var sequence = bit_string.sub[0];
|
112
|
-
modulus = sequence.sub[0].getHexStringValue();
|
113
|
-
this.n = parseBigInt(modulus, 16);
|
114
|
-
public_exponent = sequence.sub[1].getHexStringValue();
|
115
|
-
this.e = parseInt(public_exponent, 16);
|
116
|
-
}
|
117
|
-
else {
|
118
|
-
return false;
|
119
|
-
}
|
120
|
-
return true;
|
121
|
-
}
|
122
|
-
catch (ex) {
|
123
|
-
return false;
|
124
|
-
}
|
125
|
-
};
|
126
|
-
/**
|
127
|
-
* Translate rsa parameters in a hex encoded string representing the rsa key.
|
128
|
-
*
|
129
|
-
* The translation follow the ASN.1 notation :
|
130
|
-
* RSAPrivateKey ::= SEQUENCE {
|
131
|
-
* version Version,
|
132
|
-
* modulus INTEGER, -- n
|
133
|
-
* publicExponent INTEGER, -- e
|
134
|
-
* privateExponent INTEGER, -- d
|
135
|
-
* prime1 INTEGER, -- p
|
136
|
-
* prime2 INTEGER, -- q
|
137
|
-
* exponent1 INTEGER, -- d mod (p1)
|
138
|
-
* exponent2 INTEGER, -- d mod (q-1)
|
139
|
-
* coefficient INTEGER, -- (inverse of q) mod p
|
140
|
-
* }
|
141
|
-
* @returns {string} DER Encoded String representing the rsa private key
|
142
|
-
* @private
|
143
|
-
*/
|
144
|
-
JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {
|
145
|
-
var options = {
|
146
|
-
array: [
|
147
|
-
new KJUR.asn1.DERInteger({ int: 0 }),
|
148
|
-
new KJUR.asn1.DERInteger({ bigint: this.n }),
|
149
|
-
new KJUR.asn1.DERInteger({ int: this.e }),
|
150
|
-
new KJUR.asn1.DERInteger({ bigint: this.d }),
|
151
|
-
new KJUR.asn1.DERInteger({ bigint: this.p }),
|
152
|
-
new KJUR.asn1.DERInteger({ bigint: this.q }),
|
153
|
-
new KJUR.asn1.DERInteger({ bigint: this.dmp1 }),
|
154
|
-
new KJUR.asn1.DERInteger({ bigint: this.dmq1 }),
|
155
|
-
new KJUR.asn1.DERInteger({ bigint: this.coeff })
|
156
|
-
]
|
157
|
-
};
|
158
|
-
var seq = new KJUR.asn1.DERSequence(options);
|
159
|
-
return seq.getEncodedHex();
|
160
|
-
};
|
161
|
-
/**
|
162
|
-
* base64 (pem) encoded version of the DER encoded representation
|
163
|
-
* @returns {string} pem encoded representation without header and footer
|
164
|
-
* @public
|
165
|
-
*/
|
166
|
-
JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {
|
167
|
-
return hex2b64(this.getPrivateBaseKey());
|
168
|
-
};
|
169
|
-
/**
|
170
|
-
* Translate rsa parameters in a hex encoded string representing the rsa public key.
|
171
|
-
* The representation follow the ASN.1 notation :
|
172
|
-
* PublicKeyInfo ::= SEQUENCE {
|
173
|
-
* algorithm AlgorithmIdentifier,
|
174
|
-
* PublicKey BIT STRING
|
175
|
-
* }
|
176
|
-
* Where AlgorithmIdentifier is:
|
177
|
-
* AlgorithmIdentifier ::= SEQUENCE {
|
178
|
-
* algorithm OBJECT IDENTIFIER, the OID of the enc algorithm
|
179
|
-
* parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)
|
180
|
-
* }
|
181
|
-
* and PublicKey is a SEQUENCE encapsulated in a BIT STRING
|
182
|
-
* RSAPublicKey ::= SEQUENCE {
|
183
|
-
* modulus INTEGER, -- n
|
184
|
-
* publicExponent INTEGER -- e
|
185
|
-
* }
|
186
|
-
* @returns {string} DER Encoded String representing the rsa public key
|
187
|
-
* @private
|
188
|
-
*/
|
189
|
-
JSEncryptRSAKey.prototype.getPublicBaseKey = function () {
|
190
|
-
var first_sequence = new KJUR.asn1.DERSequence({
|
191
|
-
array: [
|
192
|
-
new KJUR.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),
|
193
|
-
new KJUR.asn1.DERNull()
|
194
|
-
]
|
195
|
-
});
|
196
|
-
var second_sequence = new KJUR.asn1.DERSequence({
|
197
|
-
array: [
|
198
|
-
new KJUR.asn1.DERInteger({ bigint: this.n }),
|
199
|
-
new KJUR.asn1.DERInteger({ int: this.e })
|
200
|
-
]
|
201
|
-
});
|
202
|
-
var bit_string = new KJUR.asn1.DERBitString({
|
203
|
-
hex: "00" + second_sequence.getEncodedHex()
|
204
|
-
});
|
205
|
-
var seq = new KJUR.asn1.DERSequence({
|
206
|
-
array: [
|
207
|
-
first_sequence,
|
208
|
-
bit_string
|
209
|
-
]
|
210
|
-
});
|
211
|
-
return seq.getEncodedHex();
|
212
|
-
};
|
213
|
-
/**
|
214
|
-
* base64 (pem) encoded version of the DER encoded representation
|
215
|
-
* @returns {string} pem encoded representation without header and footer
|
216
|
-
* @public
|
217
|
-
*/
|
218
|
-
JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {
|
219
|
-
return hex2b64(this.getPublicBaseKey());
|
220
|
-
};
|
221
|
-
/**
|
222
|
-
* wrap the string in block of width chars. The default value for rsa keys is 64
|
223
|
-
* characters.
|
224
|
-
* @param {string} str the pem encoded string without header and footer
|
225
|
-
* @param {Number} [width=64] - the length the string has to be wrapped at
|
226
|
-
* @returns {string}
|
227
|
-
* @private
|
228
|
-
*/
|
229
|
-
JSEncryptRSAKey.wordwrap = function (str, width) {
|
230
|
-
width = width || 64;
|
231
|
-
if (!str) {
|
232
|
-
return str;
|
233
|
-
}
|
234
|
-
var regex = "(.{1," + width + "})( +|$\n?)|(.{1," + width + "})";
|
235
|
-
return str.match(RegExp(regex, "g")).join("\n");
|
236
|
-
};
|
237
|
-
/**
|
238
|
-
* Retrieve the pem encoded private key
|
239
|
-
* @returns {string} the pem encoded private key with header/footer
|
240
|
-
* @public
|
241
|
-
*/
|
242
|
-
JSEncryptRSAKey.prototype.getPrivateKey = function () {
|
243
|
-
var key = "-----BEGIN RSA PRIVATE KEY-----\n";
|
244
|
-
key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\n";
|
245
|
-
key += "-----END RSA PRIVATE KEY-----";
|
246
|
-
return key;
|
247
|
-
};
|
248
|
-
/**
|
249
|
-
* Retrieve the pem encoded public key
|
250
|
-
* @returns {string} the pem encoded public key with header/footer
|
251
|
-
* @public
|
252
|
-
*/
|
253
|
-
JSEncryptRSAKey.prototype.getPublicKey = function () {
|
254
|
-
var key = "-----BEGIN PUBLIC KEY-----\n";
|
255
|
-
key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\n";
|
256
|
-
key += "-----END PUBLIC KEY-----";
|
257
|
-
return key;
|
258
|
-
};
|
259
|
-
/**
|
260
|
-
* Check if the object contains the necessary parameters to populate the rsa modulus
|
261
|
-
* and public exponent parameters.
|
262
|
-
* @param {Object} [obj={}] - An object that may contain the two public key
|
263
|
-
* parameters
|
264
|
-
* @returns {boolean} true if the object contains both the modulus and the public exponent
|
265
|
-
* properties (n and e)
|
266
|
-
* @todo check for types of n and e. N should be a parseable bigInt object, E should
|
267
|
-
* be a parseable integer number
|
268
|
-
* @private
|
269
|
-
*/
|
270
|
-
JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {
|
271
|
-
obj = obj || {};
|
272
|
-
return (obj.hasOwnProperty("n") &&
|
273
|
-
obj.hasOwnProperty("e"));
|
274
|
-
};
|
275
|
-
/**
|
276
|
-
* Check if the object contains ALL the parameters of an RSA key.
|
277
|
-
* @param {Object} [obj={}] - An object that may contain nine rsa key
|
278
|
-
* parameters
|
279
|
-
* @returns {boolean} true if the object contains all the parameters needed
|
280
|
-
* @todo check for types of the parameters all the parameters but the public exponent
|
281
|
-
* should be parseable bigint objects, the public exponent should be a parseable integer number
|
282
|
-
* @private
|
283
|
-
*/
|
284
|
-
JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {
|
285
|
-
obj = obj || {};
|
286
|
-
return (obj.hasOwnProperty("n") &&
|
287
|
-
obj.hasOwnProperty("e") &&
|
288
|
-
obj.hasOwnProperty("d") &&
|
289
|
-
obj.hasOwnProperty("p") &&
|
290
|
-
obj.hasOwnProperty("q") &&
|
291
|
-
obj.hasOwnProperty("dmp1") &&
|
292
|
-
obj.hasOwnProperty("dmq1") &&
|
293
|
-
obj.hasOwnProperty("coeff"));
|
294
|
-
};
|
295
|
-
/**
|
296
|
-
* Parse the properties of obj in the current rsa object. Obj should AT LEAST
|
297
|
-
* include the modulus and public exponent (n, e) parameters.
|
298
|
-
* @param {Object} obj - the object containing rsa parameters
|
299
|
-
* @private
|
300
|
-
*/
|
301
|
-
JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {
|
302
|
-
this.n = obj.n;
|
303
|
-
this.e = obj.e;
|
304
|
-
if (obj.hasOwnProperty("d")) {
|
305
|
-
this.d = obj.d;
|
306
|
-
this.p = obj.p;
|
307
|
-
this.q = obj.q;
|
308
|
-
this.dmp1 = obj.dmp1;
|
309
|
-
this.dmq1 = obj.dmq1;
|
310
|
-
this.coeff = obj.coeff;
|
311
|
-
}
|
312
|
-
};
|
313
|
-
return JSEncryptRSAKey;
|
314
|
-
}(RSAKey));
|
315
|
-
export { JSEncryptRSAKey };
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import { Int10 } from "./int10";
|
2
|
-
export declare class Stream {
|
3
|
-
constructor(enc: Stream | number[], pos?: number);
|
4
|
-
private enc;
|
5
|
-
pos: number;
|
6
|
-
get(pos?: number): number;
|
7
|
-
hexDigits: string;
|
8
|
-
hexByte(b: number): string;
|
9
|
-
hexDump(start: number, end: number, raw: boolean): string;
|
10
|
-
isASCII(start: number, end: number): boolean;
|
11
|
-
parseStringISO(start: number, end: number): string;
|
12
|
-
parseStringUTF(start: number, end: number): string;
|
13
|
-
parseStringBMP(start: number, end: number): string;
|
14
|
-
parseTime(start: number, end: number, shortYear: boolean): string;
|
15
|
-
parseInteger(start: number, end: number): string | 0 | -1;
|
16
|
-
parseBitString(start: number, end: number, maxLength: number): string;
|
17
|
-
parseOctetString(start: number, end: number, maxLength: number): string;
|
18
|
-
parseOID(start: number, end: number, maxLength: number): string;
|
19
|
-
}
|
20
|
-
export declare class ASN1 {
|
21
|
-
constructor(stream: Stream, header: number, length: number, tag: ASN1Tag, sub: ASN1[]);
|
22
|
-
private stream;
|
23
|
-
private header;
|
24
|
-
private length;
|
25
|
-
private tag;
|
26
|
-
sub: ASN1[];
|
27
|
-
typeName(): string;
|
28
|
-
content(maxLength: number): string | 0 | -1;
|
29
|
-
toString(): string;
|
30
|
-
toPrettyString(indent: string): string;
|
31
|
-
posStart(): number;
|
32
|
-
posContent(): number;
|
33
|
-
posEnd(): number;
|
34
|
-
toHexString(): string;
|
35
|
-
static decodeLength(stream: Stream): number;
|
36
|
-
/**
|
37
|
-
* Retrieve the hexadecimal value (as a string) of the current ASN.1 element
|
38
|
-
* @returns {string}
|
39
|
-
* @public
|
40
|
-
*/
|
41
|
-
getHexStringValue(): string;
|
42
|
-
static decode(str: Stream | number[]): ASN1;
|
43
|
-
}
|
44
|
-
export declare class ASN1Tag {
|
45
|
-
constructor(stream: Stream);
|
46
|
-
tagClass: number;
|
47
|
-
tagConstructed: boolean;
|
48
|
-
tagNumber: number | Int10;
|
49
|
-
isUniversal(): boolean;
|
50
|
-
isEOC(): boolean;
|
51
|
-
}
|
@@ -1,565 +0,0 @@
|
|
1
|
-
// ASN.1 JavaScript decoder
|
2
|
-
// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>
|
3
|
-
// Permission to use, copy, modify, and/or distribute this software for any
|
4
|
-
// purpose with or without fee is hereby granted, provided that the above
|
5
|
-
// copyright notice and this permission notice appear in all copies.
|
6
|
-
//
|
7
|
-
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
-
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
-
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
10
|
-
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
-
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
12
|
-
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
13
|
-
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
14
|
-
/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */
|
15
|
-
/*global oids */
|
16
|
-
import { Int10 } from "./int10";
|
17
|
-
var ellipsis = "\u2026";
|
18
|
-
var reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
19
|
-
var reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
20
|
-
function stringCut(str, len) {
|
21
|
-
if (str.length > len) {
|
22
|
-
str = str.substring(0, len) + ellipsis;
|
23
|
-
}
|
24
|
-
return str;
|
25
|
-
}
|
26
|
-
var Stream = /** @class */ (function () {
|
27
|
-
function Stream(enc, pos) {
|
28
|
-
this.hexDigits = "0123456789ABCDEF";
|
29
|
-
if (enc instanceof Stream) {
|
30
|
-
this.enc = enc.enc;
|
31
|
-
this.pos = enc.pos;
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
// enc should be an array or a binary string
|
35
|
-
this.enc = enc;
|
36
|
-
this.pos = pos;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
Stream.prototype.get = function (pos) {
|
40
|
-
if (pos === undefined) {
|
41
|
-
pos = this.pos++;
|
42
|
-
}
|
43
|
-
if (pos >= this.enc.length) {
|
44
|
-
throw new Error("Requesting byte offset " + pos + " on a stream of length " + this.enc.length);
|
45
|
-
}
|
46
|
-
return ("string" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];
|
47
|
-
};
|
48
|
-
Stream.prototype.hexByte = function (b) {
|
49
|
-
return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);
|
50
|
-
};
|
51
|
-
Stream.prototype.hexDump = function (start, end, raw) {
|
52
|
-
var s = "";
|
53
|
-
for (var i = start; i < end; ++i) {
|
54
|
-
s += this.hexByte(this.get(i));
|
55
|
-
if (raw !== true) {
|
56
|
-
switch (i & 0xF) {
|
57
|
-
case 0x7:
|
58
|
-
s += " ";
|
59
|
-
break;
|
60
|
-
case 0xF:
|
61
|
-
s += "\n";
|
62
|
-
break;
|
63
|
-
default:
|
64
|
-
s += " ";
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
|
-
return s;
|
69
|
-
};
|
70
|
-
Stream.prototype.isASCII = function (start, end) {
|
71
|
-
for (var i = start; i < end; ++i) {
|
72
|
-
var c = this.get(i);
|
73
|
-
if (c < 32 || c > 176) {
|
74
|
-
return false;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
return true;
|
78
|
-
};
|
79
|
-
Stream.prototype.parseStringISO = function (start, end) {
|
80
|
-
var s = "";
|
81
|
-
for (var i = start; i < end; ++i) {
|
82
|
-
s += String.fromCharCode(this.get(i));
|
83
|
-
}
|
84
|
-
return s;
|
85
|
-
};
|
86
|
-
Stream.prototype.parseStringUTF = function (start, end) {
|
87
|
-
var s = "";
|
88
|
-
for (var i = start; i < end;) {
|
89
|
-
var c = this.get(i++);
|
90
|
-
if (c < 128) {
|
91
|
-
s += String.fromCharCode(c);
|
92
|
-
}
|
93
|
-
else if ((c > 191) && (c < 224)) {
|
94
|
-
s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));
|
95
|
-
}
|
96
|
-
else {
|
97
|
-
s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));
|
98
|
-
}
|
99
|
-
}
|
100
|
-
return s;
|
101
|
-
};
|
102
|
-
Stream.prototype.parseStringBMP = function (start, end) {
|
103
|
-
var str = "";
|
104
|
-
var hi;
|
105
|
-
var lo;
|
106
|
-
for (var i = start; i < end;) {
|
107
|
-
hi = this.get(i++);
|
108
|
-
lo = this.get(i++);
|
109
|
-
str += String.fromCharCode((hi << 8) | lo);
|
110
|
-
}
|
111
|
-
return str;
|
112
|
-
};
|
113
|
-
Stream.prototype.parseTime = function (start, end, shortYear) {
|
114
|
-
var s = this.parseStringISO(start, end);
|
115
|
-
var m = (shortYear ? reTimeS : reTimeL).exec(s);
|
116
|
-
if (!m) {
|
117
|
-
return "Unrecognized time: " + s;
|
118
|
-
}
|
119
|
-
if (shortYear) {
|
120
|
-
// to avoid querying the timer, use the fixed range [1970, 2069]
|
121
|
-
// it will conform with ITU X.400 [-10, +40] sliding window until 2030
|
122
|
-
m[1] = +m[1];
|
123
|
-
m[1] += (+m[1] < 70) ? 2000 : 1900;
|
124
|
-
}
|
125
|
-
s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];
|
126
|
-
if (m[5]) {
|
127
|
-
s += ":" + m[5];
|
128
|
-
if (m[6]) {
|
129
|
-
s += ":" + m[6];
|
130
|
-
if (m[7]) {
|
131
|
-
s += "." + m[7];
|
132
|
-
}
|
133
|
-
}
|
134
|
-
}
|
135
|
-
if (m[8]) {
|
136
|
-
s += " UTC";
|
137
|
-
if (m[8] != "Z") {
|
138
|
-
s += m[8];
|
139
|
-
if (m[9]) {
|
140
|
-
s += ":" + m[9];
|
141
|
-
}
|
142
|
-
}
|
143
|
-
}
|
144
|
-
return s;
|
145
|
-
};
|
146
|
-
Stream.prototype.parseInteger = function (start, end) {
|
147
|
-
var v = this.get(start);
|
148
|
-
var neg = (v > 127);
|
149
|
-
var pad = neg ? 255 : 0;
|
150
|
-
var len;
|
151
|
-
var s = "";
|
152
|
-
// skip unuseful bits (not allowed in DER)
|
153
|
-
while (v == pad && ++start < end) {
|
154
|
-
v = this.get(start);
|
155
|
-
}
|
156
|
-
len = end - start;
|
157
|
-
if (len === 0) {
|
158
|
-
return neg ? -1 : 0;
|
159
|
-
}
|
160
|
-
// show bit length of huge integers
|
161
|
-
if (len > 4) {
|
162
|
-
s = v;
|
163
|
-
len <<= 3;
|
164
|
-
while (((+s ^ pad) & 0x80) == 0) {
|
165
|
-
s = +s << 1;
|
166
|
-
--len;
|
167
|
-
}
|
168
|
-
s = "(" + len + " bit)\n";
|
169
|
-
}
|
170
|
-
// decode the integer
|
171
|
-
if (neg) {
|
172
|
-
v = v - 256;
|
173
|
-
}
|
174
|
-
var n = new Int10(v);
|
175
|
-
for (var i = start + 1; i < end; ++i) {
|
176
|
-
n.mulAdd(256, this.get(i));
|
177
|
-
}
|
178
|
-
return s + n.toString();
|
179
|
-
};
|
180
|
-
Stream.prototype.parseBitString = function (start, end, maxLength) {
|
181
|
-
var unusedBit = this.get(start);
|
182
|
-
var lenBit = ((end - start - 1) << 3) - unusedBit;
|
183
|
-
var intro = "(" + lenBit + " bit)\n";
|
184
|
-
var s = "";
|
185
|
-
for (var i = start + 1; i < end; ++i) {
|
186
|
-
var b = this.get(i);
|
187
|
-
var skip = (i == end - 1) ? unusedBit : 0;
|
188
|
-
for (var j = 7; j >= skip; --j) {
|
189
|
-
s += (b >> j) & 1 ? "1" : "0";
|
190
|
-
}
|
191
|
-
if (s.length > maxLength) {
|
192
|
-
return intro + stringCut(s, maxLength);
|
193
|
-
}
|
194
|
-
}
|
195
|
-
return intro + s;
|
196
|
-
};
|
197
|
-
Stream.prototype.parseOctetString = function (start, end, maxLength) {
|
198
|
-
if (this.isASCII(start, end)) {
|
199
|
-
return stringCut(this.parseStringISO(start, end), maxLength);
|
200
|
-
}
|
201
|
-
var len = end - start;
|
202
|
-
var s = "(" + len + " byte)\n";
|
203
|
-
maxLength /= 2; // we work in bytes
|
204
|
-
if (len > maxLength) {
|
205
|
-
end = start + maxLength;
|
206
|
-
}
|
207
|
-
for (var i = start; i < end; ++i) {
|
208
|
-
s += this.hexByte(this.get(i));
|
209
|
-
}
|
210
|
-
if (len > maxLength) {
|
211
|
-
s += ellipsis;
|
212
|
-
}
|
213
|
-
return s;
|
214
|
-
};
|
215
|
-
Stream.prototype.parseOID = function (start, end, maxLength) {
|
216
|
-
var s = "";
|
217
|
-
var n = new Int10();
|
218
|
-
var bits = 0;
|
219
|
-
for (var i = start; i < end; ++i) {
|
220
|
-
var v = this.get(i);
|
221
|
-
n.mulAdd(128, v & 0x7F);
|
222
|
-
bits += 7;
|
223
|
-
if (!(v & 0x80)) { // finished
|
224
|
-
if (s === "") {
|
225
|
-
n = n.simplify();
|
226
|
-
if (n instanceof Int10) {
|
227
|
-
n.sub(80);
|
228
|
-
s = "2." + n.toString();
|
229
|
-
}
|
230
|
-
else {
|
231
|
-
var m = n < 80 ? n < 40 ? 0 : 1 : 2;
|
232
|
-
s = m + "." + (n - m * 40);
|
233
|
-
}
|
234
|
-
}
|
235
|
-
else {
|
236
|
-
s += "." + n.toString();
|
237
|
-
}
|
238
|
-
if (s.length > maxLength) {
|
239
|
-
return stringCut(s, maxLength);
|
240
|
-
}
|
241
|
-
n = new Int10();
|
242
|
-
bits = 0;
|
243
|
-
}
|
244
|
-
}
|
245
|
-
if (bits > 0) {
|
246
|
-
s += ".incomplete";
|
247
|
-
}
|
248
|
-
return s;
|
249
|
-
};
|
250
|
-
return Stream;
|
251
|
-
}());
|
252
|
-
export { Stream };
|
253
|
-
var ASN1 = /** @class */ (function () {
|
254
|
-
function ASN1(stream, header, length, tag, sub) {
|
255
|
-
if (!(tag instanceof ASN1Tag)) {
|
256
|
-
throw new Error("Invalid tag value.");
|
257
|
-
}
|
258
|
-
this.stream = stream;
|
259
|
-
this.header = header;
|
260
|
-
this.length = length;
|
261
|
-
this.tag = tag;
|
262
|
-
this.sub = sub;
|
263
|
-
}
|
264
|
-
ASN1.prototype.typeName = function () {
|
265
|
-
switch (this.tag.tagClass) {
|
266
|
-
case 0: // universal
|
267
|
-
switch (this.tag.tagNumber) {
|
268
|
-
case 0x00:
|
269
|
-
return "EOC";
|
270
|
-
case 0x01:
|
271
|
-
return "BOOLEAN";
|
272
|
-
case 0x02:
|
273
|
-
return "INTEGER";
|
274
|
-
case 0x03:
|
275
|
-
return "BIT_STRING";
|
276
|
-
case 0x04:
|
277
|
-
return "OCTET_STRING";
|
278
|
-
case 0x05:
|
279
|
-
return "NULL";
|
280
|
-
case 0x06:
|
281
|
-
return "OBJECT_IDENTIFIER";
|
282
|
-
case 0x07:
|
283
|
-
return "ObjectDescriptor";
|
284
|
-
case 0x08:
|
285
|
-
return "EXTERNAL";
|
286
|
-
case 0x09:
|
287
|
-
return "REAL";
|
288
|
-
case 0x0A:
|
289
|
-
return "ENUMERATED";
|
290
|
-
case 0x0B:
|
291
|
-
return "EMBEDDED_PDV";
|
292
|
-
case 0x0C:
|
293
|
-
return "UTF8String";
|
294
|
-
case 0x10:
|
295
|
-
return "SEQUENCE";
|
296
|
-
case 0x11:
|
297
|
-
return "SET";
|
298
|
-
case 0x12:
|
299
|
-
return "NumericString";
|
300
|
-
case 0x13:
|
301
|
-
return "PrintableString"; // ASCII subset
|
302
|
-
case 0x14:
|
303
|
-
return "TeletexString"; // aka T61String
|
304
|
-
case 0x15:
|
305
|
-
return "VideotexString";
|
306
|
-
case 0x16:
|
307
|
-
return "IA5String"; // ASCII
|
308
|
-
case 0x17:
|
309
|
-
return "UTCTime";
|
310
|
-
case 0x18:
|
311
|
-
return "GeneralizedTime";
|
312
|
-
case 0x19:
|
313
|
-
return "GraphicString";
|
314
|
-
case 0x1A:
|
315
|
-
return "VisibleString"; // ASCII subset
|
316
|
-
case 0x1B:
|
317
|
-
return "GeneralString";
|
318
|
-
case 0x1C:
|
319
|
-
return "UniversalString";
|
320
|
-
case 0x1E:
|
321
|
-
return "BMPString";
|
322
|
-
}
|
323
|
-
return "Universal_" + this.tag.tagNumber.toString();
|
324
|
-
case 1:
|
325
|
-
return "Application_" + this.tag.tagNumber.toString();
|
326
|
-
case 2:
|
327
|
-
return "[" + this.tag.tagNumber.toString() + "]"; // Context
|
328
|
-
case 3:
|
329
|
-
return "Private_" + this.tag.tagNumber.toString();
|
330
|
-
}
|
331
|
-
};
|
332
|
-
ASN1.prototype.content = function (maxLength) {
|
333
|
-
if (this.tag === undefined) {
|
334
|
-
return null;
|
335
|
-
}
|
336
|
-
if (maxLength === undefined) {
|
337
|
-
maxLength = Infinity;
|
338
|
-
}
|
339
|
-
var content = this.posContent();
|
340
|
-
var len = Math.abs(this.length);
|
341
|
-
if (!this.tag.isUniversal()) {
|
342
|
-
if (this.sub !== null) {
|
343
|
-
return "(" + this.sub.length + " elem)";
|
344
|
-
}
|
345
|
-
return this.stream.parseOctetString(content, content + len, maxLength);
|
346
|
-
}
|
347
|
-
switch (this.tag.tagNumber) {
|
348
|
-
case 0x01: // BOOLEAN
|
349
|
-
return (this.stream.get(content) === 0) ? "false" : "true";
|
350
|
-
case 0x02: // INTEGER
|
351
|
-
return this.stream.parseInteger(content, content + len);
|
352
|
-
case 0x03: // BIT_STRING
|
353
|
-
return this.sub ? "(" + this.sub.length + " elem)" :
|
354
|
-
this.stream.parseBitString(content, content + len, maxLength);
|
355
|
-
case 0x04: // OCTET_STRING
|
356
|
-
return this.sub ? "(" + this.sub.length + " elem)" :
|
357
|
-
this.stream.parseOctetString(content, content + len, maxLength);
|
358
|
-
// case 0x05: // NULL
|
359
|
-
case 0x06: // OBJECT_IDENTIFIER
|
360
|
-
return this.stream.parseOID(content, content + len, maxLength);
|
361
|
-
// case 0x07: // ObjectDescriptor
|
362
|
-
// case 0x08: // EXTERNAL
|
363
|
-
// case 0x09: // REAL
|
364
|
-
// case 0x0A: // ENUMERATED
|
365
|
-
// case 0x0B: // EMBEDDED_PDV
|
366
|
-
case 0x10: // SEQUENCE
|
367
|
-
case 0x11: // SET
|
368
|
-
if (this.sub !== null) {
|
369
|
-
return "(" + this.sub.length + " elem)";
|
370
|
-
}
|
371
|
-
else {
|
372
|
-
return "(no elem)";
|
373
|
-
}
|
374
|
-
case 0x0C: // UTF8String
|
375
|
-
return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);
|
376
|
-
case 0x12: // NumericString
|
377
|
-
case 0x13: // PrintableString
|
378
|
-
case 0x14: // TeletexString
|
379
|
-
case 0x15: // VideotexString
|
380
|
-
case 0x16: // IA5String
|
381
|
-
// case 0x19: // GraphicString
|
382
|
-
case 0x1A: // VisibleString
|
383
|
-
// case 0x1B: // GeneralString
|
384
|
-
// case 0x1C: // UniversalString
|
385
|
-
return stringCut(this.stream.parseStringISO(content, content + len), maxLength);
|
386
|
-
case 0x1E: // BMPString
|
387
|
-
return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);
|
388
|
-
case 0x17: // UTCTime
|
389
|
-
case 0x18: // GeneralizedTime
|
390
|
-
return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));
|
391
|
-
}
|
392
|
-
return null;
|
393
|
-
};
|
394
|
-
ASN1.prototype.toString = function () {
|
395
|
-
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? "null" : this.sub.length) + "]";
|
396
|
-
};
|
397
|
-
ASN1.prototype.toPrettyString = function (indent) {
|
398
|
-
if (indent === undefined) {
|
399
|
-
indent = "";
|
400
|
-
}
|
401
|
-
var s = indent + this.typeName() + " @" + this.stream.pos;
|
402
|
-
if (this.length >= 0) {
|
403
|
-
s += "+";
|
404
|
-
}
|
405
|
-
s += this.length;
|
406
|
-
if (this.tag.tagConstructed) {
|
407
|
-
s += " (constructed)";
|
408
|
-
}
|
409
|
-
else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {
|
410
|
-
s += " (encapsulates)";
|
411
|
-
}
|
412
|
-
s += "\n";
|
413
|
-
if (this.sub !== null) {
|
414
|
-
indent += " ";
|
415
|
-
for (var i = 0, max = this.sub.length; i < max; ++i) {
|
416
|
-
s += this.sub[i].toPrettyString(indent);
|
417
|
-
}
|
418
|
-
}
|
419
|
-
return s;
|
420
|
-
};
|
421
|
-
ASN1.prototype.posStart = function () {
|
422
|
-
return this.stream.pos;
|
423
|
-
};
|
424
|
-
ASN1.prototype.posContent = function () {
|
425
|
-
return this.stream.pos + this.header;
|
426
|
-
};
|
427
|
-
ASN1.prototype.posEnd = function () {
|
428
|
-
return this.stream.pos + this.header + Math.abs(this.length);
|
429
|
-
};
|
430
|
-
ASN1.prototype.toHexString = function () {
|
431
|
-
return this.stream.hexDump(this.posStart(), this.posEnd(), true);
|
432
|
-
};
|
433
|
-
ASN1.decodeLength = function (stream) {
|
434
|
-
var buf = stream.get();
|
435
|
-
var len = buf & 0x7F;
|
436
|
-
if (len == buf) {
|
437
|
-
return len;
|
438
|
-
}
|
439
|
-
// no reason to use Int10, as it would be a huge buffer anyways
|
440
|
-
if (len > 6) {
|
441
|
-
throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));
|
442
|
-
}
|
443
|
-
if (len === 0) {
|
444
|
-
return null;
|
445
|
-
} // undefined
|
446
|
-
buf = 0;
|
447
|
-
for (var i = 0; i < len; ++i) {
|
448
|
-
buf = (buf * 256) + stream.get();
|
449
|
-
}
|
450
|
-
return buf;
|
451
|
-
};
|
452
|
-
/**
|
453
|
-
* Retrieve the hexadecimal value (as a string) of the current ASN.1 element
|
454
|
-
* @returns {string}
|
455
|
-
* @public
|
456
|
-
*/
|
457
|
-
ASN1.prototype.getHexStringValue = function () {
|
458
|
-
var hexString = this.toHexString();
|
459
|
-
var offset = this.header * 2;
|
460
|
-
var length = this.length * 2;
|
461
|
-
return hexString.substr(offset, length);
|
462
|
-
};
|
463
|
-
ASN1.decode = function (str) {
|
464
|
-
var stream;
|
465
|
-
if (!(str instanceof Stream)) {
|
466
|
-
stream = new Stream(str, 0);
|
467
|
-
}
|
468
|
-
else {
|
469
|
-
stream = str;
|
470
|
-
}
|
471
|
-
var streamStart = new Stream(stream);
|
472
|
-
var tag = new ASN1Tag(stream);
|
473
|
-
var len = ASN1.decodeLength(stream);
|
474
|
-
var start = stream.pos;
|
475
|
-
var header = start - streamStart.pos;
|
476
|
-
var sub = null;
|
477
|
-
var getSub = function () {
|
478
|
-
var ret = [];
|
479
|
-
if (len !== null) {
|
480
|
-
// definite length
|
481
|
-
var end = start + len;
|
482
|
-
while (stream.pos < end) {
|
483
|
-
ret[ret.length] = ASN1.decode(stream);
|
484
|
-
}
|
485
|
-
if (stream.pos != end) {
|
486
|
-
throw new Error("Content size is not correct for container starting at offset " + start);
|
487
|
-
}
|
488
|
-
}
|
489
|
-
else {
|
490
|
-
// undefined length
|
491
|
-
try {
|
492
|
-
for (;;) {
|
493
|
-
var s = ASN1.decode(stream);
|
494
|
-
if (s.tag.isEOC()) {
|
495
|
-
break;
|
496
|
-
}
|
497
|
-
ret[ret.length] = s;
|
498
|
-
}
|
499
|
-
len = start - stream.pos; // undefined lengths are represented as negative values
|
500
|
-
}
|
501
|
-
catch (e) {
|
502
|
-
throw new Error("Exception while decoding undefined length content: " + e);
|
503
|
-
}
|
504
|
-
}
|
505
|
-
return ret;
|
506
|
-
};
|
507
|
-
if (tag.tagConstructed) {
|
508
|
-
// must have valid content
|
509
|
-
sub = getSub();
|
510
|
-
}
|
511
|
-
else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {
|
512
|
-
// sometimes BitString and OctetString are used to encapsulate ASN.1
|
513
|
-
try {
|
514
|
-
if (tag.tagNumber == 0x03) {
|
515
|
-
if (stream.get() != 0) {
|
516
|
-
throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
|
517
|
-
}
|
518
|
-
}
|
519
|
-
sub = getSub();
|
520
|
-
for (var i = 0; i < sub.length; ++i) {
|
521
|
-
if (sub[i].tag.isEOC()) {
|
522
|
-
throw new Error("EOC is not supposed to be actual content.");
|
523
|
-
}
|
524
|
-
}
|
525
|
-
}
|
526
|
-
catch (e) {
|
527
|
-
// but silently ignore when they don't
|
528
|
-
sub = null;
|
529
|
-
}
|
530
|
-
}
|
531
|
-
if (sub === null) {
|
532
|
-
if (len === null) {
|
533
|
-
throw new Error("We can't skip over an invalid tag with undefined length at offset " + start);
|
534
|
-
}
|
535
|
-
stream.pos = start + Math.abs(len);
|
536
|
-
}
|
537
|
-
return new ASN1(streamStart, header, len, tag, sub);
|
538
|
-
};
|
539
|
-
return ASN1;
|
540
|
-
}());
|
541
|
-
export { ASN1 };
|
542
|
-
var ASN1Tag = /** @class */ (function () {
|
543
|
-
function ASN1Tag(stream) {
|
544
|
-
var buf = stream.get();
|
545
|
-
this.tagClass = buf >> 6;
|
546
|
-
this.tagConstructed = ((buf & 0x20) !== 0);
|
547
|
-
this.tagNumber = buf & 0x1F;
|
548
|
-
if (this.tagNumber == 0x1F) { // long tag
|
549
|
-
var n = new Int10();
|
550
|
-
do {
|
551
|
-
buf = stream.get();
|
552
|
-
n.mulAdd(128, buf & 0x7F);
|
553
|
-
} while (buf & 0x80);
|
554
|
-
this.tagNumber = n.simplify();
|
555
|
-
}
|
556
|
-
}
|
557
|
-
ASN1Tag.prototype.isUniversal = function () {
|
558
|
-
return this.tagClass === 0x00;
|
559
|
-
};
|
560
|
-
ASN1Tag.prototype.isEOC = function () {
|
561
|
-
return this.tagClass === 0x00 && this.tagNumber === 0x00;
|
562
|
-
};
|
563
|
-
return ASN1Tag;
|
564
|
-
}());
|
565
|
-
export { ASN1Tag };
|