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.
Files changed (462) hide show
  1. checksums.yaml +4 -4
  2. data/authing_ruby.gemspec +4 -2
  3. data/lib/authing_ruby/common/PublicKeyManager.rb +12 -1
  4. data/lib/authing_ruby/version.rb +1 -1
  5. metadata +10 -467
  6. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +0 -23
  7. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +0 -21
  8. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +0 -303
  9. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +0 -520
  10. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +0 -2
  11. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +0 -91
  12. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +0 -7
  13. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +0 -20
  14. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +0 -1118
  15. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +0 -2859
  16. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
  17. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +0 -56
  18. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
  19. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +0 -31
  20. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
  21. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +0 -250
  22. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
  23. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +0 -665
  24. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
  25. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +0 -622
  26. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
  27. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +0 -180
  28. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +0 -341
  29. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +0 -69
  30. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +0 -14
  31. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +0 -127
  32. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +0 -19
  33. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +0 -151
  34. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +0 -18
  35. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +0 -81
  36. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +0 -121
  37. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +0 -2002
  38. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +0 -236
  39. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +0 -863
  40. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +0 -65
  41. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +0 -195
  42. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +0 -216
  43. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +0 -533
  44. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +0 -188
  45. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +0 -404
  46. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +0 -58
  47. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +0 -126
  48. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +0 -79
  49. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +0 -203
  50. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +0 -39
  51. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +0 -159
  52. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +0 -521
  53. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +0 -840
  54. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +0 -304
  55. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +0 -512
  56. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +0 -296
  57. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +0 -711
  58. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +0 -56
  59. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +0 -198
  60. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +0 -146
  61. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +0 -264
  62. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +0 -44
  63. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +0 -106
  64. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +0 -142
  65. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +0 -241
  66. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +0 -784
  67. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +0 -1251
  68. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +0 -114
  69. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +0 -259
  70. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +0 -992
  71. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +0 -96
  72. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +0 -30
  73. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +0 -126
  74. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +0 -31
  75. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +0 -67
  76. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +0 -53
  77. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +0 -343
  78. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +0 -1
  79. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +0 -5
  80. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +0 -6241
  81. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +0 -251
  82. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +0 -7
  83. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +0 -3
  84. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +0 -7
  85. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +0 -8
  86. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +0 -1118
  87. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +0 -2853
  88. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
  89. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +0 -53
  90. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
  91. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +0 -28
  92. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
  93. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +0 -247
  94. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
  95. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +0 -662
  96. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
  97. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +0 -619
  98. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
  99. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +0 -177
  100. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +0 -341
  101. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +0 -66
  102. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +0 -14
  103. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +0 -121
  104. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +0 -19
  105. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +0 -145
  106. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +0 -18
  107. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +0 -78
  108. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +0 -121
  109. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +0 -1999
  110. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +0 -236
  111. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +0 -860
  112. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +0 -65
  113. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +0 -192
  114. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +0 -216
  115. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +0 -530
  116. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +0 -188
  117. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +0 -401
  118. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +0 -58
  119. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +0 -123
  120. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +0 -79
  121. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +0 -197
  122. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +0 -39
  123. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +0 -153
  124. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +0 -521
  125. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +0 -818
  126. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +0 -304
  127. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +0 -509
  128. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +0 -296
  129. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +0 -708
  130. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +0 -56
  131. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +0 -195
  132. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +0 -146
  133. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +0 -261
  134. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +0 -44
  135. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +0 -103
  136. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +0 -142
  137. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +0 -238
  138. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +0 -784
  139. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +0 -1248
  140. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +0 -114
  141. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +0 -256
  142. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +0 -992
  143. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +0 -93
  144. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +0 -30
  145. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +0 -123
  146. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +0 -31
  147. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +0 -62
  148. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +0 -53
  149. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +0 -336
  150. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +0 -1
  151. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +0 -2
  152. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +0 -6241
  153. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +0 -248
  154. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +0 -7
  155. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +0 -1
  156. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +0 -7
  157. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +0 -30
  158. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +0 -1118
  159. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +0 -2869
  160. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
  161. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +0 -66
  162. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
  163. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +0 -41
  164. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
  165. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +0 -260
  166. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
  167. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +0 -675
  168. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
  169. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +0 -632
  170. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
  171. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +0 -190
  172. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +0 -341
  173. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +0 -79
  174. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +0 -14
  175. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +0 -137
  176. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +0 -19
  177. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +0 -161
  178. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +0 -18
  179. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +0 -91
  180. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +0 -121
  181. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +0 -2012
  182. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +0 -236
  183. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +0 -873
  184. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +0 -65
  185. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +0 -205
  186. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +0 -216
  187. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +0 -543
  188. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +0 -188
  189. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +0 -414
  190. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +0 -58
  191. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +0 -136
  192. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +0 -79
  193. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +0 -213
  194. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +0 -39
  195. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +0 -169
  196. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +0 -521
  197. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +0 -850
  198. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +0 -304
  199. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +0 -522
  200. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +0 -296
  201. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +0 -721
  202. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +0 -56
  203. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +0 -208
  204. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +0 -146
  205. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +0 -274
  206. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +0 -44
  207. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +0 -116
  208. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +0 -142
  209. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +0 -251
  210. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +0 -784
  211. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +0 -1261
  212. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +0 -114
  213. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +0 -269
  214. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +0 -992
  215. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +0 -106
  216. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +0 -30
  217. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +0 -136
  218. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +0 -31
  219. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +0 -77
  220. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +0 -53
  221. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +0 -353
  222. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +0 -1
  223. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +0 -15
  224. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +0 -6241
  225. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +0 -261
  226. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +0 -7
  227. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +0 -13
  228. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +0 -413
  229. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +0 -19
  230. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +0 -709
  231. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +0 -162
  232. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +0 -1715
  233. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +0 -1
  234. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +0 -3
  235. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +0 -1
  236. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +0 -157
  237. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +0 -1
  238. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +0 -37
  239. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +0 -279
  240. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +0 -180
  241. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +0 -53
  242. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +0 -19
  243. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +0 -57
  244. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +0 -5
  245. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +0 -94
  246. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +0 -52
  247. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +0 -7
  248. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +0 -20
  249. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +0 -18
  250. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +0 -79
  251. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +0 -42
  252. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +0 -73
  253. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +0 -25
  254. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +0 -20
  255. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +0 -97
  256. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +0 -7
  257. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +0 -11
  258. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +0 -71
  259. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +0 -14
  260. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +0 -53
  261. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
  262. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
  263. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
  264. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  265. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
  266. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +0 -27
  267. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +0 -344
  268. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +0 -84
  269. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +0 -18
  270. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +0 -155
  271. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +0 -1
  272. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +0 -1
  273. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +0 -322
  274. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +0 -60
  275. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +0 -129
  276. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +0 -21
  277. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +0 -45
  278. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.node.json +0 -0
  279. data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/webpack.config.js +0 -41
  280. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +0 -685
  281. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +0 -19
  282. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +0 -800
  283. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +0 -162
  284. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +0 -1756
  285. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +0 -1
  286. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +0 -3
  287. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +0 -1
  288. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +0 -161
  289. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +0 -1
  290. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +0 -37
  291. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +0 -303
  292. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +0 -179
  293. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +0 -56
  294. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +0 -19
  295. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +0 -57
  296. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +0 -5
  297. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +0 -95
  298. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +0 -52
  299. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +0 -7
  300. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +0 -20
  301. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +0 -18
  302. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +0 -79
  303. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +0 -42
  304. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +0 -87
  305. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +0 -25
  306. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +0 -20
  307. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +0 -98
  308. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +0 -7
  309. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +0 -11
  310. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +0 -70
  311. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +0 -14
  312. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +0 -53
  313. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
  314. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
  315. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
  316. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
  317. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  318. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
  319. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +0 -27
  320. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +0 -351
  321. data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +0 -86
  322. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +0 -28
  323. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +0 -24
  324. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +0 -249
  325. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +0 -234
  326. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +0 -35
  327. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +0 -890
  328. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +0 -797
  329. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +0 -6059
  330. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
  331. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +0 -136
  332. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +0 -18
  333. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +0 -18
  334. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +0 -149
  335. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +0 -18
  336. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +0 -134
  337. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +0 -66
  338. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +0 -18
  339. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +0 -18
  340. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +0 -18
  341. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +0 -18
  342. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +0 -18
  343. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +0 -18
  344. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +0 -18
  345. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +0 -18
  346. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +0 -18
  347. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +0 -143
  348. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +0 -18
  349. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +0 -76
  350. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +0 -268
  351. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +0 -80
  352. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
  353. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +0 -58
  354. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +0 -40
  355. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +0 -54
  356. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +0 -38
  357. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +0 -49
  358. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +0 -44
  359. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +0 -40
  360. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +0 -30
  361. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +0 -18
  362. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +0 -47
  363. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +0 -145
  364. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +0 -190
  365. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +0 -192
  366. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +0 -139
  367. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +0 -267
  368. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +0 -150
  369. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +0 -80
  370. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +0 -199
  371. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +0 -326
  372. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +0 -83
  373. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +0 -326
  374. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +0 -779
  375. data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +0 -304
  376. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +0 -395
  377. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +0 -19
  378. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +0 -58
  379. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +0 -368
  380. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +0 -70
  381. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +0 -1
  382. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +0 -43
  383. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +0 -195
  384. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +0 -225
  385. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +0 -10
  386. data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +0 -186
  387. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/CHANGELOG.md +0 -210
  388. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/LICENSE +0 -23
  389. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/README.md +0 -275
  390. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/config.js +0 -11
  391. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/cli-options.js +0 -13
  392. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/env-options.js +0 -18
  393. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/main.js +0 -118
  394. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/package.json +0 -57
  395. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/index.d.ts +0 -59
  396. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/test.ts +0 -19
  397. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tsconfig.json +0 -15
  398. data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tslint.json +0 -6
  399. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +0 -18
  400. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +0 -148
  401. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +0 -14
  402. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +0 -1
  403. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +0 -1
  404. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +0 -531
  405. data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +0 -59
  406. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +0 -107
  407. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +0 -192
  408. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +0 -249
  409. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +0 -2
  410. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +0 -8
  411. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +0 -116
  412. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +0 -186
  413. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +0 -142
  414. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +0 -315
  415. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +0 -3
  416. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +0 -3
  417. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +0 -51
  418. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +0 -565
  419. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +0 -5
  420. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +0 -88
  421. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +0 -3
  422. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +0 -64
  423. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +0 -9
  424. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +0 -87
  425. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +0 -9778
  426. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +0 -1962
  427. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +0 -3
  428. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +0 -76
  429. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +0 -98
  430. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +0 -1754
  431. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +0 -10
  432. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +0 -46
  433. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +0 -3
  434. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +0 -76
  435. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +0 -23
  436. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +0 -373
  437. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +0 -7
  438. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +0 -58
  439. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +0 -1593
  440. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +0 -69
  441. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +0 -1
  442. data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +0 -49
  443. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +0 -78
  444. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +0 -21
  445. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +0 -55
  446. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +0 -20
  447. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +0 -125
  448. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +0 -1
  449. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +0 -2
  450. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +0 -38
  451. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +0 -33
  452. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +0 -26
  453. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +0 -37
  454. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +0 -16
  455. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +0 -53
  456. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +0 -29
  457. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +0 -46
  458. data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +0 -1
  459. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +0 -152
  460. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +0 -21
  461. data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +0 -37
  462. 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,3 +0,0 @@
1
- import { JSEncrypt } from './JSEncrypt';
2
- export { JSEncrypt };
3
- export default JSEncrypt;
@@ -1,3 +0,0 @@
1
- import { JSEncrypt } from './JSEncrypt';
2
- export { JSEncrypt };
3
- export default JSEncrypt;
@@ -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 };