@okta/okta-auth-js 6.9.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1460) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +76 -41
  3. package/cjs/authn/AuthnTransactionImpl.js +44 -0
  4. package/cjs/authn/AuthnTransactionImpl.js.map +1 -0
  5. package/cjs/authn/api.js +105 -0
  6. package/cjs/authn/api.js.map +1 -0
  7. package/cjs/authn/factory.js +45 -0
  8. package/cjs/authn/factory.js.map +1 -0
  9. package/cjs/authn/index.js +41 -0
  10. package/cjs/authn/index.js.map +1 -0
  11. package/cjs/authn/mixin.js +82 -0
  12. package/cjs/authn/mixin.js.map +1 -0
  13. package/cjs/authn/types.js +2 -0
  14. package/cjs/authn/types.js.map +1 -0
  15. package/cjs/authn/util/flattenEmbedded.js +44 -0
  16. package/cjs/authn/util/flattenEmbedded.js.map +1 -0
  17. package/cjs/authn/util/link2fn.js +108 -0
  18. package/cjs/authn/util/link2fn.js.map +1 -0
  19. package/cjs/authn/util/links2fns.js +47 -0
  20. package/cjs/authn/util/links2fns.js.map +1 -0
  21. package/cjs/authn/util/poll.js +136 -0
  22. package/cjs/authn/util/poll.js.map +1 -0
  23. package/cjs/authn/util/stateToken.js +32 -0
  24. package/cjs/authn/util/stateToken.js.map +1 -0
  25. package/cjs/base/factory.js +47 -0
  26. package/cjs/base/factory.js.map +1 -0
  27. package/cjs/base/index.js +41 -0
  28. package/cjs/base/index.js.map +1 -0
  29. package/cjs/base/options.js +24 -0
  30. package/cjs/base/options.js.map +1 -0
  31. package/cjs/base/types.js +2 -0
  32. package/cjs/base/types.js.map +1 -0
  33. package/cjs/browser/browserStorage.js +12 -35
  34. package/cjs/browser/browserStorage.js.map +1 -1
  35. package/cjs/browser/fingerprint.js +3 -9
  36. package/cjs/browser/fingerprint.js.map +1 -1
  37. package/cjs/clock.js +1 -5
  38. package/cjs/clock.js.map +1 -1
  39. package/cjs/constants.js +1 -7
  40. package/cjs/constants.js.map +1 -1
  41. package/cjs/core/AuthStateManager.js +225 -0
  42. package/cjs/core/AuthStateManager.js.map +1 -0
  43. package/cjs/core/ServiceManager/browser.js +157 -0
  44. package/cjs/core/ServiceManager/browser.js.map +1 -0
  45. package/cjs/core/ServiceManager/index.js +15 -0
  46. package/cjs/core/ServiceManager/index.js.map +1 -0
  47. package/cjs/core/ServiceManager/node.js +42 -0
  48. package/cjs/core/ServiceManager/node.js.map +1 -0
  49. package/cjs/core/factory.js +26 -0
  50. package/cjs/core/factory.js.map +1 -0
  51. package/cjs/core/index.js +93 -0
  52. package/cjs/core/index.js.map +1 -0
  53. package/cjs/core/mixin.js +78 -0
  54. package/cjs/core/mixin.js.map +1 -0
  55. package/cjs/core/options.js +29 -0
  56. package/cjs/core/options.js.map +1 -0
  57. package/cjs/core/storage.js +10 -0
  58. package/cjs/core/storage.js.map +1 -0
  59. package/cjs/{types → core/types}/AuthState.js +0 -0
  60. package/cjs/core/types/AuthState.js.map +1 -0
  61. package/cjs/{types → core/types}/Service.js +0 -0
  62. package/cjs/core/types/Service.js.map +1 -0
  63. package/cjs/{types → core/types}/api.js +0 -0
  64. package/cjs/core/types/api.js.map +1 -0
  65. package/cjs/core/types/index.js +41 -0
  66. package/cjs/core/types/index.js.map +1 -0
  67. package/cjs/crypto/base64.js +1 -7
  68. package/cjs/crypto/base64.js.map +1 -1
  69. package/cjs/crypto/index.js +17 -6
  70. package/cjs/crypto/index.js.map +1 -1
  71. package/cjs/crypto/node.js +4 -10
  72. package/cjs/crypto/node.js.map +1 -1
  73. package/cjs/crypto/oidcHash.js +1 -5
  74. package/cjs/crypto/oidcHash.js.map +1 -1
  75. package/cjs/crypto/types.js +2 -0
  76. package/cjs/crypto/types.js.map +1 -0
  77. package/cjs/crypto/webcrypto.js +1 -3
  78. package/cjs/crypto/webcrypto.js.map +1 -1
  79. package/cjs/errors/AuthApiError.js +1 -1
  80. package/cjs/errors/AuthApiError.js.map +1 -1
  81. package/cjs/errors/AuthPollStopError.js +1 -1
  82. package/cjs/errors/AuthSdkError.js +1 -1
  83. package/cjs/errors/AuthSdkError.js.map +1 -1
  84. package/cjs/errors/CustomError.js +1 -5
  85. package/cjs/errors/CustomError.js.map +1 -1
  86. package/cjs/errors/OAuthError.js +1 -1
  87. package/cjs/errors/index.js +23 -1
  88. package/cjs/errors/index.js.map +1 -1
  89. package/cjs/errors/types.js +2 -0
  90. package/cjs/errors/types.js.map +1 -0
  91. package/cjs/exports/authn.js +55 -0
  92. package/cjs/exports/authn.js.map +1 -0
  93. package/cjs/exports/cdn/authn.js +11 -0
  94. package/cjs/exports/cdn/authn.js.map +1 -0
  95. package/cjs/exports/cdn/core.js +11 -0
  96. package/cjs/exports/cdn/core.js.map +1 -0
  97. package/cjs/exports/cdn/default.js +11 -0
  98. package/cjs/exports/cdn/default.js.map +1 -0
  99. package/cjs/exports/cdn/idx.js +11 -0
  100. package/cjs/exports/cdn/idx.js.map +1 -0
  101. package/cjs/exports/cdn/myaccount.js +11 -0
  102. package/cjs/exports/cdn/myaccount.js.map +1 -0
  103. package/cjs/exports/common.js +141 -0
  104. package/cjs/exports/common.js.map +1 -0
  105. package/cjs/exports/core.js +42 -0
  106. package/cjs/exports/core.js.map +1 -0
  107. package/cjs/exports/default.js +81 -0
  108. package/cjs/exports/default.js.map +1 -0
  109. package/cjs/exports/idx.js +50 -0
  110. package/cjs/exports/idx.js.map +1 -0
  111. package/cjs/exports/myaccount.js +54 -0
  112. package/cjs/exports/myaccount.js.map +1 -0
  113. package/cjs/fetch/fetchRequest.js +7 -25
  114. package/cjs/fetch/fetchRequest.js.map +1 -1
  115. package/cjs/http/OktaUserAgent.js +56 -0
  116. package/cjs/http/OktaUserAgent.js.map +1 -0
  117. package/cjs/http/headers.js.map +1 -1
  118. package/cjs/http/index.js +54 -4
  119. package/cjs/http/index.js.map +1 -1
  120. package/cjs/http/mixin.js +46 -0
  121. package/cjs/http/mixin.js.map +1 -0
  122. package/cjs/http/options.js +36 -0
  123. package/cjs/http/options.js.map +1 -0
  124. package/cjs/http/request.js +4 -10
  125. package/cjs/http/request.js.map +1 -1
  126. package/cjs/http/types.js +2 -0
  127. package/cjs/http/types.js.map +1 -0
  128. package/cjs/idx/IdxTransactionManager.js +85 -0
  129. package/cjs/idx/IdxTransactionManager.js.map +1 -0
  130. package/cjs/idx/authenticate.js +1 -1
  131. package/cjs/idx/authenticate.js.map +1 -1
  132. package/cjs/idx/authenticator/index.js +8 -10
  133. package/cjs/idx/authenticator/index.js.map +1 -1
  134. package/cjs/idx/authenticator/util.js +1 -5
  135. package/cjs/idx/authenticator/util.js.map +1 -1
  136. package/cjs/idx/cancel.js.map +1 -1
  137. package/cjs/idx/emailVerify.js +1 -1
  138. package/cjs/idx/emailVerify.js.map +1 -1
  139. package/cjs/idx/factory/OktaAuthIdx.js +14 -0
  140. package/cjs/idx/factory/OktaAuthIdx.js.map +1 -0
  141. package/cjs/idx/factory/api.js +91 -0
  142. package/cjs/idx/factory/api.js.map +1 -0
  143. package/cjs/idx/factory/index.js +28 -0
  144. package/cjs/idx/factory/index.js.map +1 -0
  145. package/cjs/idx/flow/FlowSpecification.js.map +1 -1
  146. package/cjs/idx/flow/index.js +6 -8
  147. package/cjs/idx/flow/index.js.map +1 -1
  148. package/cjs/idx/handleInteractionCodeRedirect.js +1 -5
  149. package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
  150. package/cjs/idx/idxState/index.js +3 -5
  151. package/cjs/idx/idxState/index.js.map +1 -1
  152. package/cjs/idx/idxState/v1/actionParser.js +2 -6
  153. package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
  154. package/cjs/idx/idxState/v1/generateIdxAction.js +5 -10
  155. package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
  156. package/cjs/idx/idxState/v1/idxResponseParser.js +23 -21
  157. package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
  158. package/cjs/idx/idxState/v1/makeIdxState.js +4 -10
  159. package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
  160. package/cjs/idx/idxState/v1/remediationParser.js +2 -6
  161. package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
  162. package/cjs/idx/index.js +85 -3
  163. package/cjs/idx/index.js.map +1 -1
  164. package/cjs/idx/interact.js +2 -2
  165. package/cjs/idx/interact.js.map +1 -1
  166. package/cjs/idx/introspect.js +1 -3
  167. package/cjs/idx/introspect.js.map +1 -1
  168. package/cjs/idx/mixin.js +28 -0
  169. package/cjs/idx/mixin.js.map +1 -0
  170. package/cjs/idx/options.js +32 -0
  171. package/cjs/idx/options.js.map +1 -0
  172. package/cjs/idx/poll.js +3 -13
  173. package/cjs/idx/poll.js.map +1 -1
  174. package/cjs/idx/proceed.js.map +1 -1
  175. package/cjs/idx/recoverPassword.js.map +1 -1
  176. package/cjs/idx/register.js +4 -10
  177. package/cjs/idx/register.js.map +1 -1
  178. package/cjs/idx/remediate.js +46 -69
  179. package/cjs/idx/remediate.js.map +1 -1
  180. package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +7 -19
  181. package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
  182. package/cjs/idx/remediators/AuthenticatorVerificationData.js +6 -56
  183. package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
  184. package/cjs/idx/remediators/Base/AuthenticatorData.js +10 -48
  185. package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
  186. package/cjs/idx/remediators/Base/Remediator.js +25 -51
  187. package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
  188. package/cjs/idx/remediators/Base/SelectAuthenticator.js +10 -48
  189. package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
  190. package/cjs/idx/remediators/Base/VerifyAuthenticator.js +5 -17
  191. package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
  192. package/cjs/idx/remediators/ChallengeAuthenticator.js +2 -2
  193. package/cjs/idx/remediators/ChallengePoll.js +3 -5
  194. package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
  195. package/cjs/idx/remediators/EnrollAuthenticator.js +2 -2
  196. package/cjs/idx/remediators/EnrollPoll.js +6 -16
  197. package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
  198. package/cjs/idx/remediators/EnrollProfile.js +12 -28
  199. package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
  200. package/cjs/idx/remediators/EnrollmentChannelData.js +9 -25
  201. package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
  202. package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +5 -23
  203. package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
  204. package/cjs/idx/remediators/GenericRemediator/index.js +1 -3
  205. package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
  206. package/cjs/idx/remediators/GenericRemediator/util.js +11 -35
  207. package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
  208. package/cjs/idx/remediators/Identify.js +3 -5
  209. package/cjs/idx/remediators/Identify.js.map +1 -1
  210. package/cjs/idx/remediators/ReEnrollAuthenticator.js +3 -5
  211. package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
  212. package/cjs/idx/remediators/RedirectIdp.js +2 -2
  213. package/cjs/idx/remediators/ResetAuthenticator.js +2 -2
  214. package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +4 -6
  215. package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
  216. package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +2 -2
  217. package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +5 -9
  218. package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
  219. package/cjs/idx/remediators/SelectEnrollProfile.js +2 -2
  220. package/cjs/idx/remediators/SelectEnrollmentChannel.js +12 -41
  221. package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
  222. package/cjs/idx/remediators/Skip.js +3 -5
  223. package/cjs/idx/remediators/Skip.js.map +1 -1
  224. package/cjs/idx/remediators/index.js +20 -22
  225. package/cjs/idx/remediators/index.js.map +1 -1
  226. package/cjs/idx/remediators/util.js +3 -13
  227. package/cjs/idx/remediators/util.js.map +1 -1
  228. package/cjs/idx/run.js +6 -47
  229. package/cjs/idx/run.js.map +1 -1
  230. package/cjs/idx/startTransaction.js.map +1 -1
  231. package/cjs/idx/storage.js +89 -0
  232. package/cjs/idx/storage.js.map +1 -0
  233. package/cjs/idx/transactionMeta.js.map +1 -1
  234. package/cjs/idx/types/api.js +12 -0
  235. package/cjs/idx/types/api.js.map +1 -1
  236. package/cjs/idx/types/index.js +28 -4
  237. package/cjs/idx/types/index.js.map +1 -1
  238. package/cjs/idx/types/meta.js +2 -0
  239. package/cjs/idx/types/meta.js.map +1 -0
  240. package/cjs/idx/types/options.js.map +1 -1
  241. package/cjs/idx/types/storage.js +2 -0
  242. package/cjs/idx/types/storage.js.map +1 -0
  243. package/cjs/idx/unlockAccount.js +2 -6
  244. package/cjs/idx/unlockAccount.js.map +1 -1
  245. package/cjs/idx/util.js +17 -60
  246. package/cjs/idx/util.js.map +1 -1
  247. package/cjs/idx/webauthn.js +101 -0
  248. package/cjs/idx/webauthn.js.map +1 -0
  249. package/cjs/myaccount/api.js +3 -5
  250. package/cjs/myaccount/api.js.map +1 -1
  251. package/cjs/myaccount/factory.js +14 -0
  252. package/cjs/myaccount/factory.js.map +1 -0
  253. package/cjs/myaccount/index.js +28 -4
  254. package/cjs/myaccount/index.js.map +1 -1
  255. package/cjs/myaccount/mixin.js +23 -0
  256. package/cjs/myaccount/mixin.js.map +1 -0
  257. package/cjs/myaccount/request.js +3 -15
  258. package/cjs/myaccount/request.js.map +1 -1
  259. package/cjs/myaccount/transactions/Base.js +1 -5
  260. package/cjs/myaccount/transactions/Base.js.map +1 -1
  261. package/cjs/myaccount/transactions/EmailChallengeTransaction.js +1 -1
  262. package/cjs/myaccount/transactions/EmailStatusTransaction.js +1 -1
  263. package/cjs/myaccount/transactions/EmailTransaction.js +1 -1
  264. package/cjs/myaccount/transactions/PhoneTransaction.js +1 -1
  265. package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +1 -1
  266. package/cjs/myaccount/transactions/ProfileTransaction.js +1 -1
  267. package/cjs/myaccount/transactions/index.js +1 -1
  268. package/cjs/myaccount/types.js.map +1 -1
  269. package/cjs/oidc/TokenManager.js +479 -0
  270. package/cjs/oidc/TokenManager.js.map +1 -0
  271. package/cjs/oidc/TransactionManager.js +107 -0
  272. package/cjs/oidc/TransactionManager.js.map +1 -0
  273. package/cjs/oidc/decodeToken.js.map +1 -1
  274. package/cjs/oidc/endpoints/authorize.js +2 -8
  275. package/cjs/oidc/endpoints/authorize.js.map +1 -1
  276. package/cjs/oidc/endpoints/index.js +3 -5
  277. package/cjs/oidc/endpoints/index.js.map +1 -1
  278. package/cjs/oidc/endpoints/token.js +3 -15
  279. package/cjs/oidc/endpoints/token.js.map +1 -1
  280. package/cjs/oidc/endpoints/well-known.js +3 -7
  281. package/cjs/oidc/endpoints/well-known.js.map +1 -1
  282. package/cjs/oidc/exchangeCodeForTokens.js +2 -10
  283. package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
  284. package/cjs/oidc/factory/OktaAuthOAuth.js +23 -0
  285. package/cjs/oidc/factory/OktaAuthOAuth.js.map +1 -0
  286. package/cjs/oidc/factory/api.js +104 -0
  287. package/cjs/oidc/factory/api.js.map +1 -0
  288. package/cjs/oidc/factory/index.js +28 -0
  289. package/cjs/oidc/factory/index.js.map +1 -0
  290. package/cjs/oidc/getToken.js +5 -9
  291. package/cjs/oidc/getToken.js.map +1 -1
  292. package/cjs/oidc/getUserInfo.js +4 -8
  293. package/cjs/oidc/getUserInfo.js.map +1 -1
  294. package/cjs/oidc/getWithPopup.js +2 -8
  295. package/cjs/oidc/getWithPopup.js.map +1 -1
  296. package/cjs/oidc/getWithRedirect.js +2 -8
  297. package/cjs/oidc/getWithRedirect.js.map +1 -1
  298. package/cjs/oidc/getWithoutPrompt.js +2 -8
  299. package/cjs/oidc/getWithoutPrompt.js.map +1 -1
  300. package/cjs/oidc/handleOAuthResponse.js +3 -9
  301. package/cjs/oidc/handleOAuthResponse.js.map +1 -1
  302. package/cjs/oidc/index.js +100 -4
  303. package/cjs/oidc/index.js.map +1 -1
  304. package/cjs/oidc/mixin/browser.js +62 -0
  305. package/cjs/oidc/mixin/browser.js.map +1 -0
  306. package/cjs/oidc/mixin/index.js +342 -0
  307. package/cjs/oidc/mixin/index.js.map +1 -0
  308. package/cjs/oidc/mixin/node.js +44 -0
  309. package/cjs/oidc/mixin/node.js.map +1 -0
  310. package/cjs/oidc/options/OAuthOptionsConstructor.js +120 -0
  311. package/cjs/oidc/options/OAuthOptionsConstructor.js.map +1 -0
  312. package/cjs/oidc/options/browser.js +6 -0
  313. package/cjs/oidc/options/browser.js.map +1 -0
  314. package/cjs/oidc/options/index.js +15 -0
  315. package/cjs/oidc/options/index.js.map +1 -0
  316. package/cjs/oidc/options/node.js +6 -0
  317. package/cjs/oidc/options/node.js.map +1 -0
  318. package/cjs/oidc/parseFromUrl.js +8 -11
  319. package/cjs/oidc/parseFromUrl.js.map +1 -1
  320. package/cjs/oidc/renewToken.js +1 -1
  321. package/cjs/oidc/renewToken.js.map +1 -1
  322. package/cjs/oidc/renewTokens.js +1 -5
  323. package/cjs/oidc/renewTokens.js.map +1 -1
  324. package/cjs/oidc/renewTokensWithRefresh.js +1 -5
  325. package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
  326. package/cjs/oidc/revokeToken.js +3 -7
  327. package/cjs/oidc/revokeToken.js.map +1 -1
  328. package/cjs/oidc/storage.js +43 -0
  329. package/cjs/oidc/storage.js.map +1 -0
  330. package/cjs/{types → oidc/types}/JWT.js +0 -0
  331. package/cjs/oidc/types/JWT.js.map +1 -0
  332. package/cjs/{types → oidc/types}/Token.js +0 -0
  333. package/cjs/oidc/types/Token.js.map +1 -0
  334. package/cjs/{types → oidc/types}/TokenManager.js +0 -0
  335. package/cjs/oidc/types/TokenManager.js.map +1 -0
  336. package/cjs/oidc/types/Transaction.js +68 -0
  337. package/cjs/oidc/types/Transaction.js.map +1 -0
  338. package/cjs/oidc/types/TransactionManager.js +2 -0
  339. package/cjs/oidc/types/TransactionManager.js.map +1 -0
  340. package/cjs/{types → oidc/types}/UserClaims.js +0 -0
  341. package/cjs/oidc/types/UserClaims.js.map +1 -0
  342. package/cjs/oidc/types/api.js +2 -0
  343. package/cjs/oidc/types/api.js.map +1 -0
  344. package/cjs/oidc/types/index.js +145 -0
  345. package/cjs/oidc/types/index.js.map +1 -0
  346. package/cjs/oidc/types/meta.js +2 -0
  347. package/cjs/oidc/types/meta.js.map +1 -0
  348. package/cjs/oidc/types/options.js +2 -0
  349. package/cjs/oidc/types/options.js.map +1 -0
  350. package/cjs/oidc/types/proto.js +2 -0
  351. package/cjs/oidc/types/proto.js.map +1 -0
  352. package/cjs/oidc/types/storage.js +2 -0
  353. package/cjs/oidc/types/storage.js.map +1 -0
  354. package/cjs/oidc/util/browser.js +1 -5
  355. package/cjs/oidc/util/browser.js.map +1 -1
  356. package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
  357. package/cjs/oidc/util/errors.js.map +1 -1
  358. package/cjs/oidc/util/index.js +12 -14
  359. package/cjs/oidc/util/index.js.map +1 -1
  360. package/cjs/oidc/util/loginRedirect.js +1 -5
  361. package/cjs/oidc/util/loginRedirect.js.map +1 -1
  362. package/cjs/oidc/util/oauth.js +2 -4
  363. package/cjs/oidc/util/oauth.js.map +1 -1
  364. package/cjs/oidc/util/oauthMeta.js.map +1 -1
  365. package/cjs/oidc/util/pkce.js +3 -11
  366. package/cjs/oidc/util/pkce.js.map +1 -1
  367. package/cjs/oidc/util/prepareTokenParams.js +2 -4
  368. package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
  369. package/cjs/oidc/util/refreshToken.js.map +1 -1
  370. package/cjs/oidc/util/sharedStorage.js +54 -0
  371. package/cjs/oidc/util/sharedStorage.js.map +1 -0
  372. package/cjs/oidc/util/validateClaims.js +1 -1
  373. package/cjs/oidc/util/validateClaims.js.map +1 -1
  374. package/cjs/oidc/util/validateToken.js +1 -1
  375. package/cjs/oidc/util/validateToken.js.map +1 -1
  376. package/cjs/oidc/verifyToken.js +3 -11
  377. package/cjs/oidc/verifyToken.js.map +1 -1
  378. package/cjs/server/serverStorage.js +2 -9
  379. package/cjs/server/serverStorage.js.map +1 -1
  380. package/cjs/services/AutoRenewService.js +3 -3
  381. package/cjs/services/AutoRenewService.js.map +1 -1
  382. package/cjs/services/LeaderElectionService.js +3 -5
  383. package/cjs/services/LeaderElectionService.js.map +1 -1
  384. package/cjs/services/SyncStorageService.js +26 -18
  385. package/cjs/services/SyncStorageService.js.map +1 -1
  386. package/cjs/services/index.js +3 -5
  387. package/cjs/services/index.js.map +1 -1
  388. package/cjs/session/api.js +88 -0
  389. package/cjs/session/api.js.map +1 -0
  390. package/cjs/session/factory.js +17 -0
  391. package/cjs/session/factory.js.map +1 -0
  392. package/cjs/session/index.js +54 -0
  393. package/cjs/session/index.js.map +1 -0
  394. package/cjs/session/mixin.js +32 -0
  395. package/cjs/session/mixin.js.map +1 -0
  396. package/cjs/session/types.js +2 -0
  397. package/cjs/session/types.js.map +1 -0
  398. package/cjs/storage/BaseStorageManager.js +102 -0
  399. package/cjs/storage/BaseStorageManager.js.map +1 -0
  400. package/cjs/storage/SavedObject.js +100 -0
  401. package/cjs/storage/SavedObject.js.map +1 -0
  402. package/cjs/storage/index.js +67 -0
  403. package/cjs/storage/index.js.map +1 -0
  404. package/cjs/storage/mixin.js +22 -0
  405. package/cjs/storage/mixin.js.map +1 -0
  406. package/cjs/storage/options/StorageOptionsConstructor.js +36 -0
  407. package/cjs/storage/options/StorageOptionsConstructor.js.map +1 -0
  408. package/cjs/storage/options/browser.js +82 -0
  409. package/cjs/storage/options/browser.js.map +1 -0
  410. package/cjs/storage/options/node.js +43 -0
  411. package/cjs/storage/options/node.js.map +1 -0
  412. package/cjs/storage/types.js +2 -0
  413. package/cjs/storage/types.js.map +1 -0
  414. package/cjs/types/global.d.js +2 -0
  415. package/cjs/types/global.d.js.map +1 -0
  416. package/cjs/util/PromiseQueue.js +85 -0
  417. package/cjs/util/PromiseQueue.js.map +1 -0
  418. package/cjs/util/index.js +15 -17
  419. package/cjs/util/index.js.map +1 -1
  420. package/cjs/util/misc.js +2 -8
  421. package/cjs/util/misc.js.map +1 -1
  422. package/cjs/util/object.js +6 -16
  423. package/cjs/util/object.js.map +1 -1
  424. package/dist/okta-auth-js.authn.min.analyzer.html +38 -0
  425. package/dist/okta-auth-js.authn.min.js +3 -0
  426. package/dist/{myaccount.umd.js.LICENSE.txt → okta-auth-js.authn.min.js.LICENSE.txt} +0 -0
  427. package/dist/okta-auth-js.authn.min.js.map +1 -0
  428. package/dist/okta-auth-js.core.min.analyzer.html +38 -0
  429. package/dist/okta-auth-js.core.min.js +3 -0
  430. package/dist/okta-auth-js.core.min.js.LICENSE.txt +12 -0
  431. package/dist/okta-auth-js.core.min.js.map +1 -0
  432. package/dist/okta-auth-js.idx.min.analyzer.html +38 -0
  433. package/dist/okta-auth-js.idx.min.js +3 -0
  434. package/dist/okta-auth-js.idx.min.js.LICENSE.txt +12 -0
  435. package/dist/okta-auth-js.idx.min.js.map +1 -0
  436. package/dist/okta-auth-js.min.analyzer.html +38 -0
  437. package/dist/okta-auth-js.min.js +1 -1
  438. package/dist/okta-auth-js.min.js.map +1 -1
  439. package/dist/okta-auth-js.myaccount.min.analyzer.html +38 -0
  440. package/dist/okta-auth-js.myaccount.min.js +3 -0
  441. package/dist/okta-auth-js.myaccount.min.js.LICENSE.txt +12 -0
  442. package/dist/okta-auth-js.myaccount.min.js.map +1 -0
  443. package/esm/browser/authn/AuthnTransactionImpl.js +33 -0
  444. package/esm/browser/authn/AuthnTransactionImpl.js.map +1 -0
  445. package/esm/browser/authn/api.js +79 -0
  446. package/esm/browser/authn/api.js.map +1 -0
  447. package/esm/browser/authn/factory.js +37 -0
  448. package/esm/browser/authn/factory.js.map +1 -0
  449. package/esm/browser/authn/mixin.js +58 -0
  450. package/esm/browser/authn/mixin.js.map +1 -0
  451. package/esm/browser/authn/util/flattenEmbedded.js +44 -0
  452. package/esm/browser/authn/util/flattenEmbedded.js.map +1 -0
  453. package/esm/browser/authn/util/link2fn.js +103 -0
  454. package/esm/browser/authn/util/link2fn.js.map +1 -0
  455. package/esm/browser/authn/util/links2fns.js +45 -0
  456. package/esm/browser/authn/util/links2fns.js.map +1 -0
  457. package/esm/browser/authn/util/poll.js +120 -0
  458. package/esm/browser/authn/util/poll.js.map +1 -0
  459. package/esm/browser/authn/util/stateToken.js +26 -0
  460. package/esm/browser/authn/util/stateToken.js.map +1 -0
  461. package/esm/browser/base/factory.js +37 -0
  462. package/esm/browser/base/factory.js.map +1 -0
  463. package/esm/browser/base/options.js +22 -0
  464. package/esm/browser/base/options.js.map +1 -0
  465. package/esm/browser/browser/browserStorage.js +0 -9
  466. package/esm/browser/browser/browserStorage.js.map +1 -1
  467. package/esm/browser/browser/fingerprint.js +3 -2
  468. package/esm/browser/browser/fingerprint.js.map +1 -1
  469. package/esm/browser/constants.js +1 -4
  470. package/esm/browser/constants.js.map +1 -1
  471. package/esm/browser/core/AuthStateManager.js +162 -0
  472. package/esm/browser/core/AuthStateManager.js.map +1 -0
  473. package/esm/browser/core/ServiceManager/browser.js +115 -0
  474. package/esm/browser/core/ServiceManager/browser.js.map +1 -0
  475. package/esm/browser/core/factory.js +31 -0
  476. package/esm/browser/core/factory.js.map +1 -0
  477. package/esm/browser/core/mixin.js +70 -0
  478. package/esm/browser/core/mixin.js.map +1 -0
  479. package/esm/browser/core/options.js +30 -0
  480. package/esm/browser/core/options.js.map +1 -0
  481. package/esm/browser/core/storage.js +20 -0
  482. package/esm/browser/core/storage.js.map +1 -0
  483. package/esm/browser/errors/AuthApiError.js.map +1 -1
  484. package/esm/browser/errors/AuthSdkError.js.map +1 -1
  485. package/esm/browser/errors/index.js.map +1 -1
  486. package/esm/browser/exports/exports/authn.js +106 -0
  487. package/esm/browser/exports/exports/authn.js.map +1 -0
  488. package/esm/browser/exports/exports/core.js +102 -0
  489. package/esm/browser/exports/exports/core.js.map +1 -0
  490. package/esm/browser/exports/exports/default.js +141 -0
  491. package/esm/browser/exports/exports/default.js.map +1 -0
  492. package/esm/browser/exports/exports/idx.js +122 -0
  493. package/esm/browser/exports/exports/idx.js.map +1 -0
  494. package/esm/browser/exports/exports/myaccount.js +115 -0
  495. package/esm/browser/exports/exports/myaccount.js.map +1 -0
  496. package/esm/browser/fetch/fetchRequest.js.map +1 -1
  497. package/esm/browser/http/OktaUserAgent.js +39 -0
  498. package/esm/browser/http/OktaUserAgent.js.map +1 -0
  499. package/esm/browser/http/headers.js.map +1 -1
  500. package/esm/browser/http/mixin.js +46 -0
  501. package/esm/browser/http/mixin.js.map +1 -0
  502. package/esm/browser/http/options.js +31 -0
  503. package/esm/browser/http/options.js.map +1 -0
  504. package/esm/browser/http/request.js.map +1 -1
  505. package/esm/browser/idx/IdxTransactionManager.js +72 -0
  506. package/esm/browser/idx/IdxTransactionManager.js.map +1 -0
  507. package/esm/browser/idx/authenticate.js +0 -1
  508. package/esm/browser/idx/authenticate.js.map +1 -1
  509. package/esm/browser/idx/cancel.js.map +1 -1
  510. package/esm/browser/idx/emailVerify.js.map +1 -1
  511. package/esm/browser/idx/factory/OktaAuthIdx.js +23 -0
  512. package/esm/browser/idx/factory/OktaAuthIdx.js.map +1 -0
  513. package/esm/browser/idx/factory/api.js +73 -0
  514. package/esm/browser/idx/factory/api.js.map +1 -0
  515. package/esm/browser/idx/flow/FlowSpecification.js.map +1 -1
  516. package/esm/browser/idx/handleInteractionCodeRedirect.js.map +1 -1
  517. package/esm/browser/idx/idxState/index.js.map +1 -1
  518. package/esm/browser/idx/idxState/v1/generateIdxAction.js +5 -2
  519. package/esm/browser/idx/idxState/v1/generateIdxAction.js.map +1 -1
  520. package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -1
  521. package/esm/browser/idx/idxState/v1/makeIdxState.js.map +1 -1
  522. package/esm/browser/idx/idxState/v1/remediationParser.js.map +1 -1
  523. package/esm/browser/idx/interact.js +4 -3
  524. package/esm/browser/idx/interact.js.map +1 -1
  525. package/esm/browser/idx/introspect.js +4 -3
  526. package/esm/browser/idx/introspect.js.map +1 -1
  527. package/esm/browser/idx/mixin.js +29 -0
  528. package/esm/browser/idx/mixin.js.map +1 -0
  529. package/esm/browser/idx/options.js +29 -0
  530. package/esm/browser/idx/options.js.map +1 -0
  531. package/esm/browser/idx/poll.js.map +1 -1
  532. package/esm/browser/idx/proceed.js.map +1 -1
  533. package/esm/browser/idx/recoverPassword.js.map +1 -1
  534. package/esm/browser/idx/register.js +2 -5
  535. package/esm/browser/idx/register.js.map +1 -1
  536. package/esm/browser/idx/remediate.js +24 -36
  537. package/esm/browser/idx/remediate.js.map +1 -1
  538. package/esm/browser/idx/remediators/AuthenticatorVerificationData.js +0 -29
  539. package/esm/browser/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
  540. package/esm/browser/idx/remediators/Base/AuthenticatorData.js +0 -10
  541. package/esm/browser/idx/remediators/Base/AuthenticatorData.js.map +1 -1
  542. package/esm/browser/idx/remediators/Base/Remediator.js.map +1 -1
  543. package/esm/browser/idx/remediators/Base/SelectAuthenticator.js +0 -10
  544. package/esm/browser/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
  545. package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
  546. package/esm/browser/idx/remediators/EnrollPoll.js.map +1 -1
  547. package/esm/browser/idx/remediators/EnrollProfile.js.map +1 -1
  548. package/esm/browser/idx/remediators/EnrollmentChannelData.js.map +1 -1
  549. package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
  550. package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
  551. package/esm/browser/idx/remediators/SelectEnrollmentChannel.js +1 -9
  552. package/esm/browser/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
  553. package/esm/browser/idx/run.js +3 -25
  554. package/esm/browser/idx/run.js.map +1 -1
  555. package/esm/browser/idx/startTransaction.js.map +1 -1
  556. package/esm/browser/idx/storage.js +77 -0
  557. package/esm/browser/idx/storage.js.map +1 -0
  558. package/esm/browser/idx/transactionMeta.js +3 -2
  559. package/esm/browser/idx/transactionMeta.js.map +1 -1
  560. package/esm/browser/idx/types/api.js.map +1 -1
  561. package/esm/browser/idx/types/idx-js.js +1 -4
  562. package/esm/browser/idx/types/idx-js.js.map +1 -1
  563. package/esm/browser/idx/unlockAccount.js +0 -1
  564. package/esm/browser/idx/unlockAccount.js.map +1 -1
  565. package/esm/browser/idx/util.js +2 -8
  566. package/esm/browser/idx/util.js.map +1 -1
  567. package/esm/browser/idx/webauthn.js +79 -0
  568. package/esm/browser/idx/webauthn.js.map +1 -0
  569. package/esm/browser/myaccount/api.js +16 -0
  570. package/esm/browser/myaccount/api.js.map +1 -0
  571. package/esm/browser/myaccount/factory.js +23 -0
  572. package/esm/browser/myaccount/factory.js.map +1 -0
  573. package/esm/browser/myaccount/mixin.js +30 -0
  574. package/esm/browser/myaccount/mixin.js.map +1 -0
  575. package/esm/browser/myaccount/request.js +4 -1
  576. package/esm/browser/myaccount/request.js.map +1 -1
  577. package/esm/browser/myaccount/transactions/Base.js.map +1 -1
  578. package/esm/browser/myaccount/types.js +4 -0
  579. package/esm/browser/myaccount/types.js.map +1 -1
  580. package/esm/browser/oidc/TokenManager.js +384 -0
  581. package/esm/browser/oidc/TokenManager.js.map +1 -0
  582. package/esm/browser/oidc/TransactionManager.js +76 -0
  583. package/esm/browser/oidc/TransactionManager.js.map +1 -0
  584. package/esm/browser/oidc/decodeToken.js.map +1 -1
  585. package/esm/browser/oidc/endpoints/authorize.js.map +1 -1
  586. package/esm/browser/oidc/endpoints/token.js +3 -0
  587. package/esm/browser/oidc/endpoints/token.js.map +1 -1
  588. package/esm/browser/oidc/endpoints/well-known.js +5 -2
  589. package/esm/browser/oidc/endpoints/well-known.js.map +1 -1
  590. package/esm/browser/oidc/exchangeCodeForTokens.js +3 -2
  591. package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -1
  592. package/esm/browser/oidc/factory/OktaAuthOAuth.js +29 -0
  593. package/esm/browser/oidc/factory/OktaAuthOAuth.js.map +1 -0
  594. package/esm/browser/oidc/factory/api.js +89 -0
  595. package/esm/browser/oidc/factory/api.js.map +1 -0
  596. package/esm/browser/oidc/getToken.js +0 -2
  597. package/esm/browser/oidc/getToken.js.map +1 -1
  598. package/esm/browser/oidc/getUserInfo.js +4 -3
  599. package/esm/browser/oidc/getUserInfo.js.map +1 -1
  600. package/esm/browser/oidc/getWithPopup.js +3 -2
  601. package/esm/browser/oidc/getWithPopup.js.map +1 -1
  602. package/esm/browser/oidc/getWithRedirect.js +1 -3
  603. package/esm/browser/oidc/getWithRedirect.js.map +1 -1
  604. package/esm/browser/oidc/getWithoutPrompt.js.map +1 -1
  605. package/esm/browser/oidc/handleOAuthResponse.js +3 -2
  606. package/esm/browser/oidc/handleOAuthResponse.js.map +1 -1
  607. package/esm/browser/oidc/mixin/browser.js +52 -0
  608. package/esm/browser/oidc/mixin/browser.js.map +1 -0
  609. package/esm/browser/oidc/mixin/index.js +247 -0
  610. package/esm/browser/oidc/mixin/index.js.map +1 -0
  611. package/esm/browser/oidc/options/OAuthOptionsConstructor.js +85 -0
  612. package/esm/browser/oidc/options/OAuthOptionsConstructor.js.map +1 -0
  613. package/esm/browser/oidc/options/browser.js +16 -0
  614. package/esm/browser/oidc/options/browser.js.map +1 -0
  615. package/esm/browser/oidc/parseFromUrl.js +7 -5
  616. package/esm/browser/oidc/parseFromUrl.js.map +1 -1
  617. package/esm/browser/oidc/renewToken.js +1 -3
  618. package/esm/browser/oidc/renewToken.js.map +1 -1
  619. package/esm/browser/oidc/renewTokens.js +3 -2
  620. package/esm/browser/oidc/renewTokens.js.map +1 -1
  621. package/esm/browser/oidc/renewTokensWithRefresh.js.map +1 -1
  622. package/esm/browser/oidc/revokeToken.js +6 -3
  623. package/esm/browser/oidc/revokeToken.js.map +1 -1
  624. package/esm/browser/oidc/storage.js +49 -0
  625. package/esm/browser/oidc/storage.js.map +1 -0
  626. package/esm/browser/{types → oidc/types}/Token.js +0 -0
  627. package/esm/browser/oidc/types/Token.js.map +1 -0
  628. package/esm/browser/{types → oidc/types}/TokenManager.js +0 -0
  629. package/esm/browser/oidc/types/TokenManager.js.map +1 -0
  630. package/esm/browser/{types → oidc/types}/Transaction.js +0 -0
  631. package/esm/browser/oidc/types/Transaction.js.map +1 -0
  632. package/esm/browser/oidc/util/browser.js.map +1 -1
  633. package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -1
  634. package/esm/browser/oidc/util/errors.js.map +1 -1
  635. package/esm/browser/oidc/util/loginRedirect.js.map +1 -1
  636. package/esm/browser/oidc/util/oauth.js.map +1 -1
  637. package/esm/browser/oidc/util/oauthMeta.js.map +1 -1
  638. package/esm/browser/oidc/util/prepareTokenParams.js.map +1 -1
  639. package/esm/browser/oidc/util/refreshToken.js.map +1 -1
  640. package/esm/browser/oidc/util/sharedStorage.js +54 -0
  641. package/esm/browser/oidc/util/sharedStorage.js.map +1 -0
  642. package/esm/browser/oidc/util/validateClaims.js.map +1 -1
  643. package/esm/browser/oidc/util/validateToken.js +1 -3
  644. package/esm/browser/oidc/util/validateToken.js.map +1 -1
  645. package/esm/browser/oidc/verifyToken.js +0 -2
  646. package/esm/browser/oidc/verifyToken.js.map +1 -1
  647. package/esm/browser/package.json +5 -0
  648. package/esm/browser/services/AutoRenewService.js +1 -3
  649. package/esm/browser/services/AutoRenewService.js.map +1 -1
  650. package/esm/browser/services/LeaderElectionService.js.map +1 -1
  651. package/esm/browser/services/SyncStorageService.js +18 -13
  652. package/esm/browser/services/SyncStorageService.js.map +1 -1
  653. package/esm/browser/session/api.js +69 -0
  654. package/esm/browser/session/api.js.map +1 -0
  655. package/esm/browser/session/factory.js +27 -0
  656. package/esm/browser/session/factory.js.map +1 -0
  657. package/esm/browser/session/mixin.js +37 -0
  658. package/esm/browser/session/mixin.js.map +1 -0
  659. package/esm/browser/storage/BaseStorageManager.js +69 -0
  660. package/esm/browser/storage/BaseStorageManager.js.map +1 -0
  661. package/esm/browser/storage/SavedObject.js +76 -0
  662. package/esm/browser/storage/SavedObject.js.map +1 -0
  663. package/esm/browser/storage/mixin.js +26 -0
  664. package/esm/browser/storage/mixin.js.map +1 -0
  665. package/esm/browser/storage/options/StorageOptionsConstructor.js +31 -0
  666. package/esm/browser/storage/options/StorageOptionsConstructor.js.map +1 -0
  667. package/esm/browser/storage/options/browser.js +76 -0
  668. package/esm/browser/storage/options/browser.js.map +1 -0
  669. package/esm/browser/util/PromiseQueue.js +65 -0
  670. package/esm/browser/util/PromiseQueue.js.map +1 -0
  671. package/esm/node/authn/AuthnTransactionImpl.js +33 -0
  672. package/esm/node/authn/AuthnTransactionImpl.js.map +1 -0
  673. package/esm/node/authn/api.js +80 -0
  674. package/esm/node/authn/api.js.map +1 -0
  675. package/esm/node/authn/factory.js +37 -0
  676. package/esm/node/authn/factory.js.map +1 -0
  677. package/esm/node/authn/mixin.js +58 -0
  678. package/esm/node/authn/mixin.js.map +1 -0
  679. package/esm/node/authn/util/flattenEmbedded.js +44 -0
  680. package/esm/node/authn/util/flattenEmbedded.js.map +1 -0
  681. package/esm/node/authn/util/link2fn.js +104 -0
  682. package/esm/node/authn/util/link2fn.js.map +1 -0
  683. package/esm/node/authn/util/links2fns.js +45 -0
  684. package/esm/node/authn/util/links2fns.js.map +1 -0
  685. package/esm/node/authn/util/poll.js +121 -0
  686. package/esm/node/authn/util/poll.js.map +1 -0
  687. package/esm/node/authn/util/stateToken.js +26 -0
  688. package/esm/node/authn/util/stateToken.js.map +1 -0
  689. package/esm/node/base/factory.js +37 -0
  690. package/esm/node/base/factory.js.map +1 -0
  691. package/esm/node/base/options.js +22 -0
  692. package/esm/node/base/options.js.map +1 -0
  693. package/esm/node/browser/fingerprint.js +4 -3
  694. package/esm/node/browser/fingerprint.js.map +1 -1
  695. package/esm/node/constants.js +1 -4
  696. package/esm/node/constants.js.map +1 -1
  697. package/esm/node/core/AuthStateManager.js +163 -0
  698. package/esm/node/core/AuthStateManager.js.map +1 -0
  699. package/esm/node/core/ServiceManager/node.js +34 -0
  700. package/esm/node/core/ServiceManager/node.js.map +1 -0
  701. package/esm/node/core/factory.js +31 -0
  702. package/esm/node/core/factory.js.map +1 -0
  703. package/esm/node/core/mixin.js +70 -0
  704. package/esm/node/core/mixin.js.map +1 -0
  705. package/esm/node/core/options.js +31 -0
  706. package/esm/node/core/options.js.map +1 -0
  707. package/esm/node/core/storage.js +20 -0
  708. package/esm/node/core/storage.js.map +1 -0
  709. package/esm/node/errors/AuthApiError.js.map +1 -1
  710. package/esm/node/errors/AuthSdkError.js.map +1 -1
  711. package/esm/node/errors/index.js.map +1 -1
  712. package/esm/node/exports/exports/authn.js +106 -0
  713. package/esm/node/exports/exports/authn.js.map +1 -0
  714. package/esm/node/exports/exports/core.js +102 -0
  715. package/esm/node/exports/exports/core.js.map +1 -0
  716. package/esm/node/exports/exports/default.js +141 -0
  717. package/esm/node/exports/exports/default.js.map +1 -0
  718. package/esm/node/exports/exports/idx.js +122 -0
  719. package/esm/node/exports/exports/idx.js.map +1 -0
  720. package/esm/node/exports/exports/myaccount.js +115 -0
  721. package/esm/node/exports/exports/myaccount.js.map +1 -0
  722. package/esm/node/fetch/fetchRequest.js.map +1 -1
  723. package/esm/node/http/OktaUserAgent.js +39 -0
  724. package/esm/node/http/OktaUserAgent.js.map +1 -0
  725. package/esm/node/http/headers.js.map +1 -1
  726. package/esm/node/http/mixin.js +46 -0
  727. package/esm/node/http/mixin.js.map +1 -0
  728. package/esm/node/http/options.js +32 -0
  729. package/esm/node/http/options.js.map +1 -0
  730. package/esm/node/http/request.js.map +1 -1
  731. package/esm/node/idx/IdxTransactionManager.js +72 -0
  732. package/esm/node/idx/IdxTransactionManager.js.map +1 -0
  733. package/esm/node/idx/authenticate.js +0 -1
  734. package/esm/node/idx/authenticate.js.map +1 -1
  735. package/esm/node/idx/cancel.js.map +1 -1
  736. package/esm/node/idx/emailVerify.js.map +1 -1
  737. package/esm/node/idx/factory/OktaAuthIdx.js +23 -0
  738. package/esm/node/idx/factory/OktaAuthIdx.js.map +1 -0
  739. package/esm/node/idx/factory/api.js +74 -0
  740. package/esm/node/idx/factory/api.js.map +1 -0
  741. package/esm/node/idx/flow/FlowSpecification.js.map +1 -1
  742. package/esm/node/idx/handleInteractionCodeRedirect.js.map +1 -1
  743. package/esm/node/idx/idxState/index.js.map +1 -1
  744. package/esm/node/idx/idxState/v1/generateIdxAction.js +6 -2
  745. package/esm/node/idx/idxState/v1/generateIdxAction.js.map +1 -1
  746. package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -1
  747. package/esm/node/idx/idxState/v1/makeIdxState.js.map +1 -1
  748. package/esm/node/idx/idxState/v1/remediationParser.js.map +1 -1
  749. package/esm/node/idx/interact.js +5 -4
  750. package/esm/node/idx/interact.js.map +1 -1
  751. package/esm/node/idx/introspect.js +5 -4
  752. package/esm/node/idx/introspect.js.map +1 -1
  753. package/esm/node/idx/mixin.js +29 -0
  754. package/esm/node/idx/mixin.js.map +1 -0
  755. package/esm/node/idx/options.js +29 -0
  756. package/esm/node/idx/options.js.map +1 -0
  757. package/esm/node/idx/poll.js.map +1 -1
  758. package/esm/node/idx/proceed.js.map +1 -1
  759. package/esm/node/idx/recoverPassword.js.map +1 -1
  760. package/esm/node/idx/register.js +2 -5
  761. package/esm/node/idx/register.js.map +1 -1
  762. package/esm/node/idx/remediate.js +24 -36
  763. package/esm/node/idx/remediate.js.map +1 -1
  764. package/esm/node/idx/remediators/AuthenticatorVerificationData.js +0 -29
  765. package/esm/node/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
  766. package/esm/node/idx/remediators/Base/AuthenticatorData.js +0 -10
  767. package/esm/node/idx/remediators/Base/AuthenticatorData.js.map +1 -1
  768. package/esm/node/idx/remediators/Base/Remediator.js.map +1 -1
  769. package/esm/node/idx/remediators/Base/SelectAuthenticator.js +0 -10
  770. package/esm/node/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
  771. package/esm/node/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
  772. package/esm/node/idx/remediators/EnrollPoll.js.map +1 -1
  773. package/esm/node/idx/remediators/EnrollProfile.js.map +1 -1
  774. package/esm/node/idx/remediators/EnrollmentChannelData.js.map +1 -1
  775. package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
  776. package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
  777. package/esm/node/idx/remediators/SelectEnrollmentChannel.js +1 -9
  778. package/esm/node/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
  779. package/esm/node/idx/run.js +3 -25
  780. package/esm/node/idx/run.js.map +1 -1
  781. package/esm/node/idx/startTransaction.js.map +1 -1
  782. package/esm/node/idx/storage.js +77 -0
  783. package/esm/node/idx/storage.js.map +1 -0
  784. package/esm/node/idx/transactionMeta.js +3 -2
  785. package/esm/node/idx/transactionMeta.js.map +1 -1
  786. package/esm/node/idx/types/api.js.map +1 -1
  787. package/esm/node/idx/types/idx-js.js +1 -4
  788. package/esm/node/idx/types/idx-js.js.map +1 -1
  789. package/esm/node/idx/unlockAccount.js +0 -1
  790. package/esm/node/idx/unlockAccount.js.map +1 -1
  791. package/esm/node/idx/util.js +2 -8
  792. package/esm/node/idx/util.js.map +1 -1
  793. package/esm/node/idx/webauthn.js +79 -0
  794. package/esm/node/idx/webauthn.js.map +1 -0
  795. package/esm/node/myaccount/api.js +16 -0
  796. package/esm/node/myaccount/api.js.map +1 -0
  797. package/esm/node/myaccount/factory.js +23 -0
  798. package/esm/node/myaccount/factory.js.map +1 -0
  799. package/esm/node/myaccount/mixin.js +30 -0
  800. package/esm/node/myaccount/mixin.js.map +1 -0
  801. package/esm/node/myaccount/request.js +5 -1
  802. package/esm/node/myaccount/request.js.map +1 -1
  803. package/esm/node/myaccount/transactions/Base.js.map +1 -1
  804. package/esm/node/myaccount/types.js +5 -0
  805. package/esm/node/myaccount/types.js.map +1 -1
  806. package/esm/node/oidc/TokenManager.js +385 -0
  807. package/esm/node/oidc/TokenManager.js.map +1 -0
  808. package/esm/node/oidc/TransactionManager.js +76 -0
  809. package/esm/node/oidc/TransactionManager.js.map +1 -0
  810. package/esm/node/oidc/decodeToken.js.map +1 -1
  811. package/esm/node/oidc/endpoints/authorize.js.map +1 -1
  812. package/esm/node/oidc/endpoints/token.js +4 -0
  813. package/esm/node/oidc/endpoints/token.js.map +1 -1
  814. package/esm/node/oidc/endpoints/well-known.js +6 -2
  815. package/esm/node/oidc/endpoints/well-known.js.map +1 -1
  816. package/esm/node/oidc/exchangeCodeForTokens.js +3 -2
  817. package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -1
  818. package/esm/node/oidc/factory/OktaAuthOAuth.js +29 -0
  819. package/esm/node/oidc/factory/OktaAuthOAuth.js.map +1 -0
  820. package/esm/node/oidc/factory/api.js +90 -0
  821. package/esm/node/oidc/factory/api.js.map +1 -0
  822. package/esm/node/oidc/getToken.js +0 -2
  823. package/esm/node/oidc/getToken.js.map +1 -1
  824. package/esm/node/oidc/getUserInfo.js +5 -3
  825. package/esm/node/oidc/getUserInfo.js.map +1 -1
  826. package/esm/node/oidc/getWithPopup.js +3 -2
  827. package/esm/node/oidc/getWithPopup.js.map +1 -1
  828. package/esm/node/oidc/getWithRedirect.js +1 -3
  829. package/esm/node/oidc/getWithRedirect.js.map +1 -1
  830. package/esm/node/oidc/getWithoutPrompt.js.map +1 -1
  831. package/esm/node/oidc/handleOAuthResponse.js +3 -2
  832. package/esm/node/oidc/handleOAuthResponse.js.map +1 -1
  833. package/esm/node/oidc/mixin/index.js +247 -0
  834. package/esm/node/oidc/mixin/index.js.map +1 -0
  835. package/esm/node/oidc/mixin/node.js +43 -0
  836. package/esm/node/oidc/mixin/node.js.map +1 -0
  837. package/esm/node/oidc/options/OAuthOptionsConstructor.js +85 -0
  838. package/esm/node/oidc/options/OAuthOptionsConstructor.js.map +1 -0
  839. package/esm/node/oidc/options/node.js +16 -0
  840. package/esm/node/oidc/options/node.js.map +1 -0
  841. package/esm/node/oidc/parseFromUrl.js +7 -5
  842. package/esm/node/oidc/parseFromUrl.js.map +1 -1
  843. package/esm/node/oidc/renewToken.js +1 -3
  844. package/esm/node/oidc/renewToken.js.map +1 -1
  845. package/esm/node/oidc/renewTokens.js +3 -2
  846. package/esm/node/oidc/renewTokens.js.map +1 -1
  847. package/esm/node/oidc/renewTokensWithRefresh.js.map +1 -1
  848. package/esm/node/oidc/revokeToken.js +6 -3
  849. package/esm/node/oidc/revokeToken.js.map +1 -1
  850. package/esm/node/oidc/storage.js +50 -0
  851. package/esm/node/oidc/storage.js.map +1 -0
  852. package/esm/node/{types → oidc/types}/Token.js +0 -0
  853. package/esm/node/oidc/types/Token.js.map +1 -0
  854. package/esm/node/{types → oidc/types}/TokenManager.js +0 -0
  855. package/esm/node/oidc/types/TokenManager.js.map +1 -0
  856. package/esm/node/{types → oidc/types}/Transaction.js +0 -0
  857. package/esm/node/oidc/types/Transaction.js.map +1 -0
  858. package/esm/node/oidc/util/browser.js.map +1 -1
  859. package/esm/node/oidc/util/defaultTokenParams.js.map +1 -1
  860. package/esm/node/oidc/util/errors.js.map +1 -1
  861. package/esm/node/oidc/util/loginRedirect.js.map +1 -1
  862. package/esm/node/oidc/util/oauth.js.map +1 -1
  863. package/esm/node/oidc/util/oauthMeta.js.map +1 -1
  864. package/esm/node/oidc/util/prepareTokenParams.js.map +1 -1
  865. package/esm/node/oidc/util/refreshToken.js.map +1 -1
  866. package/esm/node/oidc/util/sharedStorage.js +54 -0
  867. package/esm/node/oidc/util/sharedStorage.js.map +1 -0
  868. package/esm/node/oidc/util/validateClaims.js.map +1 -1
  869. package/esm/node/oidc/util/validateToken.js +1 -3
  870. package/esm/node/oidc/util/validateToken.js.map +1 -1
  871. package/esm/node/oidc/verifyToken.js +0 -2
  872. package/esm/node/oidc/verifyToken.js.map +1 -1
  873. package/esm/node/package.json +5 -0
  874. package/esm/node/server/serverStorage.js +0 -4
  875. package/esm/node/server/serverStorage.js.map +1 -1
  876. package/esm/node/session/api.js +70 -0
  877. package/esm/node/session/api.js.map +1 -0
  878. package/esm/node/session/factory.js +27 -0
  879. package/esm/node/session/factory.js.map +1 -0
  880. package/esm/node/session/mixin.js +37 -0
  881. package/esm/node/session/mixin.js.map +1 -0
  882. package/esm/node/storage/BaseStorageManager.js +69 -0
  883. package/esm/node/storage/BaseStorageManager.js.map +1 -0
  884. package/esm/node/storage/SavedObject.js +76 -0
  885. package/esm/node/storage/SavedObject.js.map +1 -0
  886. package/esm/node/storage/mixin.js +26 -0
  887. package/esm/node/storage/mixin.js.map +1 -0
  888. package/esm/node/storage/options/StorageOptionsConstructor.js +31 -0
  889. package/esm/node/storage/options/StorageOptionsConstructor.js.map +1 -0
  890. package/esm/node/storage/options/node.js +40 -0
  891. package/esm/node/storage/options/node.js.map +1 -0
  892. package/esm/node/util/PromiseQueue.js +65 -0
  893. package/esm/node/util/PromiseQueue.js.map +1 -0
  894. package/package.json +71 -28
  895. package/types/lib/authn/AuthnTransactionImpl.d.ts +41 -0
  896. package/types/lib/authn/api.d.ts +23 -0
  897. package/types/lib/authn/factory.d.ts +15 -0
  898. package/types/lib/authn/index.d.ts +3 -0
  899. package/types/lib/authn/mixin.d.ts +16 -0
  900. package/types/lib/authn/types.d.ts +101 -0
  901. package/types/lib/authn/util/flattenEmbedded.d.ts +3 -0
  902. package/types/lib/authn/util/link2fn.d.ts +3 -0
  903. package/types/lib/authn/util/links2fns.d.ts +3 -0
  904. package/types/lib/authn/util/poll.d.ts +21 -0
  905. package/types/lib/authn/util/stateToken.d.ts +15 -0
  906. package/types/lib/base/factory.d.ts +2 -0
  907. package/types/lib/base/index.d.ts +3 -0
  908. package/types/lib/base/options.d.ts +16 -0
  909. package/types/lib/base/types.d.ts +43 -0
  910. package/types/lib/browser/browserStorage.d.ts +33 -0
  911. package/types/lib/browser/fingerprint.d.ts +14 -0
  912. package/{lib → types/lib}/clock.d.ts +0 -0
  913. package/types/lib/constants.d.ts +30 -0
  914. package/types/lib/core/AuthStateManager.d.ts +33 -0
  915. package/types/lib/core/ServiceManager/browser.d.ts +32 -0
  916. package/{lib/crypto/webcrypto.d.ts → types/lib/core/ServiceManager/index.d.ts} +0 -0
  917. package/types/lib/core/ServiceManager/node.d.ts +23 -0
  918. package/types/lib/core/factory.d.ts +5 -0
  919. package/types/lib/core/index.d.ts +7 -0
  920. package/types/lib/core/mixin.d.ts +4 -0
  921. package/types/lib/core/options.d.ts +50 -0
  922. package/types/lib/core/storage.d.ts +15 -0
  923. package/types/lib/core/types/AuthState.d.ts +33 -0
  924. package/types/lib/core/types/Service.d.ts +27 -0
  925. package/types/lib/core/types/api.d.ts +15 -0
  926. package/types/lib/core/types/index.d.ts +3 -0
  927. package/{lib → types/lib}/crypto/base64.d.ts +0 -0
  928. package/{lib → types/lib}/crypto/browser.d.ts +0 -0
  929. package/types/lib/crypto/index.d.ts +16 -0
  930. package/{lib → types/lib}/crypto/node.d.ts +0 -0
  931. package/{lib → types/lib}/crypto/oidcHash.d.ts +0 -0
  932. package/types/lib/crypto/types.d.ts +4 -0
  933. package/{lib → types/lib}/crypto/verifyToken.d.ts +0 -0
  934. package/types/lib/crypto/webcrypto.d.ts +12 -0
  935. package/types/lib/errors/AuthApiError.d.ts +24 -0
  936. package/{lib → types/lib}/errors/AuthPollStopError.d.ts +0 -0
  937. package/types/lib/errors/AuthSdkError.d.ts +22 -0
  938. package/{lib → types/lib}/errors/CustomError.d.ts +0 -0
  939. package/{lib → types/lib}/errors/OAuthError.d.ts +0 -0
  940. package/types/lib/errors/index.d.ts +19 -0
  941. package/types/lib/errors/types.d.ts +14 -0
  942. package/types/lib/exports/authn.d.ts +11 -0
  943. package/types/lib/exports/cdn/authn.d.ts +2 -0
  944. package/types/lib/exports/cdn/core.d.ts +2 -0
  945. package/types/lib/exports/cdn/default.d.ts +2 -0
  946. package/types/lib/exports/cdn/idx.d.ts +2 -0
  947. package/types/lib/exports/cdn/myaccount.d.ts +2 -0
  948. package/types/lib/exports/common.d.ts +11 -0
  949. package/types/lib/exports/core.d.ts +10 -0
  950. package/types/lib/exports/default.d.ts +13 -0
  951. package/types/lib/exports/idx.d.ts +11 -0
  952. package/types/lib/exports/myaccount.d.ts +11 -0
  953. package/{lib → types/lib}/features.d.ts +0 -0
  954. package/types/lib/fetch/fetchRequest.d.ts +14 -0
  955. package/types/lib/http/OktaUserAgent.d.ts +22 -0
  956. package/types/lib/http/headers.d.ts +14 -0
  957. package/types/lib/http/index.d.ts +6 -0
  958. package/types/lib/http/mixin.d.ts +4 -0
  959. package/types/lib/http/options.d.ts +25 -0
  960. package/types/lib/http/request.d.ts +16 -0
  961. package/types/lib/http/types.d.ts +65 -0
  962. package/types/lib/idx/IdxTransactionManager.d.ts +18 -0
  963. package/types/lib/idx/authenticate.d.ts +13 -0
  964. package/{lib → types/lib}/idx/authenticator/Authenticator.d.ts +0 -0
  965. package/{lib → types/lib}/idx/authenticator/OktaPassword.d.ts +0 -0
  966. package/{lib → types/lib}/idx/authenticator/OktaVerifyTotp.d.ts +0 -0
  967. package/{lib → types/lib}/idx/authenticator/SecurityQuestionEnrollment.d.ts +0 -0
  968. package/{lib → types/lib}/idx/authenticator/SecurityQuestionVerification.d.ts +0 -0
  969. package/{lib → types/lib}/idx/authenticator/VerificationCodeAuthenticator.d.ts +0 -0
  970. package/{lib → types/lib}/idx/authenticator/WebauthnEnrollment.d.ts +0 -0
  971. package/{lib → types/lib}/idx/authenticator/WebauthnVerification.d.ts +0 -0
  972. package/{lib → types/lib}/idx/authenticator/getAuthenticator.d.ts +0 -0
  973. package/{lib → types/lib}/idx/authenticator/index.d.ts +0 -0
  974. package/{lib → types/lib}/idx/authenticator/util.d.ts +0 -0
  975. package/types/lib/idx/cancel.d.ts +13 -0
  976. package/types/lib/idx/emailVerify.d.ts +23 -0
  977. package/types/lib/idx/factory/OktaAuthIdx.d.ts +9 -0
  978. package/types/lib/idx/factory/api.d.ts +14 -0
  979. package/types/lib/idx/factory/index.d.ts +2 -0
  980. package/{lib → types/lib}/idx/flow/AccountUnlockFlow.d.ts +0 -0
  981. package/{lib → types/lib}/idx/flow/AuthenticationFlow.d.ts +0 -0
  982. package/types/lib/idx/flow/FlowSpecification.d.ts +9 -0
  983. package/{lib → types/lib}/idx/flow/PasswordRecoveryFlow.d.ts +0 -0
  984. package/{lib → types/lib}/idx/flow/RegistrationFlow.d.ts +0 -0
  985. package/{lib → types/lib}/idx/flow/RemediationFlow.d.ts +0 -0
  986. package/{lib → types/lib}/idx/flow/index.d.ts +0 -0
  987. package/types/lib/idx/handleInteractionCodeRedirect.d.ts +13 -0
  988. package/types/lib/idx/idxState/index.d.ts +7 -0
  989. package/{lib → types/lib}/idx/idxState/v1/actionParser.d.ts +0 -0
  990. package/types/lib/idx/idxState/v1/generateIdxAction.d.ts +15 -0
  991. package/types/lib/idx/idxState/v1/idxResponseParser.d.ts +21 -0
  992. package/types/lib/idx/idxState/v1/makeIdxState.d.ts +14 -0
  993. package/{lib → types/lib}/idx/idxState/v1/parsers.d.ts +0 -0
  994. package/types/lib/idx/idxState/v1/remediationParser.d.ts +13 -0
  995. package/types/lib/idx/index.d.ts +30 -0
  996. package/types/lib/idx/interact.d.ts +26 -0
  997. package/types/lib/idx/introspect.d.ts +14 -0
  998. package/types/lib/idx/mixin.d.ts +6 -0
  999. package/types/lib/idx/options.d.ts +57 -0
  1000. package/types/lib/idx/poll.d.ts +13 -0
  1001. package/types/lib/idx/proceed.d.ts +14 -0
  1002. package/types/lib/idx/recoverPassword.d.ts +13 -0
  1003. package/types/lib/idx/register.d.ts +13 -0
  1004. package/types/lib/idx/remediate.d.ts +20 -0
  1005. package/{lib → types/lib}/idx/remediators/AuthenticatorEnrollmentData.d.ts +0 -0
  1006. package/types/lib/idx/remediators/AuthenticatorVerificationData.d.ts +24 -0
  1007. package/types/lib/idx/remediators/Base/AuthenticatorData.d.ts +26 -0
  1008. package/types/lib/idx/remediators/Base/Remediator.d.ts +42 -0
  1009. package/types/lib/idx/remediators/Base/SelectAuthenticator.d.ts +32 -0
  1010. package/types/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +25 -0
  1011. package/{lib → types/lib}/idx/remediators/ChallengeAuthenticator.d.ts +0 -0
  1012. package/{lib → types/lib}/idx/remediators/ChallengePoll.d.ts +0 -0
  1013. package/{lib → types/lib}/idx/remediators/EnrollAuthenticator.d.ts +0 -0
  1014. package/types/lib/idx/remediators/EnrollPoll.d.ts +23 -0
  1015. package/types/lib/idx/remediators/EnrollProfile.d.ts +39 -0
  1016. package/types/lib/idx/remediators/EnrollmentChannelData.d.ts +57 -0
  1017. package/types/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +8 -0
  1018. package/{lib → types/lib}/idx/remediators/GenericRemediator/index.d.ts +0 -0
  1019. package/{lib → types/lib}/idx/remediators/GenericRemediator/util.d.ts +0 -0
  1020. package/{lib → types/lib}/idx/remediators/Identify.d.ts +0 -0
  1021. package/{lib → types/lib}/idx/remediators/ReEnrollAuthenticator.d.ts +0 -0
  1022. package/{lib → types/lib}/idx/remediators/RedirectIdp.d.ts +0 -0
  1023. package/{lib → types/lib}/idx/remediators/ResetAuthenticator.d.ts +0 -0
  1024. package/{lib → types/lib}/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +0 -0
  1025. package/{lib → types/lib}/idx/remediators/SelectAuthenticatorEnroll.d.ts +0 -0
  1026. package/types/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +36 -0
  1027. package/{lib → types/lib}/idx/remediators/SelectEnrollProfile.d.ts +0 -0
  1028. package/types/lib/idx/remediators/SelectEnrollmentChannel.d.ts +46 -0
  1029. package/{lib → types/lib}/idx/remediators/Skip.d.ts +0 -0
  1030. package/{lib → types/lib}/idx/remediators/index.d.ts +0 -0
  1031. package/{lib → types/lib}/idx/remediators/util.d.ts +0 -0
  1032. package/types/lib/idx/run.d.ts +13 -0
  1033. package/types/lib/idx/startTransaction.d.ts +13 -0
  1034. package/types/lib/idx/storage.d.ts +18 -0
  1035. package/types/lib/idx/transactionMeta.d.ts +21 -0
  1036. package/{lib → types/lib}/idx/types/FlowIdentifier.d.ts +0 -0
  1037. package/types/lib/idx/types/api.d.ts +158 -0
  1038. package/{lib → types/lib}/idx/types/idx-js.d.ts +0 -0
  1039. package/types/lib/idx/types/index.d.ts +19 -0
  1040. package/types/lib/idx/types/meta.d.ts +22 -0
  1041. package/types/lib/idx/types/options.d.ts +67 -0
  1042. package/types/lib/idx/types/storage.d.ts +28 -0
  1043. package/types/lib/idx/unlockAccount.d.ts +13 -0
  1044. package/types/lib/idx/util.d.ts +14 -0
  1045. package/types/lib/idx/webauthn.d.ts +31 -0
  1046. package/{lib → types/lib}/myaccount/api.d.ts +0 -0
  1047. package/{lib → types/lib}/myaccount/emailApi.d.ts +0 -0
  1048. package/types/lib/myaccount/factory.d.ts +6 -0
  1049. package/types/lib/myaccount/index.d.ts +15 -0
  1050. package/types/lib/myaccount/mixin.d.ts +4 -0
  1051. package/{lib → types/lib}/myaccount/phoneApi.d.ts +0 -0
  1052. package/{lib → types/lib}/myaccount/profileApi.d.ts +0 -0
  1053. package/types/lib/myaccount/request.d.ts +29 -0
  1054. package/types/lib/myaccount/transactions/Base.d.ts +15 -0
  1055. package/{lib → types/lib}/myaccount/transactions/EmailChallengeTransaction.d.ts +0 -0
  1056. package/{lib → types/lib}/myaccount/transactions/EmailStatusTransaction.d.ts +0 -0
  1057. package/{lib → types/lib}/myaccount/transactions/EmailTransaction.d.ts +0 -0
  1058. package/{lib → types/lib}/myaccount/transactions/PhoneTransaction.d.ts +0 -0
  1059. package/{lib → types/lib}/myaccount/transactions/ProfileSchemaTransaction.d.ts +0 -0
  1060. package/{lib → types/lib}/myaccount/transactions/ProfileTransaction.d.ts +0 -0
  1061. package/{lib → types/lib}/myaccount/transactions/index.d.ts +0 -0
  1062. package/types/lib/myaccount/types.d.ts +58 -0
  1063. package/types/lib/oidc/TokenManager.d.ts +53 -0
  1064. package/types/lib/oidc/TransactionManager.d.ts +24 -0
  1065. package/types/lib/oidc/decodeToken.d.ts +2 -0
  1066. package/types/lib/oidc/endpoints/authorize.d.ts +14 -0
  1067. package/{lib → types/lib}/oidc/endpoints/index.d.ts +0 -0
  1068. package/types/lib/oidc/endpoints/token.d.ts +15 -0
  1069. package/types/lib/oidc/endpoints/well-known.d.ts +3 -0
  1070. package/types/lib/oidc/exchangeCodeForTokens.d.ts +14 -0
  1071. package/types/lib/oidc/factory/OktaAuthOAuth.d.ts +4 -0
  1072. package/types/lib/oidc/factory/api.d.ts +15 -0
  1073. package/types/lib/oidc/factory/index.d.ts +2 -0
  1074. package/types/lib/oidc/getToken.d.ts +2 -0
  1075. package/types/lib/oidc/getUserInfo.d.ts +2 -0
  1076. package/types/lib/oidc/getWithPopup.d.ts +2 -0
  1077. package/types/lib/oidc/getWithRedirect.d.ts +2 -0
  1078. package/types/lib/oidc/getWithoutPrompt.d.ts +2 -0
  1079. package/types/lib/oidc/handleOAuthResponse.d.ts +2 -0
  1080. package/types/lib/oidc/index.d.ts +35 -0
  1081. package/types/lib/oidc/mixin/browser.d.ts +17 -0
  1082. package/types/lib/oidc/mixin/index.d.ts +4 -0
  1083. package/types/lib/oidc/mixin/node.d.ts +17 -0
  1084. package/types/lib/oidc/options/OAuthOptionsConstructor.d.ts +48 -0
  1085. package/types/lib/oidc/options/browser.d.ts +1 -0
  1086. package/types/lib/oidc/options/index.d.ts +1 -0
  1087. package/types/lib/oidc/options/node.d.ts +1 -0
  1088. package/types/lib/oidc/parseFromUrl.d.ts +5 -0
  1089. package/types/lib/oidc/renewToken.d.ts +2 -0
  1090. package/types/lib/oidc/renewTokens.d.ts +2 -0
  1091. package/types/lib/oidc/renewTokensWithRefresh.d.ts +2 -0
  1092. package/types/lib/oidc/revokeToken.d.ts +14 -0
  1093. package/types/lib/oidc/storage.d.ts +16 -0
  1094. package/{lib → types/lib/oidc}/types/JWT.d.ts +0 -0
  1095. package/{lib → types/lib/oidc}/types/Token.d.ts +0 -0
  1096. package/types/lib/oidc/types/TokenManager.d.ts +61 -0
  1097. package/types/lib/oidc/types/Transaction.d.ts +29 -0
  1098. package/types/lib/oidc/types/TransactionManager.d.ts +15 -0
  1099. package/{lib → types/lib/oidc}/types/UserClaims.d.ts +0 -0
  1100. package/types/lib/oidc/types/api.d.ts +117 -0
  1101. package/types/lib/oidc/types/index.d.ts +22 -0
  1102. package/types/lib/oidc/types/meta.d.ts +21 -0
  1103. package/types/lib/oidc/types/options.d.ts +77 -0
  1104. package/{lib/types/OAuth.d.ts → types/lib/oidc/types/proto.d.ts} +0 -0
  1105. package/types/lib/oidc/types/storage.d.ts +13 -0
  1106. package/types/lib/oidc/util/browser.d.ts +6 -0
  1107. package/types/lib/oidc/util/defaultTokenParams.d.ts +2 -0
  1108. package/types/lib/oidc/util/errors.d.ts +15 -0
  1109. package/{lib → types/lib}/oidc/util/index.d.ts +0 -0
  1110. package/types/lib/oidc/util/loginRedirect.d.ts +30 -0
  1111. package/types/lib/oidc/util/oauth.d.ts +6 -0
  1112. package/types/lib/oidc/util/oauthMeta.d.ts +2 -0
  1113. package/{lib → types/lib}/oidc/util/pkce.d.ts +0 -0
  1114. package/types/lib/oidc/util/prepareTokenParams.d.ts +6 -0
  1115. package/types/lib/oidc/util/refreshToken.d.ts +3 -0
  1116. package/types/lib/oidc/util/sharedStorage.d.ts +5 -0
  1117. package/{lib → types/lib}/oidc/util/urlParams.d.ts +0 -0
  1118. package/types/lib/oidc/util/validateClaims.d.ts +14 -0
  1119. package/types/lib/oidc/util/validateToken.d.ts +2 -0
  1120. package/types/lib/oidc/verifyToken.d.ts +2 -0
  1121. package/types/lib/server/serverStorage.d.ts +24 -0
  1122. package/types/lib/services/AutoRenewService.d.ts +27 -0
  1123. package/types/lib/services/LeaderElectionService.d.ts +33 -0
  1124. package/types/lib/services/SyncStorageService.d.ts +38 -0
  1125. package/{lib → types/lib}/services/index.d.ts +0 -0
  1126. package/{lib/session.d.ts → types/lib/session/api.d.ts} +0 -0
  1127. package/types/lib/session/factory.d.ts +3 -0
  1128. package/types/lib/session/index.d.ts +4 -0
  1129. package/types/lib/session/mixin.d.ts +5 -0
  1130. package/types/lib/session/types.d.ts +18 -0
  1131. package/types/lib/storage/BaseStorageManager.d.ts +23 -0
  1132. package/types/lib/storage/SavedObject.d.ts +25 -0
  1133. package/types/lib/storage/index.d.ts +5 -0
  1134. package/types/lib/storage/mixin.d.ts +3 -0
  1135. package/types/lib/storage/options/StorageOptionsConstructor.d.ts +20 -0
  1136. package/types/lib/storage/options/browser.d.ts +15 -0
  1137. package/types/lib/storage/options/node.d.ts +15 -0
  1138. package/types/lib/storage/types.d.ts +78 -0
  1139. package/types/lib/util/PromiseQueue.d.ts +30 -0
  1140. package/{lib → types/lib}/util/console.d.ts +0 -0
  1141. package/types/lib/util/index.d.ts +17 -0
  1142. package/{lib → types/lib}/util/misc.d.ts +0 -0
  1143. package/{lib → types/lib}/util/object.d.ts +0 -0
  1144. package/{lib → types/lib}/util/types.d.ts +0 -0
  1145. package/{lib → types/lib}/util/url.d.ts +0 -0
  1146. package/umd/authn.js +3 -0
  1147. package/{dist/okta-auth-js.umd.js.LICENSE.txt → umd/authn.js.LICENSE.txt} +0 -0
  1148. package/umd/authn.js.map +1 -0
  1149. package/umd/core.js +3 -0
  1150. package/umd/core.js.LICENSE.txt +14 -0
  1151. package/umd/core.js.map +1 -0
  1152. package/umd/default.js +3 -0
  1153. package/umd/default.js.LICENSE.txt +14 -0
  1154. package/umd/default.js.map +1 -0
  1155. package/umd/idx.js +3 -0
  1156. package/umd/idx.js.LICENSE.txt +14 -0
  1157. package/umd/idx.js.map +1 -0
  1158. package/umd/myaccount.js +3 -0
  1159. package/umd/myaccount.js.LICENSE.txt +14 -0
  1160. package/umd/myaccount.js.map +1 -0
  1161. package/cjs/AuthStateManager.js +0 -231
  1162. package/cjs/AuthStateManager.js.map +0 -1
  1163. package/cjs/OktaAuth.js +0 -760
  1164. package/cjs/OktaAuth.js.map +0 -1
  1165. package/cjs/OktaUserAgent.js +0 -56
  1166. package/cjs/OktaUserAgent.js.map +0 -1
  1167. package/cjs/PromiseQueue.js +0 -89
  1168. package/cjs/PromiseQueue.js.map +0 -1
  1169. package/cjs/SavedObject.js +0 -112
  1170. package/cjs/SavedObject.js.map +0 -1
  1171. package/cjs/ServiceManager.js +0 -171
  1172. package/cjs/ServiceManager.js.map +0 -1
  1173. package/cjs/StorageManager.js +0 -210
  1174. package/cjs/StorageManager.js.map +0 -1
  1175. package/cjs/TokenManager.js +0 -496
  1176. package/cjs/TokenManager.js.map +0 -1
  1177. package/cjs/TransactionManager.js +0 -373
  1178. package/cjs/TransactionManager.js.map +0 -1
  1179. package/cjs/builderUtil.js +0 -49
  1180. package/cjs/builderUtil.js.map +0 -1
  1181. package/cjs/cdnEntry.js +0 -52
  1182. package/cjs/cdnEntry.js.map +0 -1
  1183. package/cjs/crypto/webauthn.js +0 -101
  1184. package/cjs/crypto/webauthn.js.map +0 -1
  1185. package/cjs/index.js +0 -186
  1186. package/cjs/index.js.map +0 -1
  1187. package/cjs/options/browser.js +0 -86
  1188. package/cjs/options/browser.js.map +0 -1
  1189. package/cjs/options/index.js +0 -105
  1190. package/cjs/options/index.js.map +0 -1
  1191. package/cjs/options/node.js +0 -45
  1192. package/cjs/options/node.js.map +0 -1
  1193. package/cjs/session.js +0 -88
  1194. package/cjs/session.js.map +0 -1
  1195. package/cjs/tx/AuthTransaction.js +0 -234
  1196. package/cjs/tx/AuthTransaction.js.map +0 -1
  1197. package/cjs/tx/TransactionState.js +0 -2
  1198. package/cjs/tx/TransactionState.js.map +0 -1
  1199. package/cjs/tx/api.js +0 -102
  1200. package/cjs/tx/api.js.map +0 -1
  1201. package/cjs/tx/index.js +0 -69
  1202. package/cjs/tx/index.js.map +0 -1
  1203. package/cjs/tx/poll.js +0 -138
  1204. package/cjs/tx/poll.js.map +0 -1
  1205. package/cjs/tx/util.js +0 -36
  1206. package/cjs/tx/util.js.map +0 -1
  1207. package/cjs/types/AuthState.js.map +0 -1
  1208. package/cjs/types/Cookies.js +0 -2
  1209. package/cjs/types/Cookies.js.map +0 -1
  1210. package/cjs/types/EventEmitter.js +0 -2
  1211. package/cjs/types/EventEmitter.js.map +0 -1
  1212. package/cjs/types/JWT.js.map +0 -1
  1213. package/cjs/types/OAuth.js +0 -2
  1214. package/cjs/types/OAuth.js.map +0 -1
  1215. package/cjs/types/OktaAuthOptions.js +0 -2
  1216. package/cjs/types/OktaAuthOptions.js.map +0 -1
  1217. package/cjs/types/Service.js.map +0 -1
  1218. package/cjs/types/Storage.js +0 -2
  1219. package/cjs/types/Storage.js.map +0 -1
  1220. package/cjs/types/Token.js.map +0 -1
  1221. package/cjs/types/TokenManager.js.map +0 -1
  1222. package/cjs/types/Transaction.js +0 -77
  1223. package/cjs/types/Transaction.js.map +0 -1
  1224. package/cjs/types/UserClaims.js.map +0 -1
  1225. package/cjs/types/api.js.map +0 -1
  1226. package/cjs/types/http.js +0 -2
  1227. package/cjs/types/http.js.map +0 -1
  1228. package/cjs/types/index.js +0 -212
  1229. package/cjs/types/index.js.map +0 -1
  1230. package/cjs/util/sharedStorage.js +0 -58
  1231. package/cjs/util/sharedStorage.js.map +0 -1
  1232. package/cjs/util/storage.js +0 -29
  1233. package/cjs/util/storage.js.map +0 -1
  1234. package/dist/myaccount.umd.js +0 -3
  1235. package/dist/myaccount.umd.js.map +0 -1
  1236. package/dist/okta-auth-js.umd.js +0 -3
  1237. package/dist/okta-auth-js.umd.js.map +0 -1
  1238. package/esm/browser/AuthStateManager.js +0 -161
  1239. package/esm/browser/AuthStateManager.js.map +0 -1
  1240. package/esm/browser/OktaAuth.js +0 -557
  1241. package/esm/browser/OktaAuth.js.map +0 -1
  1242. package/esm/browser/OktaUserAgent.js +0 -39
  1243. package/esm/browser/OktaUserAgent.js.map +0 -1
  1244. package/esm/browser/PromiseQueue.js +0 -65
  1245. package/esm/browser/PromiseQueue.js.map +0 -1
  1246. package/esm/browser/SavedObject.js +0 -82
  1247. package/esm/browser/SavedObject.js.map +0 -1
  1248. package/esm/browser/ServiceManager.js +0 -115
  1249. package/esm/browser/ServiceManager.js.map +0 -1
  1250. package/esm/browser/StorageManager.js +0 -148
  1251. package/esm/browser/StorageManager.js.map +0 -1
  1252. package/esm/browser/TokenManager.js +0 -386
  1253. package/esm/browser/TokenManager.js.map +0 -1
  1254. package/esm/browser/TransactionManager.js +0 -244
  1255. package/esm/browser/TransactionManager.js.map +0 -1
  1256. package/esm/browser/builderUtil.js +0 -39
  1257. package/esm/browser/builderUtil.js.map +0 -1
  1258. package/esm/browser/crypto/webauthn.js +0 -79
  1259. package/esm/browser/crypto/webauthn.js.map +0 -1
  1260. package/esm/browser/index.js +0 -92
  1261. package/esm/browser/index.js.map +0 -1
  1262. package/esm/browser/myaccount/myaccount/index.js +0 -24
  1263. package/esm/browser/myaccount/myaccount/index.js.map +0 -1
  1264. package/esm/browser/options/browser.js +0 -77
  1265. package/esm/browser/options/browser.js.map +0 -1
  1266. package/esm/browser/options/index.js +0 -85
  1267. package/esm/browser/options/index.js.map +0 -1
  1268. package/esm/browser/session.js +0 -66
  1269. package/esm/browser/session.js.map +0 -1
  1270. package/esm/browser/tx/AuthTransaction.js +0 -174
  1271. package/esm/browser/tx/AuthTransaction.js.map +0 -1
  1272. package/esm/browser/tx/api.js +0 -72
  1273. package/esm/browser/tx/api.js.map +0 -1
  1274. package/esm/browser/tx/poll.js +0 -117
  1275. package/esm/browser/tx/poll.js.map +0 -1
  1276. package/esm/browser/tx/util.js +0 -26
  1277. package/esm/browser/tx/util.js.map +0 -1
  1278. package/esm/browser/types/Token.js.map +0 -1
  1279. package/esm/browser/types/TokenManager.js.map +0 -1
  1280. package/esm/browser/types/Transaction.js.map +0 -1
  1281. package/esm/browser/util/sharedStorage.js +0 -56
  1282. package/esm/browser/util/sharedStorage.js.map +0 -1
  1283. package/esm/browser/util/storage.js +0 -26
  1284. package/esm/browser/util/storage.js.map +0 -1
  1285. package/esm/node/AuthStateManager.js +0 -161
  1286. package/esm/node/AuthStateManager.js.map +0 -1
  1287. package/esm/node/OktaAuth.js +0 -557
  1288. package/esm/node/OktaAuth.js.map +0 -1
  1289. package/esm/node/OktaUserAgent.js +0 -39
  1290. package/esm/node/OktaUserAgent.js.map +0 -1
  1291. package/esm/node/PromiseQueue.js +0 -65
  1292. package/esm/node/PromiseQueue.js.map +0 -1
  1293. package/esm/node/SavedObject.js +0 -82
  1294. package/esm/node/SavedObject.js.map +0 -1
  1295. package/esm/node/ServiceManager.js +0 -115
  1296. package/esm/node/ServiceManager.js.map +0 -1
  1297. package/esm/node/StorageManager.js +0 -148
  1298. package/esm/node/StorageManager.js.map +0 -1
  1299. package/esm/node/TokenManager.js +0 -387
  1300. package/esm/node/TokenManager.js.map +0 -1
  1301. package/esm/node/TransactionManager.js +0 -244
  1302. package/esm/node/TransactionManager.js.map +0 -1
  1303. package/esm/node/browser/browserStorage.js +0 -216
  1304. package/esm/node/browser/browserStorage.js.map +0 -1
  1305. package/esm/node/builderUtil.js +0 -39
  1306. package/esm/node/builderUtil.js.map +0 -1
  1307. package/esm/node/crypto/webauthn.js +0 -79
  1308. package/esm/node/crypto/webauthn.js.map +0 -1
  1309. package/esm/node/index.js +0 -92
  1310. package/esm/node/index.js.map +0 -1
  1311. package/esm/node/myaccount/myaccount/index.js +0 -24
  1312. package/esm/node/myaccount/myaccount/index.js.map +0 -1
  1313. package/esm/node/options/index.js +0 -85
  1314. package/esm/node/options/index.js.map +0 -1
  1315. package/esm/node/options/node.js +0 -41
  1316. package/esm/node/options/node.js.map +0 -1
  1317. package/esm/node/services/AutoRenewService.js +0 -77
  1318. package/esm/node/services/AutoRenewService.js.map +0 -1
  1319. package/esm/node/services/LeaderElectionService.js +0 -74
  1320. package/esm/node/services/LeaderElectionService.js.map +0 -1
  1321. package/esm/node/services/SyncStorageService.js +0 -130
  1322. package/esm/node/services/SyncStorageService.js.map +0 -1
  1323. package/esm/node/session.js +0 -66
  1324. package/esm/node/session.js.map +0 -1
  1325. package/esm/node/tx/AuthTransaction.js +0 -174
  1326. package/esm/node/tx/AuthTransaction.js.map +0 -1
  1327. package/esm/node/tx/api.js +0 -72
  1328. package/esm/node/tx/api.js.map +0 -1
  1329. package/esm/node/tx/poll.js +0 -117
  1330. package/esm/node/tx/poll.js.map +0 -1
  1331. package/esm/node/tx/util.js +0 -26
  1332. package/esm/node/tx/util.js.map +0 -1
  1333. package/esm/node/types/Token.js.map +0 -1
  1334. package/esm/node/types/TokenManager.js.map +0 -1
  1335. package/esm/node/types/Transaction.js.map +0 -1
  1336. package/esm/node/util/sharedStorage.js +0 -56
  1337. package/esm/node/util/sharedStorage.js.map +0 -1
  1338. package/esm/node/util/storage.js +0 -26
  1339. package/esm/node/util/storage.js.map +0 -1
  1340. package/esm/package.json +0 -5
  1341. package/lib/AuthStateManager.d.ts +0 -33
  1342. package/lib/OktaAuth.d.ts +0 -81
  1343. package/lib/OktaUserAgent.d.ts +0 -22
  1344. package/lib/PromiseQueue.d.ts +0 -30
  1345. package/lib/SavedObject.d.ts +0 -26
  1346. package/lib/ServiceManager.d.ts +0 -32
  1347. package/lib/StorageManager.d.ts +0 -28
  1348. package/lib/TokenManager.d.ts +0 -53
  1349. package/lib/TransactionManager.d.ts +0 -39
  1350. package/lib/browser/browserStorage.d.ts +0 -15
  1351. package/lib/browser/fingerprint.d.ts +0 -13
  1352. package/lib/builderUtil.d.ts +0 -14
  1353. package/lib/cdnEntry.d.ts +0 -18
  1354. package/lib/constants.d.ts +0 -33
  1355. package/lib/crypto/index.d.ts +0 -15
  1356. package/lib/crypto/webauthn.d.ts +0 -25
  1357. package/lib/errors/AuthApiError.d.ts +0 -23
  1358. package/lib/errors/AuthSdkError.d.ts +0 -22
  1359. package/lib/errors/index.d.ts +0 -18
  1360. package/lib/fetch/fetchRequest.d.ts +0 -14
  1361. package/lib/http/headers.d.ts +0 -14
  1362. package/lib/http/index.d.ts +0 -2
  1363. package/lib/http/request.d.ts +0 -16
  1364. package/lib/idx/authenticate.d.ts +0 -13
  1365. package/lib/idx/cancel.d.ts +0 -13
  1366. package/lib/idx/emailVerify.d.ts +0 -26
  1367. package/lib/idx/flow/FlowSpecification.d.ts +0 -9
  1368. package/lib/idx/handleInteractionCodeRedirect.d.ts +0 -13
  1369. package/lib/idx/idxState/index.d.ts +0 -7
  1370. package/lib/idx/idxState/v1/generateIdxAction.d.ts +0 -15
  1371. package/lib/idx/idxState/v1/idxResponseParser.d.ts +0 -21
  1372. package/lib/idx/idxState/v1/makeIdxState.d.ts +0 -14
  1373. package/lib/idx/idxState/v1/remediationParser.d.ts +0 -13
  1374. package/lib/idx/index.d.ts +0 -24
  1375. package/lib/idx/interact.d.ts +0 -26
  1376. package/lib/idx/introspect.d.ts +0 -14
  1377. package/lib/idx/poll.d.ts +0 -13
  1378. package/lib/idx/proceed.d.ts +0 -14
  1379. package/lib/idx/recoverPassword.d.ts +0 -13
  1380. package/lib/idx/register.d.ts +0 -13
  1381. package/lib/idx/remediate.d.ts +0 -21
  1382. package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +0 -28
  1383. package/lib/idx/remediators/Base/AuthenticatorData.d.ts +0 -46
  1384. package/lib/idx/remediators/Base/Remediator.d.ts +0 -43
  1385. package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +0 -54
  1386. package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +0 -26
  1387. package/lib/idx/remediators/EnrollPoll.d.ts +0 -23
  1388. package/lib/idx/remediators/EnrollProfile.d.ts +0 -39
  1389. package/lib/idx/remediators/EnrollmentChannelData.d.ts +0 -58
  1390. package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +0 -9
  1391. package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +0 -36
  1392. package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +0 -48
  1393. package/lib/idx/run.d.ts +0 -13
  1394. package/lib/idx/startTransaction.d.ts +0 -13
  1395. package/lib/idx/transactionMeta.d.ts +0 -21
  1396. package/lib/idx/types/api.d.ts +0 -112
  1397. package/lib/idx/types/index.d.ts +0 -18
  1398. package/lib/idx/types/options.d.ts +0 -47
  1399. package/lib/idx/unlockAccount.d.ts +0 -13
  1400. package/lib/idx/util.d.ts +0 -15
  1401. package/lib/index.d.ts +0 -26
  1402. package/lib/myaccount/index.d.ts +0 -13
  1403. package/lib/myaccount/request.d.ts +0 -29
  1404. package/lib/myaccount/transactions/Base.d.ts +0 -15
  1405. package/lib/myaccount/types.d.ts +0 -55
  1406. package/lib/oidc/decodeToken.d.ts +0 -2
  1407. package/lib/oidc/endpoints/authorize.d.ts +0 -14
  1408. package/lib/oidc/endpoints/token.d.ts +0 -14
  1409. package/lib/oidc/endpoints/well-known.d.ts +0 -3
  1410. package/lib/oidc/exchangeCodeForTokens.d.ts +0 -14
  1411. package/lib/oidc/getToken.d.ts +0 -2
  1412. package/lib/oidc/getUserInfo.d.ts +0 -2
  1413. package/lib/oidc/getWithPopup.d.ts +0 -2
  1414. package/lib/oidc/getWithRedirect.d.ts +0 -2
  1415. package/lib/oidc/getWithoutPrompt.d.ts +0 -2
  1416. package/lib/oidc/handleOAuthResponse.d.ts +0 -2
  1417. package/lib/oidc/index.d.ts +0 -28
  1418. package/lib/oidc/parseFromUrl.d.ts +0 -5
  1419. package/lib/oidc/renewToken.d.ts +0 -2
  1420. package/lib/oidc/renewTokens.d.ts +0 -2
  1421. package/lib/oidc/renewTokensWithRefresh.d.ts +0 -2
  1422. package/lib/oidc/revokeToken.d.ts +0 -14
  1423. package/lib/oidc/util/browser.d.ts +0 -6
  1424. package/lib/oidc/util/defaultTokenParams.d.ts +0 -2
  1425. package/lib/oidc/util/errors.d.ts +0 -15
  1426. package/lib/oidc/util/loginRedirect.d.ts +0 -30
  1427. package/lib/oidc/util/oauth.d.ts +0 -6
  1428. package/lib/oidc/util/oauthMeta.d.ts +0 -2
  1429. package/lib/oidc/util/prepareTokenParams.d.ts +0 -5
  1430. package/lib/oidc/util/refreshToken.d.ts +0 -3
  1431. package/lib/oidc/util/validateClaims.d.ts +0 -14
  1432. package/lib/oidc/util/validateToken.d.ts +0 -2
  1433. package/lib/oidc/verifyToken.d.ts +0 -2
  1434. package/lib/options/browser.d.ts +0 -16
  1435. package/lib/options/index.d.ts +0 -14
  1436. package/lib/options/node.d.ts +0 -16
  1437. package/lib/server/serverStorage.d.ts +0 -25
  1438. package/lib/services/AutoRenewService.d.ts +0 -27
  1439. package/lib/services/LeaderElectionService.d.ts +0 -33
  1440. package/lib/services/SyncStorageService.d.ts +0 -38
  1441. package/lib/tx/AuthTransaction.d.ts +0 -58
  1442. package/lib/tx/TransactionState.d.ts +0 -37
  1443. package/lib/tx/api.d.ts +0 -18
  1444. package/lib/tx/index.d.ts +0 -17
  1445. package/lib/tx/poll.d.ts +0 -20
  1446. package/lib/tx/util.d.ts +0 -15
  1447. package/lib/types/AuthState.d.ts +0 -25
  1448. package/lib/types/Cookies.d.ts +0 -26
  1449. package/lib/types/EventEmitter.d.ts +0 -17
  1450. package/lib/types/OktaAuthOptions.d.ts +0 -93
  1451. package/lib/types/Service.d.ts +0 -26
  1452. package/lib/types/Storage.d.ts +0 -95
  1453. package/lib/types/TokenManager.d.ts +0 -39
  1454. package/lib/types/Transaction.d.ts +0 -40
  1455. package/lib/types/api.d.ts +0 -251
  1456. package/lib/types/http.d.ts +0 -47
  1457. package/lib/types/index.d.ts +0 -27
  1458. package/lib/util/index.d.ts +0 -17
  1459. package/lib/util/sharedStorage.d.ts +0 -6
  1460. package/lib/util/storage.d.ts +0 -12
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ exports.createTokenAPI = createTokenAPI;
4
+
5
+ var _util = require("../../util");
6
+
7
+ var _decodeToken = require("../decodeToken");
8
+
9
+ var _exchangeCodeForTokens = require("../exchangeCodeForTokens");
10
+
11
+ var _getUserInfo = require("../getUserInfo");
12
+
13
+ var _getWithoutPrompt = require("../getWithoutPrompt");
14
+
15
+ var _getWithPopup = require("../getWithPopup");
16
+
17
+ var _getWithRedirect = require("../getWithRedirect");
18
+
19
+ var _parseFromUrl = require("../parseFromUrl");
20
+
21
+ var _renewToken = require("../renewToken");
22
+
23
+ var _renewTokens = require("../renewTokens");
24
+
25
+ var _renewTokensWithRefresh = require("../renewTokensWithRefresh");
26
+
27
+ var _revokeToken = require("../revokeToken");
28
+
29
+ var _util2 = require("../util");
30
+
31
+ var _verifyToken = require("../verifyToken");
32
+
33
+ /*!
34
+ * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
35
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
36
+ *
37
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
38
+ * Unless required by applicable law or agreed to in writing, software
39
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
40
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
41
+ *
42
+ * See the License for the specific language governing permissions and limitations under the License.
43
+ *
44
+ */
45
+ // Factory
46
+ function createTokenAPI(sdk, queue) {
47
+ const useQueue = method => {
48
+ return _util.PromiseQueue.prototype.push.bind(queue, method, null);
49
+ };
50
+
51
+ const getWithRedirectFn = useQueue(_getWithRedirect.getWithRedirect.bind(null, sdk));
52
+ const getWithRedirectApi = Object.assign(getWithRedirectFn, {
53
+ // This is exposed so we can set window.location in our tests
54
+ _setLocation: url => {
55
+ if (sdk.options.setLocation) {
56
+ sdk.options.setLocation(url);
57
+ } else {
58
+ window.location = url;
59
+ }
60
+ }
61
+ }); // eslint-disable-next-line max-len
62
+
63
+ const parseFromUrlFn = useQueue(_parseFromUrl.parseFromUrl.bind(null, sdk));
64
+ const parseFromUrlApi = Object.assign(parseFromUrlFn, {
65
+ // This is exposed so we can mock getting window.history in our tests
66
+ _getHistory: function () {
67
+ return window.history;
68
+ },
69
+ // This is exposed so we can mock getting window.location in our tests
70
+ _getLocation: function () {
71
+ return window.location;
72
+ },
73
+ // This is exposed so we can mock getting window.document in our tests
74
+ _getDocument: function () {
75
+ return window.document;
76
+ }
77
+ });
78
+ const token = {
79
+ prepareTokenParams: _util2.prepareTokenParams.bind(null, sdk),
80
+ exchangeCodeForTokens: _exchangeCodeForTokens.exchangeCodeForTokens.bind(null, sdk),
81
+ getWithoutPrompt: _getWithoutPrompt.getWithoutPrompt.bind(null, sdk),
82
+ getWithPopup: _getWithPopup.getWithPopup.bind(null, sdk),
83
+ getWithRedirect: getWithRedirectApi,
84
+ parseFromUrl: parseFromUrlApi,
85
+ decode: _decodeToken.decodeToken,
86
+ revoke: _revokeToken.revokeToken.bind(null, sdk),
87
+ renew: _renewToken.renewToken.bind(null, sdk),
88
+ renewTokensWithRefresh: _renewTokensWithRefresh.renewTokensWithRefresh.bind(null, sdk),
89
+ renewTokens: _renewTokens.renewTokens.bind(null, sdk),
90
+ getUserInfo: (accessTokenObject, idTokenObject) => {
91
+ return (0, _getUserInfo.getUserInfo)(sdk, accessTokenObject, idTokenObject);
92
+ },
93
+ verify: _verifyToken.verifyToken.bind(null, sdk),
94
+ isLoginRedirect: _util2.isLoginRedirect.bind(null, sdk)
95
+ }; // Wrap certain async token API methods using PromiseQueue to avoid issues with concurrency
96
+ // 'getWithRedirect' and 'parseFromUrl' are already wrapped
97
+
98
+ const toWrap = ['getWithoutPrompt', 'getWithPopup', 'revoke', 'renew', 'renewTokensWithRefresh', 'renewTokens'];
99
+ toWrap.forEach(key => {
100
+ token[key] = useQueue(token[key]);
101
+ });
102
+ return token;
103
+ }
104
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","names":["createTokenAPI","sdk","queue","useQueue","method","PromiseQueue","prototype","push","bind","getWithRedirectFn","getWithRedirect","getWithRedirectApi","Object","assign","_setLocation","url","options","setLocation","window","location","parseFromUrlFn","parseFromUrl","parseFromUrlApi","_getHistory","history","_getLocation","_getDocument","document","token","prepareTokenParams","exchangeCodeForTokens","getWithoutPrompt","getWithPopup","decode","decodeToken","revoke","revokeToken","renew","renewToken","renewTokensWithRefresh","renewTokens","getUserInfo","accessTokenObject","idTokenObject","verify","verifyToken","isLoginRedirect","toWrap","forEach","key"],"sources":["../../../../lib/oidc/factory/api.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\n\nimport { PromiseQueue } from '../../util';\nimport { decodeToken } from '../decodeToken';\nimport { exchangeCodeForTokens } from '../exchangeCodeForTokens';\nimport { getUserInfo } from '../getUserInfo';\nimport { getWithoutPrompt } from '../getWithoutPrompt';\nimport { getWithPopup } from '../getWithPopup';\nimport { getWithRedirect } from '../getWithRedirect';\nimport { parseFromUrl } from '../parseFromUrl';\nimport { renewToken } from '../renewToken';\nimport { renewTokens } from '../renewTokens';\nimport { renewTokensWithRefresh } from '../renewTokensWithRefresh';\nimport { revokeToken } from '../revokeToken';\nimport {\n AccessToken,\n CustomUserClaims,\n GetWithRedirectAPI,\n GetWithRedirectFunction,\n IDToken,\n OktaAuthOAuthInterface,\n ParseFromUrlInterface,\n TokenAPI,\n UserClaims\n} from '../types';\nimport { isLoginRedirect, prepareTokenParams } from '../util';\nimport { verifyToken } from '../verifyToken';\n\n// Factory\nexport function createTokenAPI(sdk: OktaAuthOAuthInterface, queue: PromiseQueue): TokenAPI {\n const useQueue = (method) => {\n return PromiseQueue.prototype.push.bind(queue, method, null);\n };\n\n const getWithRedirectFn = useQueue(getWithRedirect.bind(null, sdk)) as GetWithRedirectFunction;\n const getWithRedirectApi: GetWithRedirectAPI = Object.assign(getWithRedirectFn, {\n // This is exposed so we can set window.location in our tests\n _setLocation: (url) => {\n if (sdk.options.setLocation) {\n sdk.options.setLocation(url);\n } else {\n window.location = url;\n }\n }\n });\n // eslint-disable-next-line max-len\n const parseFromUrlFn = useQueue(parseFromUrl.bind(null, sdk)) as ParseFromUrlInterface;\n const parseFromUrlApi: ParseFromUrlInterface = Object.assign(parseFromUrlFn, {\n // This is exposed so we can mock getting window.history in our tests\n _getHistory: function() {\n return window.history;\n },\n\n // This is exposed so we can mock getting window.location in our tests\n _getLocation: function() {\n return window.location;\n },\n\n // This is exposed so we can mock getting window.document in our tests\n _getDocument: function() {\n return window.document;\n }\n });\n\n const token: TokenAPI ={\n prepareTokenParams: prepareTokenParams.bind(null, sdk),\n exchangeCodeForTokens: exchangeCodeForTokens.bind(null, sdk),\n getWithoutPrompt: getWithoutPrompt.bind(null, sdk),\n getWithPopup: getWithPopup.bind(null, sdk),\n getWithRedirect: getWithRedirectApi,\n parseFromUrl: parseFromUrlApi,\n decode: decodeToken,\n revoke: revokeToken.bind(null, sdk),\n renew: renewToken.bind(null, sdk),\n renewTokensWithRefresh: renewTokensWithRefresh.bind(null, sdk),\n renewTokens: renewTokens.bind(null, sdk),\n getUserInfo: <C extends CustomUserClaims = CustomUserClaims>(\n accessTokenObject: AccessToken,\n idTokenObject: IDToken\n ): Promise<UserClaims<C>> => {\n return getUserInfo(sdk, accessTokenObject, idTokenObject);\n },\n verify: verifyToken.bind(null, sdk),\n isLoginRedirect: isLoginRedirect.bind(null, sdk)\n };\n\n // Wrap certain async token API methods using PromiseQueue to avoid issues with concurrency\n // 'getWithRedirect' and 'parseFromUrl' are already wrapped\n const toWrap = [\n 'getWithoutPrompt',\n 'getWithPopup',\n 'revoke',\n 'renew',\n 'renewTokensWithRefresh',\n 'renewTokens'\n ];\n toWrap.forEach(key => {\n token[key] = useQueue(token[key]);\n });\n\n return token;\n}\n"],"mappings":";;;;AAaA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAC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AAa9C,QAAQ,CAACyB,KAAK,CAACqB,GAAD,CAAN,CAArB;EACD,CAFD;EAIA,OAAOrB,KAAP;AACD"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _api = require("./api");
4
+
5
+ Object.keys(_api).forEach(function (key) {
6
+ if (key === "default" || key === "__esModule") return;
7
+ if (key in exports && exports[key] === _api[key]) return;
8
+ Object.defineProperty(exports, key, {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _api[key];
12
+ }
13
+ });
14
+ });
15
+
16
+ var _OktaAuthOAuth = require("./OktaAuthOAuth");
17
+
18
+ Object.keys(_OktaAuthOAuth).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _OktaAuthOAuth[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _OktaAuthOAuth[key];
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../lib/oidc/factory/index.ts"],"sourcesContent":["export * from './api';\nexport * from './OktaAuthOAuth';\n"],"mappings":";;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,13 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  exports.getToken = getToken;
6
6
 
7
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
-
9
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
10
-
11
7
  var _util = require("./util");
12
8
 
13
9
  var _AuthSdkError = _interopRequireDefault(require("../errors/AuthSdkError"));
@@ -87,7 +83,7 @@ var _handleOAuthResponse = require("./handleOAuthResponse");
87
83
  */
88
84
  function getToken(sdk, options) {
89
85
  if (arguments.length > 2) {
90
- return _promise.default.reject(new _AuthSdkError.default('As of version 3.0, "getToken" takes only a single set of options'));
86
+ return Promise.reject(new _AuthSdkError.default('As of version 3.0, "getToken" takes only a single set of options'));
91
87
  }
92
88
 
93
89
  options = options || {}; // window object cannot be serialized, save for later use
@@ -107,9 +103,9 @@ function getToken(sdk, options) {
107
103
  };
108
104
 
109
105
  if (options.sessionToken) {
110
- (0, _assign.default)(tokenParams, sessionTokenOverrides);
106
+ Object.assign(tokenParams, sessionTokenOverrides);
111
107
  } else if (options.idp) {
112
- (0, _assign.default)(tokenParams, idpOverrides);
108
+ Object.assign(tokenParams, idpOverrides);
113
109
  } // Use the query params to build the authorize url
114
110
 
115
111
 
@@ -164,7 +160,7 @@ function getToken(sdk, options) {
164
160
  } // The popup may be closed without receiving an OAuth response. Setup a poller to monitor the window.
165
161
 
166
162
 
167
- var popupPromise = new _promise.default(function (resolve, reject) {
163
+ var popupPromise = new Promise(function (resolve, reject) {
168
164
  var closePoller = setInterval(function () {
169
165
  if (!popupWindow || popupWindow.closed) {
170
166
  clearInterval(closePoller);
@@ -1 +1 @@
1
- {"version":3,"file":"getToken.js","names":["getToken","sdk","options","arguments","length","reject","AuthSdkError","popupWindow","undefined","prepareTokenParams","then","tokenParams","sessionTokenOverrides","prompt","responseMode","display","idpOverrides","sessionToken","idp","requestUrl","endpoint","urls","getOAuthUrls","codeVerifier","tokenUrl","authorizeUrl","buildAuthorizeParams","flowType","iframePromise","addPostMessageListener","timeout","state","iframeEl","loadFrame","res","handleOAuthResponse","finally","document","body","contains","parentElement","removeChild","oauthPromise","features","isPopupPostMessageSupported","location","assign","popupPromise","resolve","closePoller","setInterval","closed","clearInterval","catch","err","close"],"sources":["../../../lib/oidc/getToken.ts"],"sourcesContent":["\n/* global document */\n/* eslint-disable complexity, max-statements */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport {\n getOAuthUrls,\n loadFrame,\n addPostMessageListener\n} from './util';\n\nimport AuthSdkError from '../errors/AuthSdkError';\n\nimport {\n OktaAuthOIDCInterface,\n TokenParams,\n PopupParams,\n OAuthResponse,\n} from '../types';\n\nimport { prepareTokenParams } from './util/prepareTokenParams';\nimport { buildAuthorizeParams } from './endpoints/authorize';\nimport { handleOAuthResponse } from './handleOAuthResponse';\n/*\n * Retrieve an idToken from an Okta or a third party idp\n *\n * Two main flows:\n *\n * 1) Exchange a sessionToken for a token\n *\n * Required:\n * clientId: passed via the OktaAuth constructor or into getToken\n * sessionToken: 'yourtoken'\n *\n * Optional:\n * redirectUri: defaults to window.location.href\n * scopes: defaults to ['openid', 'email']\n *\n * Forced:\n * prompt: 'none'\n * responseMode: 'okta_post_message'\n * display: undefined\n *\n * 2) Get a token from an idp\n *\n * Required:\n * clientId: passed via the OktaAuth constructor or into getToken\n *\n * Optional:\n * redirectUri: defaults to window.location.href\n * scopes: defaults to ['openid', 'email']\n * idp: defaults to Okta as an idp\n * prompt: no default. Pass 'none' to throw an error if user is not signed in\n *\n * Forced:\n * display: 'popup'\n *\n * Only common optional params shown. Any OAuth parameters not explicitly forced are available to override\n *\n * @param {Object} oauthOptions\n * @param {String} [oauthOptions.clientId] ID of this client\n * @param {String} [oauthOptions.redirectUri] URI that the iframe or popup will go to once authenticated\n * @param {String[]} [oauthOptions.scopes] OAuth 2.0 scopes to request (openid must be specified)\n * @param {String} [oauthOptions.idp] ID of an external IdP to use for user authentication\n * @param {String} [oauthOptions.sessionToken] Bootstrap Session Token returned by the Okta Authentication API\n * @param {String} [oauthOptions.prompt] Determines whether the Okta login will be displayed on failure.\n * Use 'none' to prevent this behavior\n *\n * @param {Object} options\n * @param {Integer} [options.timeout] Time in ms before the flow is automatically terminated. Defaults to 120000\n * @param {String} [options.popupTitle] Title dispayed in the popup.\n * Defaults to 'External Identity Provider User Authentication'\n */\nexport function getToken(sdk: OktaAuthOIDCInterface, options: TokenParams & PopupParams) {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getToken\" takes only a single set of options'));\n }\n\n options = options || {};\n\n // window object cannot be serialized, save for later use\n // TODO: move popup related params into a separate options object\n const popupWindow = options.popupWindow;\n options.popupWindow = undefined;\n\n return prepareTokenParams(sdk, options)\n .then(function (tokenParams: TokenParams) {\n\n // Start overriding any options that don't make sense\n var sessionTokenOverrides = {\n prompt: 'none',\n responseMode: 'okta_post_message',\n display: null\n };\n\n var idpOverrides = {\n display: 'popup'\n };\n\n if (options.sessionToken) {\n Object.assign(tokenParams, sessionTokenOverrides);\n } else if (options.idp) {\n Object.assign(tokenParams, idpOverrides);\n }\n\n // Use the query params to build the authorize url\n var requestUrl,\n endpoint,\n urls;\n\n // Get authorizeUrl and issuer\n urls = getOAuthUrls(sdk, tokenParams);\n endpoint = options.codeVerifier ? urls.tokenUrl : urls.authorizeUrl;\n requestUrl = endpoint + buildAuthorizeParams(tokenParams);\n\n // Determine the flow type\n var flowType;\n if (tokenParams.sessionToken || tokenParams.display === null) {\n flowType = 'IFRAME';\n } else if (tokenParams.display === 'popup') {\n flowType = 'POPUP';\n } else {\n flowType = 'IMPLICIT';\n }\n\n // Execute the flow type\n switch (flowType) {\n case 'IFRAME':\n var iframePromise = addPostMessageListener(sdk, options.timeout, tokenParams.state);\n var iframeEl = loadFrame(requestUrl);\n return iframePromise\n .then(function (res) {\n return handleOAuthResponse(sdk, tokenParams, res as OAuthResponse, urls);\n })\n .finally(function () {\n if (document.body.contains(iframeEl)) {\n iframeEl.parentElement?.removeChild(iframeEl);\n }\n });\n\n case 'POPUP':\n var oauthPromise; // resolves with OAuth response\n\n // Add listener on postMessage before window creation, so\n // postMessage isn't triggered before we're listening\n if (tokenParams.responseMode === 'okta_post_message') {\n if (!sdk.features.isPopupPostMessageSupported()) {\n throw new AuthSdkError('This browser doesn\\'t have full postMessage support');\n }\n oauthPromise = addPostMessageListener(sdk, options.timeout, tokenParams.state);\n }\n\n // Redirect for authorization\n // popupWindown can be null when popup is blocked\n if (popupWindow) { \n popupWindow.location.assign(requestUrl);\n }\n\n // The popup may be closed without receiving an OAuth response. Setup a poller to monitor the window.\n var popupPromise = new Promise(function (resolve, reject) {\n var closePoller = setInterval(function () {\n if (!popupWindow || popupWindow.closed) {\n clearInterval(closePoller);\n reject(new AuthSdkError('Unable to parse OAuth flow response'));\n }\n }, 100);\n\n // Proxy the OAuth promise results\n oauthPromise\n .then(function (res) {\n clearInterval(closePoller);\n resolve(res);\n })\n .catch(function (err) {\n clearInterval(closePoller);\n reject(err);\n });\n });\n\n return popupPromise\n .then(function (res) {\n return handleOAuthResponse(sdk, tokenParams, res as OAuthResponse, urls);\n })\n .finally(function () {\n if (popupWindow && !popupWindow.closed) {\n popupWindow.close();\n }\n });\n\n default:\n throw new AuthSdkError('The full page redirect flow is not supported');\n }\n });\n}"],"mappings":";;;;;;;;;;AAeA;;AAMA;;AASA;;AACA;;AACA;;AA/BA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,QAAT,CAAkBC,GAAlB,EAA8CC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AmB3C,MAAnB,EAA2B;UACxD,IAAI4C,WAAW,GAAGC,WAAW,CAAC,YAAY;YACxC,IAAI,CAAC3C,WAAD,IAAgBA,WAAW,CAAC4C,MAAhC,EAAwC;cACtCC,aAAa,CAACH,WAAD,CAAb;cACA5C,MAAM,CAAC,IAAIC,qBAAJ,CAAiB,qCAAjB,CAAD,CAAN;YACD;UACF,CAL4B,EAK1B,GAL0B,CAA7B,CADwD,CAQxD;;UACAoC,YAAY,CACThC,IADH,CACQ,UAAUwB,GAAV,EAAe;YACnBkB,aAAa,CAACH,WAAD,CAAb;YACAD,OAAO,CAACd,GAAD,CAAP;UACD,CAJH,EAKGmB,KALH,CAKS,UAAUC,GAAV,EAAe;YACpBF,aAAa,CAACH,WAAD,CAAb;YACA5C,MAAM,CAACiD,GAAD,CAAN;UACD,CARH;QASD,CAlBkB,CAAnB;QAoBA,OAAOP,YAAY,CAChBrC,IADI,CACC,UAAUwB,GAAV,EAAe;UACnB,OAAO,IAAAC,wCAAA,EAAoBlC,GAApB,EAAyBU,WAAzB,EAAsCuB,GAAtC,EAA4Db,IAA5D,CAAP;QACD,CAHI,EAIJe,OAJI,CAII,YAAY;UACnB,IAAI7B,WAAW,IAAI,CAACA,WAAW,CAAC4C,MAAhC,EAAwC;YACtC5C,WAAW,CAACgD,KAAZ;UACD;QACF,CARI,CAAP;;MAUF;QACE,MAAM,IAAIjD,qBAAJ,CAAiB,8CAAjB,CAAN;IAhEJ;EAkED,CA3GI,CAAP;AA4GD"}
1
+ {"version":3,"file":"getToken.js","names":["getToken","sdk","options","arguments","length","Promise","reject","AuthSdkError","popupWindow","undefined","prepareTokenParams","then","tokenParams","sessionTokenOverrides","prompt","responseMode","display","idpOverrides","sessionToken","Object","assign","idp","requestUrl","endpoint","urls","getOAuthUrls","codeVerifier","tokenUrl","authorizeUrl","buildAuthorizeParams","flowType","iframePromise","addPostMessageListener","timeout","state","iframeEl","loadFrame","res","handleOAuthResponse","finally","document","body","contains","parentElement","removeChild","oauthPromise","features","isPopupPostMessageSupported","location","popupPromise","resolve","closePoller","setInterval","closed","clearInterval","catch","err","close"],"sources":["../../../lib/oidc/getToken.ts"],"sourcesContent":["\n/* global document */\n/* eslint-disable complexity, max-statements */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport {\n getOAuthUrls,\n loadFrame,\n addPostMessageListener\n} from './util';\n\nimport AuthSdkError from '../errors/AuthSdkError';\n\nimport {\n OktaAuthOAuthInterface,\n TokenParams,\n PopupParams,\n OAuthResponse,\n} from './types';\n\nimport { prepareTokenParams } from './util/prepareTokenParams';\nimport { buildAuthorizeParams } from './endpoints/authorize';\nimport { handleOAuthResponse } from './handleOAuthResponse';\n/*\n * Retrieve an idToken from an Okta or a third party idp\n *\n * Two main flows:\n *\n * 1) Exchange a sessionToken for a token\n *\n * Required:\n * clientId: passed via the OktaAuth constructor or into getToken\n * sessionToken: 'yourtoken'\n *\n * Optional:\n * redirectUri: defaults to window.location.href\n * scopes: defaults to ['openid', 'email']\n *\n * Forced:\n * prompt: 'none'\n * responseMode: 'okta_post_message'\n * display: undefined\n *\n * 2) Get a token from an idp\n *\n * Required:\n * clientId: passed via the OktaAuth constructor or into getToken\n *\n * Optional:\n * redirectUri: defaults to window.location.href\n * scopes: defaults to ['openid', 'email']\n * idp: defaults to Okta as an idp\n * prompt: no default. Pass 'none' to throw an error if user is not signed in\n *\n * Forced:\n * display: 'popup'\n *\n * Only common optional params shown. Any OAuth parameters not explicitly forced are available to override\n *\n * @param {Object} oauthOptions\n * @param {String} [oauthOptions.clientId] ID of this client\n * @param {String} [oauthOptions.redirectUri] URI that the iframe or popup will go to once authenticated\n * @param {String[]} [oauthOptions.scopes] OAuth 2.0 scopes to request (openid must be specified)\n * @param {String} [oauthOptions.idp] ID of an external IdP to use for user authentication\n * @param {String} [oauthOptions.sessionToken] Bootstrap Session Token returned by the Okta Authentication API\n * @param {String} [oauthOptions.prompt] Determines whether the Okta login will be displayed on failure.\n * Use 'none' to prevent this behavior\n *\n * @param {Object} options\n * @param {Integer} [options.timeout] Time in ms before the flow is automatically terminated. Defaults to 120000\n * @param {String} [options.popupTitle] Title dispayed in the popup.\n * Defaults to 'External Identity Provider User Authentication'\n */\nexport function getToken(sdk: OktaAuthOAuthInterface, options: TokenParams & PopupParams) {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getToken\" takes only a single set of options'));\n }\n\n options = options || {};\n\n // window object cannot be serialized, save for later use\n // TODO: move popup related params into a separate options object\n const popupWindow = options.popupWindow;\n options.popupWindow = undefined;\n\n return prepareTokenParams(sdk, options)\n .then(function (tokenParams: TokenParams) {\n\n // Start overriding any options that don't make sense\n var sessionTokenOverrides = {\n prompt: 'none',\n responseMode: 'okta_post_message',\n display: null\n };\n\n var idpOverrides = {\n display: 'popup'\n };\n\n if (options.sessionToken) {\n Object.assign(tokenParams, sessionTokenOverrides);\n } else if (options.idp) {\n Object.assign(tokenParams, idpOverrides);\n }\n\n // Use the query params to build the authorize url\n var requestUrl,\n endpoint,\n urls;\n\n // Get authorizeUrl and issuer\n urls = getOAuthUrls(sdk, tokenParams);\n endpoint = options.codeVerifier ? urls.tokenUrl : urls.authorizeUrl;\n requestUrl = endpoint + buildAuthorizeParams(tokenParams);\n\n // Determine the flow type\n var flowType;\n if (tokenParams.sessionToken || tokenParams.display === null) {\n flowType = 'IFRAME';\n } else if (tokenParams.display === 'popup') {\n flowType = 'POPUP';\n } else {\n flowType = 'IMPLICIT';\n }\n\n // Execute the flow type\n switch (flowType) {\n case 'IFRAME':\n var iframePromise = addPostMessageListener(sdk, options.timeout, tokenParams.state);\n var iframeEl = loadFrame(requestUrl);\n return iframePromise\n .then(function (res) {\n return handleOAuthResponse(sdk, tokenParams, res as OAuthResponse, urls);\n })\n .finally(function () {\n if (document.body.contains(iframeEl)) {\n iframeEl.parentElement?.removeChild(iframeEl);\n }\n });\n\n case 'POPUP':\n var oauthPromise; // resolves with OAuth response\n\n // Add listener on postMessage before window creation, so\n // postMessage isn't triggered before we're listening\n if (tokenParams.responseMode === 'okta_post_message') {\n if (!sdk.features.isPopupPostMessageSupported()) {\n throw new AuthSdkError('This browser doesn\\'t have full postMessage support');\n }\n oauthPromise = addPostMessageListener(sdk, options.timeout, tokenParams.state);\n }\n\n // Redirect for authorization\n // popupWindown can be null when popup is blocked\n if (popupWindow) { \n popupWindow.location.assign(requestUrl);\n }\n\n // The popup may be closed without receiving an OAuth response. Setup a poller to monitor the window.\n var popupPromise = new Promise(function (resolve, reject) {\n var closePoller = setInterval(function () {\n if (!popupWindow || popupWindow.closed) {\n clearInterval(closePoller);\n reject(new AuthSdkError('Unable to parse OAuth flow response'));\n }\n }, 100);\n\n // Proxy the OAuth promise results\n oauthPromise\n .then(function (res) {\n clearInterval(closePoller);\n resolve(res);\n })\n .catch(function (err) {\n clearInterval(closePoller);\n reject(err);\n });\n });\n\n return popupPromise\n .then(function (res) {\n return handleOAuthResponse(sdk, tokenParams, res as OAuthResponse, urls);\n })\n .finally(function () {\n if (popupWindow && !popupWindow.closed) {\n popupWindow.close();\n }\n });\n\n default:\n throw new AuthSdkError('The full page redirect flow is not supported');\n }\n });\n}"],"mappings":";;;;;;AAeA;;AAMA;;AASA;;AACA;;AACA;;AA/BA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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ACsB,KAAzD,CAAf;QACD,CAVH,CAYE;QACA;;;QACA,IAAI1B,WAAJ,EAAiB;UACfA,WAAW,CAACwC,QAAZ,CAAqB5B,MAArB,CAA4BE,UAA5B;QACD,CAhBH,CAkBE;;;QACA,IAAI2B,YAAY,GAAG,IAAI5C,OAAJ,CAAY,UAAU6C,OAAV,EAAmB5C,MAAnB,EAA2B;UACxD,IAAI6C,WAAW,GAAGC,WAAW,CAAC,YAAY;YACxC,IAAI,CAAC5C,WAAD,IAAgBA,WAAW,CAAC6C,MAAhC,EAAwC;cACtCC,aAAa,CAACH,WAAD,CAAb;cACA7C,MAAM,CAAC,IAAIC,qBAAJ,CAAiB,qCAAjB,CAAD,CAAN;YACD;UACF,CAL4B,EAK1B,GAL0B,CAA7B,CADwD,CAQxD;;UACAsC,YAAY,CACTlC,IADH,CACQ,UAAU0B,GAAV,EAAe;YACnBiB,aAAa,CAACH,WAAD,CAAb;YACAD,OAAO,CAACb,GAAD,CAAP;UACD,CAJH,EAKGkB,KALH,CAKS,UAAUC,GAAV,EAAe;YACpBF,aAAa,CAACH,WAAD,CAAb;YACA7C,MAAM,CAACkD,GAAD,CAAN;UACD,CARH;QASD,CAlBkB,CAAnB;QAoBA,OAAOP,YAAY,CAChBtC,IADI,CACC,UAAU0B,GAAV,EAAe;UACnB,OAAO,IAAAC,wCAAA,EAAoBrC,GAApB,EAAyBW,WAAzB,EAAsCyB,GAAtC,EAA4Db,IAA5D,CAAP;QACD,CAHI,EAIJe,OAJI,CAII,YAAY;UACnB,IAAI/B,WAAW,IAAI,CAACA,WAAW,CAAC6C,MAAhC,EAAwC;YACtC7C,WAAW,CAACiD,KAAZ;UACD;QACF,CARI,CAAP;;MAUF;QACE,MAAM,IAAIlD,qBAAJ,CAAiB,8CAAjB,CAAN;IAhEJ;EAkED,CA3GI,CAAP;AA4GD"}
@@ -1,18 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
3
  exports.getUserInfo = getUserInfo;
6
4
 
7
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
-
9
5
  var _util = require("../util");
10
6
 
11
7
  var _errors = require("../errors");
12
8
 
13
9
  var _http = require("../http");
14
10
 
15
- var _types = require("../types");
11
+ var _types = require("./types");
16
12
 
17
13
  /* eslint-disable complexity */
18
14
 
@@ -39,11 +35,11 @@ async function getUserInfo(sdk, accessTokenObject, idTokenObject) {
39
35
  }
40
36
 
41
37
  if (!accessTokenObject || !(0, _types.isAccessToken)(accessTokenObject)) {
42
- return _promise.default.reject(new _errors.AuthSdkError('getUserInfo requires an access token object'));
38
+ return Promise.reject(new _errors.AuthSdkError('getUserInfo requires an access token object'));
43
39
  }
44
40
 
45
41
  if (!idTokenObject || !(0, _types.isIDToken)(idTokenObject)) {
46
- return _promise.default.reject(new _errors.AuthSdkError('getUserInfo requires an ID token object'));
42
+ return Promise.reject(new _errors.AuthSdkError('getUserInfo requires an ID token object'));
47
43
  }
48
44
 
49
45
  return (0, _http.httpRequest)(sdk, {
@@ -56,7 +52,7 @@ async function getUserInfo(sdk, accessTokenObject, idTokenObject) {
56
52
  return userInfo;
57
53
  }
58
54
 
59
- return _promise.default.reject(new _errors.AuthSdkError('getUserInfo request was rejected due to token mismatch'));
55
+ return Promise.reject(new _errors.AuthSdkError('getUserInfo request was rejected due to token mismatch'));
60
56
  }).catch(function (err) {
61
57
  if (err.xhr && (err.xhr.status === 401 || err.xhr.status === 403)) {
62
58
  var authenticateHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"getUserInfo.js","names":["getUserInfo","sdk","accessTokenObject","idTokenObject","tokenManager","getTokens","accessToken","idToken","isAccessToken","reject","AuthSdkError","isIDToken","httpRequest","url","userinfoUrl","method","then","userInfo","sub","claims","catch","err","xhr","status","authenticateHeader","headers","isFunction","get","getResponseHeader","errorMatches","match","errorDescriptionMatches","error","errorDescription","OAuthError"],"sources":["../../../lib/oidc/getUserInfo.ts"],"sourcesContent":["/* eslint-disable complexity */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { isFunction } from '../util';\nimport { AuthSdkError, OAuthError } from '../errors';\nimport { httpRequest } from '../http';\nimport { AccessToken, IDToken, UserClaims, isAccessToken, isIDToken, CustomUserClaims } from '../types';\n\nexport async function getUserInfo<T extends CustomUserClaims = CustomUserClaims>(\n sdk, accessTokenObject: AccessToken,\n idTokenObject: IDToken\n): Promise<UserClaims<T>> {\n // If token objects were not passed, attempt to read from the TokenManager\n if (!accessTokenObject) {\n accessTokenObject = (await sdk.tokenManager.getTokens()).accessToken as AccessToken;\n }\n if (!idTokenObject) {\n idTokenObject = (await sdk.tokenManager.getTokens()).idToken as IDToken;\n }\n\n if (!accessTokenObject || !isAccessToken(accessTokenObject)) {\n return Promise.reject(new AuthSdkError('getUserInfo requires an access token object'));\n }\n\n if (!idTokenObject || !isIDToken(idTokenObject)) {\n return Promise.reject(new AuthSdkError('getUserInfo requires an ID token object'));\n }\n\n return httpRequest(sdk, {\n url: accessTokenObject.userinfoUrl,\n method: 'GET',\n accessToken: accessTokenObject.accessToken\n })\n .then(userInfo => {\n // Only return the userinfo response if subjects match to mitigate token substitution attacks\n if (userInfo.sub === idTokenObject.claims.sub) {\n return userInfo;\n }\n return Promise.reject(new AuthSdkError('getUserInfo request was rejected due to token mismatch'));\n })\n .catch(function (err) {\n if (err.xhr && (err.xhr.status === 401 || err.xhr.status === 403)) {\n var authenticateHeader;\n if (err.xhr.headers && isFunction(err.xhr.headers.get) && err.xhr.headers.get('WWW-Authenticate')) {\n authenticateHeader = err.xhr.headers.get('WWW-Authenticate');\n } else if (isFunction(err.xhr.getResponseHeader)) {\n authenticateHeader = err.xhr.getResponseHeader('WWW-Authenticate');\n }\n if (authenticateHeader) {\n var errorMatches = authenticateHeader.match(/error=\"(.*?)\"/) || [];\n var errorDescriptionMatches = authenticateHeader.match(/error_description=\"(.*?)\"/) || [];\n var error = errorMatches[1];\n var errorDescription = errorDescriptionMatches[1];\n if (error && errorDescription) {\n err = new OAuthError(error, errorDescription);\n }\n }\n }\n throw err;\n });\n}\n"],"mappings":";;;;;;;;AAaA;;AACA;;AACA;;AACA;;AAhBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,eAAeA,WAAf,CACLC,GADK,EACAC,iBADA,EAELC,aAFK,EAGmB;EACxB;EACA,IAAI,CAACD,iBAAL,EAAwB;IACtBA,iBAAiB,GAAG,CAAC,MAAMD,GAAG,CAACG,YAAJ,CAAiBC,SAAjB,EAAP,EAAqCC,WAAzD;EACD;;EACD,IAAI,CAACH,aAAL,EAAoB;IAClBA,aAAa,GAAG,CAAC,MAAMF,GAAG,CAACG,YAAJ,CAAiBC,SAAjB,EAAP,EAAqCE,OAArD;EACD;;EAED,IAAI,CAACL,iBAAD,IAAsB,CAAC,IAAAM,oBAAA,EAAcN,iBAAd,CAA3B,EAA6D;IAC3D,OAAO,iBAAQO,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,6CAAjB,CAAf,CAAP;EACD;;EAED,IAAI,CAACP,aAAD,IAAkB,CAAC,IAAAQ,gBAAA,EAAUR,aAAV,CAAvB,EAAiD;IAC/C,OAAO,iBAAQM,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,yCAAjB,CAAf,CAAP;EACD;;EAED,OAAO,IAAAE,iBAAA,EAAYX,GAAZ,EAAiB;IACtBY,GAAG,EAAEX,iBAAiB,CAACY,WADD;IAEtBC,MAAM,EAAE,KAFc;IAGtBT,WAA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GF,uBAAuB,CAAC,CAAD,CAA9C;;QACA,IAAIC,KAAK,IAAIC,gBAAb,EAA+B;UAC7BZ,GAAG,GAAG,IAAIa,kBAAJ,CAAeF,KAAf,EAAsBC,gBAAtB,CAAN;QACD;MACF;IACF;;IACD,MAAMZ,GAAN;EACD,CA/BI,CAAP;AAgCD"}
1
+ {"version":3,"file":"getUserInfo.js","names":["getUserInfo","sdk","accessTokenObject","idTokenObject","tokenManager","getTokens","accessToken","idToken","isAccessToken","Promise","reject","AuthSdkError","isIDToken","httpRequest","url","userinfoUrl","method","then","userInfo","sub","claims","catch","err","xhr","status","authenticateHeader","headers","isFunction","get","getResponseHeader","errorMatches","match","errorDescriptionMatches","error","errorDescription","OAuthError"],"sources":["../../../lib/oidc/getUserInfo.ts"],"sourcesContent":["/* eslint-disable complexity */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { isFunction } from '../util';\nimport { AuthSdkError, OAuthError } from '../errors';\nimport { httpRequest } from '../http';\nimport { AccessToken, IDToken, UserClaims, isAccessToken, isIDToken, CustomUserClaims } from './types';\n\nexport async function getUserInfo<T extends CustomUserClaims = CustomUserClaims>(\n sdk, accessTokenObject: AccessToken,\n idTokenObject: IDToken\n): Promise<UserClaims<T>> {\n // If token objects were not passed, attempt to read from the TokenManager\n if (!accessTokenObject) {\n accessTokenObject = (await sdk.tokenManager.getTokens()).accessToken as AccessToken;\n }\n if (!idTokenObject) {\n idTokenObject = (await sdk.tokenManager.getTokens()).idToken as IDToken;\n }\n\n if (!accessTokenObject || !isAccessToken(accessTokenObject)) {\n return Promise.reject(new AuthSdkError('getUserInfo requires an access token object'));\n }\n\n if (!idTokenObject || !isIDToken(idTokenObject)) {\n return Promise.reject(new AuthSdkError('getUserInfo requires an ID token object'));\n }\n\n return httpRequest(sdk, {\n url: accessTokenObject.userinfoUrl,\n method: 'GET',\n accessToken: accessTokenObject.accessToken\n })\n .then(userInfo => {\n // Only return the userinfo response if subjects match to mitigate token substitution attacks\n if (userInfo.sub === idTokenObject.claims.sub) {\n return userInfo;\n }\n return Promise.reject(new AuthSdkError('getUserInfo request was rejected due to token mismatch'));\n })\n .catch(function (err) {\n if (err.xhr && (err.xhr.status === 401 || err.xhr.status === 403)) {\n var authenticateHeader;\n if (err.xhr.headers && isFunction(err.xhr.headers.get) && err.xhr.headers.get('WWW-Authenticate')) {\n authenticateHeader = err.xhr.headers.get('WWW-Authenticate');\n } else if (isFunction(err.xhr.getResponseHeader)) {\n authenticateHeader = err.xhr.getResponseHeader('WWW-Authenticate');\n }\n if (authenticateHeader) {\n var errorMatches = authenticateHeader.match(/error=\"(.*?)\"/) || [];\n var errorDescriptionMatches = authenticateHeader.match(/error_description=\"(.*?)\"/) || [];\n var error = errorMatches[1];\n var errorDescription = errorDescriptionMatches[1];\n if (error && errorDescription) {\n err = new OAuthError(error, errorDescription);\n }\n }\n }\n throw err;\n });\n}\n"],"mappings":";;;;AAaA;;AACA;;AACA;;AACA;;AAhBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,eAAeA,WAAf,CACLC,GADK,EACAC,iBADA,EAELC,aAFK,EAGmB;EACxB;EACA,IAAI,CAACD,iBAAL,EAAwB;IACtBA,iBAAiB,GAAG,CAAC,MAAMD,GAAG,CAACG,YAAJ,CAAiBC,SAAjB,EAAP,EAAqCC,WAAzD;EACD;;EACD,IAAI,CAACH,aAAL,EAAoB;IAClBA,aAAa,GAAG,CAAC,MAAMF,GAAG,CAACG,YAAJ,CAAiBC,SAAjB,EAAP,EAA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AQG,OAAR,CAAgBE,GAAhB,CAAoB,kBAApB,CAArB;MACD,CAFD,MAEO,IAAI,IAAAD,gBAAA,EAAWL,GAAG,CAACC,GAAJ,CAAQM,iBAAnB,CAAJ,EAA2C;QAChDJ,kBAAkB,GAAGH,GAAG,CAACC,GAAJ,CAAQM,iBAAR,CAA0B,kBAA1B,CAArB;MACD;;MACD,IAAIJ,kBAAJ,EAAwB;QACtB,IAAIK,YAAY,GAAGL,kBAAkB,CAACM,KAAnB,CAAyB,eAAzB,KAA6C,EAAhE;QACA,IAAIC,uBAAuB,GAAGP,kBAAkB,CAACM,KAAnB,CAAyB,2BAAzB,KAAyD,EAAvF;QACA,IAAIE,KAAK,GAAGH,YAAY,CAAC,CAAD,CAAxB;QACA,IAAII,gBAAgB,GAAGF,uBAAuB,CAAC,CAAD,CAA9C;;QACA,IAAIC,KAAK,IAAIC,gBAAb,EAA+B;UAC7BZ,GAAG,GAAG,IAAIa,kBAAJ,CAAeF,KAAf,EAAsBC,gBAAtB,CAAN;QACD;MACF;IACF;;IACD,MAAMZ,GAAN;EACD,CA/BI,CAAP;AAgCD"}
@@ -1,13 +1,7 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
3
  exports.getWithPopup = getWithPopup;
6
4
 
7
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
-
9
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
10
-
11
5
  var _errors = require("../errors");
12
6
 
13
7
  var _util = require("../util");
@@ -30,7 +24,7 @@ var _util2 = require("./util");
30
24
  */
31
25
  function getWithPopup(sdk, options) {
32
26
  if (arguments.length > 2) {
33
- return _promise.default.reject(new _errors.AuthSdkError('As of version 3.0, "getWithPopup" takes only a single set of options'));
27
+ return Promise.reject(new _errors.AuthSdkError('As of version 3.0, "getWithPopup" takes only a single set of options'));
34
28
  } // some browsers (safari, firefox) block popup if it's initialed from an async process
35
29
  // here we create the popup window immediately after user interaction
36
30
  // then redirect to the /authorize endpoint when the requestUrl is available
@@ -38,7 +32,7 @@ function getWithPopup(sdk, options) {
38
32
 
39
33
  const popupWindow = (0, _util2.loadPopup)('/', options);
40
34
  options = (0, _util.clone)(options) || {};
41
- (0, _assign.default)(options, {
35
+ Object.assign(options, {
42
36
  display: 'popup',
43
37
  responseMode: 'okta_post_message',
44
38
  popupWindow
@@ -1 +1 @@
1
- {"version":3,"file":"getWithPopup.js","names":["getWithPopup","sdk","options","arguments","length","reject","AuthSdkError","popupWindow","loadPopup","clone","display","responseMode","getToken"],"sources":["../../../lib/oidc/getWithPopup.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOIDCInterface, TokenParams, TokenResponse } from '../types';\nimport { clone } from '../util';\nimport { getToken } from './getToken';\nimport { loadPopup } from './util';\n\nexport function getWithPopup(sdk: OktaAuthOIDCInterface, options: TokenParams): Promise<TokenResponse> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithPopup\" takes only a single set of options'));\n }\n\n // some browsers (safari, firefox) block popup if it's initialed from an async process\n // here we create the popup window immediately after user interaction\n // then redirect to the /authorize endpoint when the requestUrl is available\n const popupWindow = loadPopup('/', options);\n options = clone(options) || {};\n Object.assign(options, {\n display: 'popup',\n responseMode: 'okta_post_message',\n popupWindow\n });\n return getToken(sdk, options);\n}\n"],"mappings":";;;;;;;;;;AAYA;;AAEA;;AACA;;AACA;;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,SAASA,YAAT,CAAsBC,GAAtB,EAAkDC,OAAlD,EAAgG;EACrG,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAO,iBAAQC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,sEAAjB,CAAf,CAAP;EACD,CAHoG,CAKrG;EACA;EACA;;;EACA,MAAMC,WAAW,GAAG,IAAAC,gBAAA,EAAU,GAAV,EAAeN,OAAf,CAApB;EACAA,OAAO,GAAG,IAAAO,WAAA,EAAMP,OAAN,KAAkB,EAA5B;EACA,qBAAcA,OAAd,EAAuB;IACrBQ,OAAO,EAAE,OADY;IAErBC,YAAY,EAAE,mBAFO;IAGrBJ;EAHqB,CAAvB;EAKA,OAAO,IAAAK,kBAAA,EAASX,GAAT,EAAcC,OAAd,CAAP;AACD"}
1
+ {"version":3,"file":"getWithPopup.js","names":["getWithPopup","sdk","options","arguments","length","Promise","reject","AuthSdkError","popupWindow","loadPopup","clone","Object","assign","display","responseMode","getToken"],"sources":["../../../lib/oidc/getWithPopup.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOAuthInterface, TokenParams, TokenResponse } from './types';\nimport { clone } from '../util';\nimport { getToken } from './getToken';\nimport { loadPopup } from './util';\n\nexport function getWithPopup(sdk: OktaAuthOAuthInterface, options: TokenParams): Promise<TokenResponse> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithPopup\" takes only a single set of options'));\n }\n\n // some browsers (safari, firefox) block popup if it's initialed from an async process\n // here we create the popup window immediately after user interaction\n // then redirect to the /authorize endpoint when the requestUrl is available\n const popupWindow = loadPopup('/', options);\n options = clone(options) || {};\n Object.assign(options, {\n display: 'popup',\n responseMode: 'okta_post_message',\n popupWindow\n });\n return getToken(sdk, options);\n}\n"],"mappings":";;;;AAYA;;AAEA;;AACA;;AACA;;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,SAASA,YAAT,CAAsBC,GAAtB,EAAmDC,OAAnD,EAAiG;EACtG,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAOC,OAAO,CAACC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,sEAAjB,CAAf,CAAP;EACD,CAHqG,CAKtG;EACA;EACA;;;EACA,MAAMC,WAAW,GAAG,IAAAC,gBAAA,EAAU,GAAV,EAAeP,OAAf,CAApB;EACAA,OAAO,GAAG,IAAAQ,WAAA,EAAMR,OAAN,KAAkB,EAA5B;EACAS,MAAM,CAACC,MAAP,CAAcV,OAAd,EAAuB;IACrBW,OAAO,EAAE,OADY;IAErBC,YAAY,EAAE,mBAFO;IAGrBN;EAHqB,CAAvB;EAKA,OAAO,IAAAO,kBAAA,EAASd,GAAT,EAAcC,OAAd,CAAP;AACD"}
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
3
  exports.getWithRedirect = getWithRedirect;
6
4
 
7
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
-
9
5
  var _errors = require("../errors");
10
6
 
11
7
  var _util = require("../util");
@@ -30,16 +26,14 @@ var _authorize = require("./endpoints/authorize");
30
26
  */
31
27
  async function getWithRedirect(sdk, options) {
32
28
  if (arguments.length > 2) {
33
- return _promise.default.reject(new _errors.AuthSdkError('As of version 3.0, "getWithRedirect" takes only a single set of options'));
29
+ return Promise.reject(new _errors.AuthSdkError('As of version 3.0, "getWithRedirect" takes only a single set of options'));
34
30
  }
35
31
 
36
32
  options = (0, _util.clone)(options) || {};
37
33
  const tokenParams = await (0, _util2.prepareTokenParams)(sdk, options);
38
34
  const meta = (0, _util2.createOAuthMeta)(sdk, tokenParams);
39
35
  const requestUrl = meta.urls.authorizeUrl + (0, _authorize.buildAuthorizeParams)(tokenParams);
40
- sdk.transactionManager.save(meta, {
41
- oauth: true
42
- });
36
+ sdk.transactionManager.save(meta);
43
37
 
44
38
  sdk.token.getWithRedirect._setLocation(requestUrl);
45
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getWithRedirect.js","names":["getWithRedirect","sdk","options","arguments","length","reject","AuthSdkError","clone","tokenParams","prepareTokenParams","meta","createOAuthMeta","requestUrl","urls","authorizeUrl","buildAuthorizeParams","transactionManager","save","oauth","token","_setLocation"],"sources":["../../../lib/oidc/getWithRedirect.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOIDCInterface, TokenParams } from '../types';\nimport { clone } from '../util';\nimport { prepareTokenParams, createOAuthMeta } from './util';\nimport { buildAuthorizeParams } from './endpoints/authorize';\n\nexport async function getWithRedirect(sdk: OktaAuthOIDCInterface, options?: TokenParams): Promise<void> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithRedirect\" takes only a single set of options'));\n }\n\n options = clone(options) || {};\n\n const tokenParams = await prepareTokenParams(sdk, options);\n const meta = createOAuthMeta(sdk, tokenParams);\n const requestUrl = meta.urls.authorizeUrl + buildAuthorizeParams(tokenParams);\n sdk.transactionManager.save(meta, { oauth: true });\n sdk.token.getWithRedirect._setLocation(requestUrl);\n}\n"],"mappings":";;;;;;;;AAaA;;AAEA;;AACA;;AACA;;AAjBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,eAAeA,eAAf,CAA+BC,GAA/B,EAA2DC,OAA3D,EAAiG;EACtG,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAO,iBAAQC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,yEAAjB,CAAf,CAAP;EACD;;EAEDJ,OAAO,GAAG,IAAAK,WAAA,EAAML,OAAN,KAAkB,EAA5B;EAEA,MAAMM,WAAW,GAAG,MAAM,IAAAC,yBAAA,EAAmBR,GAAnB,EAAwBC,OAAxB,CAA1B;EACA,MAAMQ,IAAI,GAAG,IAAAC,sBAAA,EAAgBV,GAAhB,EAAqBO,WAArB,CAAb;EACA,MAAMI,UAAU,GAAGF,IAAI,CAACG,IAAL,CAAUC,YAAV,GAAyB,IAAAC,+BAAA,EAAqBP,WAArB,CAA5C;EACAP,GAAG,CAACe,kBAAJ,CAAuBC,IAAvB,CAA4BP,IAA5B,EAAkC;IAAEQ,KAAK,EAAE;EAAT,CAAlC;;EACAjB,GAAG,CAACkB,KAAJ,CAAUnB,eAAV,CAA0BoB,YAA1B,CAAuCR,UAAvC;AACD"}
1
+ {"version":3,"file":"getWithRedirect.js","names":["getWithRedirect","sdk","options","arguments","length","Promise","reject","AuthSdkError","clone","tokenParams","prepareTokenParams","meta","createOAuthMeta","requestUrl","urls","authorizeUrl","buildAuthorizeParams","transactionManager","save","token","_setLocation"],"sources":["../../../lib/oidc/getWithRedirect.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOAuthInterface, TokenParams } from './types';\nimport { clone } from '../util';\nimport { prepareTokenParams, createOAuthMeta } from './util';\nimport { buildAuthorizeParams } from './endpoints/authorize';\n\nexport async function getWithRedirect(sdk: OktaAuthOAuthInterface, options?: TokenParams): Promise<void> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithRedirect\" takes only a single set of options'));\n }\n\n options = clone(options) || {};\n\n const tokenParams = await prepareTokenParams(sdk, options);\n const meta = createOAuthMeta(sdk, tokenParams);\n const requestUrl = meta.urls.authorizeUrl + buildAuthorizeParams(tokenParams);\n sdk.transactionManager.save(meta);\n sdk.token.getWithRedirect._setLocation(requestUrl);\n}\n"],"mappings":";;;;AAaA;;AAEA;;AACA;;AACA;;AAjBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,eAAeA,eAAf,CAA+BC,GAA/B,EAA4DC,OAA5D,EAAkG;EACvG,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAOC,OAAO,CAACC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,yEAAjB,CAAf,CAAP;EACD;;EAEDL,OAAO,GAAG,IAAAM,WAAA,EAAMN,OAAN,KAAkB,EAA5B;EAEA,MAAMO,WAAW,GAAG,MAAM,IAAAC,yBAAA,EAAmBT,GAAnB,EAAwBC,OAAxB,CAA1B;EACA,MAAMS,IAAI,GAAG,IAAAC,sBAAA,EAAgBX,GAAhB,EAAqBQ,WAArB,CAAb;EACA,MAAMI,UAAU,GAAGF,IAAI,CAACG,IAAL,CAAUC,YAAV,GAAyB,IAAAC,+BAAA,EAAqBP,WAArB,CAA5C;EACAR,GAAG,CAACgB,kBAAJ,CAAuBC,IAAvB,CAA4BP,IAA5B;;EACAV,GAAG,CAACkB,KAAJ,CAAUnB,eAAV,CAA0BoB,YAA1B,CAAuCP,UAAvC;AACD"}
@@ -1,13 +1,7 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
3
  exports.getWithoutPrompt = getWithoutPrompt;
6
4
 
7
- var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
8
-
9
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
10
-
11
5
  var _errors = require("../errors");
12
6
 
13
7
  var _util = require("../util");
@@ -28,11 +22,11 @@ var _getToken = require("./getToken");
28
22
  */
29
23
  function getWithoutPrompt(sdk, options) {
30
24
  if (arguments.length > 2) {
31
- return _promise.default.reject(new _errors.AuthSdkError('As of version 3.0, "getWithoutPrompt" takes only a single set of options'));
25
+ return Promise.reject(new _errors.AuthSdkError('As of version 3.0, "getWithoutPrompt" takes only a single set of options'));
32
26
  }
33
27
 
34
28
  options = (0, _util.clone)(options) || {};
35
- (0, _assign.default)(options, {
29
+ Object.assign(options, {
36
30
  prompt: 'none',
37
31
  responseMode: 'okta_post_message',
38
32
  display: null
@@ -1 +1 @@
1
- {"version":3,"file":"getWithoutPrompt.js","names":["getWithoutPrompt","sdk","options","arguments","length","reject","AuthSdkError","clone","prompt","responseMode","display","getToken"],"sources":["../../../lib/oidc/getWithoutPrompt.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOIDCInterface, TokenParams, TokenResponse } from '../types';\nimport { clone } from '../util';\nimport { getToken } from './getToken';\n\nexport function getWithoutPrompt(sdk: OktaAuthOIDCInterface, options: TokenParams): Promise<TokenResponse> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithoutPrompt\" takes only a single set of options'));\n }\n \n options = clone(options) || {};\n Object.assign(options, {\n prompt: 'none',\n responseMode: 'okta_post_message',\n display: null\n });\n return getToken(sdk, options);\n}\n\n"],"mappings":";;;;;;;;;;AAYA;;AAEA;;AACA;;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,SAASA,gBAAT,CAA0BC,GAA1B,EAAsDC,OAAtD,EAAoG;EACzG,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAO,iBAAQC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,0EAAjB,CAAf,CAAP;EACD;;EAEDJ,OAAO,GAAG,IAAAK,WAAA,EAAML,OAAN,KAAkB,EAA5B;EACA,qBAAcA,OAAd,EAAuB;IACrBM,MAAM,EAAE,MADa;IAErBC,YAAY,EAAE,mBAFO;IAGrBC,OAAO,EAAE;EAHY,CAAvB;EAKA,OAAO,IAAAC,kBAAA,EAASV,GAAT,EAAcC,OAAd,CAAP;AACD"}
1
+ {"version":3,"file":"getWithoutPrompt.js","names":["getWithoutPrompt","sdk","options","arguments","length","Promise","reject","AuthSdkError","clone","Object","assign","prompt","responseMode","display","getToken"],"sources":["../../../lib/oidc/getWithoutPrompt.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { AuthSdkError } from '../errors';\nimport { OktaAuthOAuthInterface, TokenParams, TokenResponse } from './types';\nimport { clone } from '../util';\nimport { getToken } from './getToken';\n\nexport function getWithoutPrompt(sdk: OktaAuthOAuthInterface, options: TokenParams): Promise<TokenResponse> {\n if (arguments.length > 2) {\n return Promise.reject(new AuthSdkError('As of version 3.0, \"getWithoutPrompt\" takes only a single set of options'));\n }\n \n options = clone(options) || {};\n Object.assign(options, {\n prompt: 'none',\n responseMode: 'okta_post_message',\n display: null\n });\n return getToken(sdk, options);\n}\n\n"],"mappings":";;;;AAYA;;AAEA;;AACA;;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,SAASA,gBAAT,CAA0BC,GAA1B,EAAuDC,OAAvD,EAAqG;EAC1G,IAAIC,SAAS,CAACC,MAAV,GAAmB,CAAvB,EAA0B;IACxB,OAAOC,OAAO,CAACC,MAAR,CAAe,IAAIC,oBAAJ,CAAiB,0EAAjB,CAAf,CAAP;EACD;;EAEDL,OAAO,GAAG,IAAAM,WAAA,EAAMN,OAAN,KAAkB,EAA5B;EACAO,MAAM,CAACC,MAAP,CAAcR,OAAd,EAAuB;IACrBS,MAAM,EAAE,MADa;IAErBC,YAAY,EAAE,mBAFO;IAGrBC,OAAO,EAAE;EAHY,CAAvB;EAKA,OAAO,IAAAC,kBAAA,EAASb,GAAT,EAAcC,OAAd,CAAP;AACD"}
@@ -1,13 +1,7 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
3
  exports.handleOAuthResponse = handleOAuthResponse;
6
4
 
7
- var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
8
-
9
- var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
10
-
11
5
  var _util = require("../util");
12
6
 
13
7
  var _oauth = require("./util/oauth");
@@ -49,7 +43,7 @@ async function handleOAuthResponse(sdk, tokenParams, res, urls) {
49
43
  // `exchangeCodeForTokens` will call /token then call `handleOauthResponse` recursively with the result
50
44
 
51
45
  if (pkce && (res.code || res.interaction_code)) {
52
- return sdk.token.exchangeCodeForTokens((0, _assign.default)({}, tokenParams, {
46
+ return sdk.token.exchangeCodeForTokens(Object.assign({}, tokenParams, {
53
47
  authorizationCode: res.code,
54
48
  interactionCode: res.interaction_code
55
49
  }), urls);
@@ -136,12 +130,12 @@ async function handleOAuthResponse(sdk, tokenParams, res, urls) {
136
130
  } // Validate received tokens against requested response types
137
131
 
138
132
 
139
- if ((0, _indexOf.default)(responseType).call(responseType, 'token') !== -1 && !tokenDict.accessToken) {
133
+ if (responseType.indexOf('token') !== -1 && !tokenDict.accessToken) {
140
134
  // eslint-disable-next-line max-len
141
135
  throw new _errors.AuthSdkError('Unable to parse OAuth flow response: response type "token" was requested but "access_token" was not returned.');
142
136
  }
143
137
 
144
- if ((0, _indexOf.default)(responseType).call(responseType, 'id_token') !== -1 && !tokenDict.idToken) {
138
+ if (responseType.indexOf('id_token') !== -1 && !tokenDict.idToken) {
145
139
  // eslint-disable-next-line max-len
146
140
  throw new _errors.AuthSdkError('Unable to parse OAuth flow response: response type "id_token" was requested but "id_token" was not returned.');
147
141
  }
@@ -1 +1 @@
1
- {"version":3,"file":"handleOAuthResponse.js","names":["validateResponse","res","oauthParams","OAuthError","state","AuthSdkError","handleOAuthResponse","sdk","tokenParams","urls","pkce","options","code","interaction_code","token","exchangeCodeForTokens","authorizationCode","interactionCode","getDefaultTokenParams","getOAuthUrls","responseType","Array","isArray","scopes","scope","split","clone","clientId","tokenDict","expiresIn","expires_in","tokenType","token_type","accessToken","access_token","idToken","id_token","refreshToken","refresh_token","now","Math","floor","Date","accessJwt","decode","claims","payload","expiresAt","Number","authorizeUrl","userinfoUrl","tokenUrl","issuer","idJwt","idTokenObj","exp","iat","validationParams","nonce","ignoreSignature","undefined","verifyToken","tokens"],"sources":["../../../lib/oidc/handleOAuthResponse.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n/* eslint-disable complexity, max-statements */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { clone } from '../util';\nimport {\n getOAuthUrls,\n} from './util/oauth';\nimport { AuthSdkError, OAuthError } from '../errors';\nimport {\n OktaAuthOIDCInterface,\n TokenVerifyParams,\n IDToken,\n OAuthResponse,\n TokenParams,\n TokenResponse,\n CustomUrls,\n Tokens,\n} from '../types';\nimport { verifyToken } from './verifyToken';\nimport { getDefaultTokenParams } from './util';\n\nfunction validateResponse(res: OAuthResponse, oauthParams: TokenParams) {\n if (res['error'] && res['error_description']) {\n throw new OAuthError(res['error'], res['error_description']);\n }\n\n if (res.state !== oauthParams.state) {\n throw new AuthSdkError('OAuth flow response state doesn\\'t match request state');\n }\n}\n\nexport async function handleOAuthResponse(\n sdk: OktaAuthOIDCInterface,\n tokenParams: TokenParams,\n res: OAuthResponse,\n urls?: CustomUrls\n): Promise<TokenResponse> {\n var pkce = sdk.options.pkce !== false;\n\n // The result contains an authorization_code and PKCE is enabled \n // `exchangeCodeForTokens` will call /token then call `handleOauthResponse` recursively with the result\n if (pkce && (res.code || res.interaction_code)) {\n return sdk.token.exchangeCodeForTokens(Object.assign({}, tokenParams, {\n authorizationCode: res.code,\n interactionCode: res.interaction_code\n }), urls);\n }\n\n tokenParams = tokenParams || getDefaultTokenParams(sdk);\n urls = urls || getOAuthUrls(sdk, tokenParams);\n\n var responseType = tokenParams.responseType || [];\n if (!Array.isArray(responseType)) {\n responseType = [responseType];\n }\n\n var scopes;\n if (res.scope) {\n scopes = res.scope.split(' ');\n } else {\n scopes = clone(tokenParams.scopes);\n }\n var clientId = tokenParams.clientId || sdk.options.clientId;\n\n // Handling the result from implicit flow or PKCE token exchange\n validateResponse(res, tokenParams);\n\n var tokenDict = {} as Tokens;\n var expiresIn = res.expires_in;\n var tokenType = res.token_type;\n var accessToken = res.access_token;\n var idToken = res.id_token;\n var refreshToken = res.refresh_token;\n var now = Math.floor(Date.now()/1000);\n\n if (accessToken) {\n var accessJwt = sdk.token.decode(accessToken);\n tokenDict.accessToken = {\n accessToken: accessToken,\n claims: accessJwt.payload,\n expiresAt: Number(expiresIn) + now,\n tokenType: tokenType!,\n scopes: scopes,\n authorizeUrl: urls.authorizeUrl!,\n userinfoUrl: urls.userinfoUrl!\n };\n }\n\n if (refreshToken) {\n tokenDict.refreshToken = {\n refreshToken: refreshToken,\n // should not be used, this is the accessToken expire time\n // TODO: remove \"expiresAt\" in the next major version OKTA-407224\n expiresAt: Number(expiresIn) + now, \n scopes: scopes,\n tokenUrl: urls.tokenUrl!,\n authorizeUrl: urls.authorizeUrl!,\n issuer: urls.issuer!,\n };\n }\n\n if (idToken) {\n var idJwt = sdk.token.decode(idToken);\n var idTokenObj: IDToken = {\n idToken: idToken,\n claims: idJwt.payload,\n expiresAt: idJwt.payload.exp! - idJwt.payload.iat! + now, // adjusting expiresAt to be in local time\n scopes: scopes,\n authorizeUrl: urls.authorizeUrl!,\n issuer: urls.issuer!,\n clientId: clientId!\n };\n\n var validationParams: TokenVerifyParams = {\n clientId: clientId!,\n issuer: urls.issuer!,\n nonce: tokenParams.nonce,\n accessToken: accessToken\n };\n\n if (tokenParams.ignoreSignature !== undefined) {\n validationParams.ignoreSignature = tokenParams.ignoreSignature;\n }\n\n await verifyToken(sdk, idTokenObj, validationParams);\n tokenDict.idToken = idTokenObj;\n }\n\n // Validate received tokens against requested response types \n if (responseType.indexOf('token') !== -1 && !tokenDict.accessToken) {\n // eslint-disable-next-line max-len\n throw new AuthSdkError('Unable to parse OAuth flow response: response type \"token\" was requested but \"access_token\" was not returned.');\n }\n if (responseType.indexOf('id_token') !== -1 && !tokenDict.idToken) {\n // eslint-disable-next-line max-len\n throw new AuthSdkError('Unable to parse OAuth flow response: response type \"id_token\" was requested but \"id_token\" was not returned.');\n }\n\n return {\n tokens: tokenDict,\n state: res.state!,\n code: res.code\n };\n \n}"],"mappings":";;;;;;;;;;AAeA;;AACA;;AAGA;;AAWA;;AACA;;AA/BA;;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA,SAASA,gBAAT,CAA0BC,GAA1B,EAA8CC,WAA9C,EAAwE;EACtE,IAAID,GAAG,CAAC,OAAD,CAAH,IAAgBA,GAAG,CAAC,mBAAD,CAAvB,EAA8C;IAC5C,MAAM,IAAIE,kBAAJ,CAAeF,GAAG,CAAC,OAAD,CAAlB,EAA6BA,GAAG,CAAC,mBAAD,CAAhC,CAAN;EACD;;EAED,IAAIA,GAAG,CAACG,KAAJ,KAAcF,WAAW,CAACE,KAA9B,EAAqC;IACnC,MAAM,IAAIC,oBAAJ,CAAiB,wDAAjB,CAAN;EACD;AACF;;AAEM,eAAeC,mBAAf,CACLC,GADK,EAELC,WAFK,EAGLP,GAHK,EAILQ,IAJK,EAKmB;EACxB,IAAIC,IAAI,GAAGH,GAAG,CAACI,OAAJ,CAAYD,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DhB,MAAM,EAAEA,MAJgB;MAKxB0B,YAAY,EAAExC,IAAI,CAACwC,YALK;MAMxBG,MAAM,EAAE3C,IAAI,CAAC2C,MANW;MAOxBzB,QAAQ,EAAEA;IAPc,CAA1B;IAUA,IAAI8B,gBAAmC,GAAG;MACxC9B,QAAQ,EAAEA,QAD8B;MAExCyB,MAAM,EAAE3C,IAAI,CAAC2C,MAF2B;MAGxCM,KAAK,EAAElD,WAAW,CAACkD,KAHqB;MAIxCzB,WAAW,EAAEA;IAJ2B,CAA1C;;IAOA,IAAIzB,WAAW,CAACmD,eAAZ,KAAgCC,SAApC,EAA+C;MAC7CH,gBAAgB,CAACE,eAAjB,GAAmCnD,WAAW,CAACmD,eAA/C;IACD;;IAED,MAAM,IAAAE,wBAAA,EAAYtD,GAAZ,EAAiB+C,UAAjB,EAA6BG,gBAA7B,CAAN;IACA7B,SAAS,CAACO,OAAV,GAAoBmB,UAApB;EACD,CA1FuB,CA4FxB;;;EACA,IAAI,sBAAAlC,YAAY,MAAZ,CAAAA,YAAY,EAAS,OAAT,CAAZ,KAAkC,CAAC,CAAnC,IAAwC,CAACQ,SAAS,CAACK,WAAvD,EAAoE;IAClE;IACA,MAAM,IAAI5B,oBAAJ,CAAiB,+GAAjB,CAAN;EACD;;EACD,IAAI,sBAAAe,YAAY,MAAZ,CAAAA,YAAY,EAAS,UAAT,CAAZ,KAAqC,CAAC,CAAtC,IAA2C,CAACQ,SAAS,CAACO,OAA1D,EAAmE;IACjE;IACA,MAAM,IAAI9B,oBAAJ,CAAiB,8GAAjB,CAAN;EACD;;EAED,OAAO;IACLyD,MAAM,EAAElC,SADH;IAELxB,KAAK,EAAEH,GAAG,CAACG,KAFN;IAGLQ,IAAI,EAAEX,GAAG,CAACW;EAHL,CAAP;AAMD"}
1
+ {"version":3,"file":"handleOAuthResponse.js","names":["validateResponse","res","oauthParams","OAuthError","state","AuthSdkError","handleOAuthResponse","sdk","tokenParams","urls","pkce","options","code","interaction_code","token","exchangeCodeForTokens","Object","assign","authorizationCode","interactionCode","getDefaultTokenParams","getOAuthUrls","responseType","Array","isArray","scopes","scope","split","clone","clientId","tokenDict","expiresIn","expires_in","tokenType","token_type","accessToken","access_token","idToken","id_token","refreshToken","refresh_token","now","Math","floor","Date","accessJwt","decode","claims","payload","expiresAt","Number","authorizeUrl","userinfoUrl","tokenUrl","issuer","idJwt","idTokenObj","exp","iat","validationParams","nonce","ignoreSignature","undefined","verifyToken","indexOf","tokens"],"sources":["../../../lib/oidc/handleOAuthResponse.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\n/* eslint-disable complexity, max-statements */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { clone } from '../util';\nimport {\n getOAuthUrls,\n} from './util/oauth';\nimport { AuthSdkError, OAuthError } from '../errors';\nimport {\n OktaAuthOAuthInterface,\n TokenVerifyParams,\n IDToken,\n OAuthResponse,\n TokenParams,\n TokenResponse,\n CustomUrls,\n Tokens,\n} from './types';\nimport { verifyToken } from './verifyToken';\nimport { getDefaultTokenParams } from './util';\n\nfunction validateResponse(res: OAuthResponse, oauthParams: TokenParams) {\n if (res['error'] && res['error_description']) {\n throw new OAuthError(res['error'], res['error_description']);\n }\n\n if (res.state !== oauthParams.state) {\n throw new AuthSdkError('OAuth flow response state doesn\\'t match request state');\n }\n}\n\nexport async function handleOAuthResponse(\n sdk: OktaAuthOAuthInterface,\n tokenParams: TokenParams,\n res: OAuthResponse,\n urls?: CustomUrls\n): Promise<TokenResponse> {\n var pkce = sdk.options.pkce !== false;\n\n // The result contains an authorization_code and PKCE is enabled \n // `exchangeCodeForTokens` will call /token then call `handleOauthResponse` recursively with the result\n if (pkce && (res.code || res.interaction_code)) {\n return sdk.token.exchangeCodeForTokens(Object.assign({}, tokenParams, {\n authorizationCode: res.code,\n interactionCode: res.interaction_code\n }), urls);\n }\n\n tokenParams = tokenParams || getDefaultTokenParams(sdk);\n urls = urls || getOAuthUrls(sdk, tokenParams);\n\n var responseType = tokenParams.responseType || [];\n if (!Array.isArray(responseType)) {\n responseType = [responseType];\n }\n\n var scopes;\n if (res.scope) {\n scopes = res.scope.split(' ');\n } else {\n scopes = clone(tokenParams.scopes);\n }\n var clientId = tokenParams.clientId || sdk.options.clientId;\n\n // Handling the result from implicit flow or PKCE token exchange\n validateResponse(res, tokenParams);\n\n var tokenDict = {} as Tokens;\n var expiresIn = res.expires_in;\n var tokenType = res.token_type;\n var accessToken = res.access_token;\n var idToken = res.id_token;\n var refreshToken = res.refresh_token;\n var now = Math.floor(Date.now()/1000);\n\n if (accessToken) {\n var accessJwt = sdk.token.decode(accessToken);\n tokenDict.accessToken = {\n accessToken: accessToken,\n claims: accessJwt.payload,\n expiresAt: Number(expiresIn) + now,\n tokenType: tokenType!,\n scopes: scopes,\n authorizeUrl: urls.authorizeUrl!,\n userinfoUrl: urls.userinfoUrl!\n };\n }\n\n if (refreshToken) {\n tokenDict.refreshToken = {\n refreshToken: refreshToken,\n // should not be used, this is the accessToken expire time\n // TODO: remove \"expiresAt\" in the next major version OKTA-407224\n expiresAt: Number(expiresIn) + now, \n scopes: scopes,\n tokenUrl: urls.tokenUrl!,\n authorizeUrl: urls.authorizeUrl!,\n issuer: urls.issuer!,\n };\n }\n\n if (idToken) {\n var idJwt = sdk.token.decode(idToken);\n var idTokenObj: IDToken = {\n idToken: idToken,\n claims: idJwt.payload,\n expiresAt: idJwt.payload.exp! - idJwt.payload.iat! + now, // adjusting expiresAt to be in local time\n scopes: scopes,\n authorizeUrl: urls.authorizeUrl!,\n issuer: urls.issuer!,\n clientId: clientId!\n };\n\n var validationParams: TokenVerifyParams = {\n clientId: clientId!,\n issuer: urls.issuer!,\n nonce: tokenParams.nonce,\n accessToken: accessToken\n };\n\n if (tokenParams.ignoreSignature !== undefined) {\n validationParams.ignoreSignature = tokenParams.ignoreSignature;\n }\n\n await verifyToken(sdk, idTokenObj, validationParams);\n tokenDict.idToken = idTokenObj;\n }\n\n // Validate received tokens against requested response types \n if (responseType.indexOf('token') !== -1 && !tokenDict.accessToken) {\n // eslint-disable-next-line max-len\n throw new AuthSdkError('Unable to parse OAuth flow response: response type \"token\" was requested but \"access_token\" was not returned.');\n }\n if (responseType.indexOf('id_token') !== -1 && !tokenDict.idToken) {\n // eslint-disable-next-line max-len\n throw new AuthSdkError('Unable to parse OAuth flow response: response type \"id_token\" was requested but \"id_token\" was not returned.');\n }\n\n return {\n tokens: tokenDict,\n state: res.state!,\n code: res.code\n };\n \n}"],"mappings":";;;;AAeA;;AACA;;AAGA;;AAWA;;AACA;;AA/BA;;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA,SAASA,gBAAT,CAA0BC,GAA1B,EAA8CC,WAA9C,EAAwE;EACtE,IAAID,GAAG,CAAC,OAAD,CAAH,IAAgBA,GAAG,CAAC,mBAAD,CAAvB,EAA8C;IAC5C,MAAM,IAAIE,kBAAJ,CAAeF,GAAG,CAAC,OAAD,CAAlB,EAA6BA,GAAG,CAAC,mBAAD,CAAhC,CAAN;EACD;;EAED,IAAIA,GAAG,CAACG,KAAJ,KAAcF,WAAW,CAACE,KAA9B,EAAqC;IACnC,MAAM,IAAIC,oBAAJ,CAAiB,wDAAjB,CAAN;EACD;AACF;;AAEM,eAAeC,mBAAf,CACLC,GADK,EAELC,WAFK,EAGLP,GAHK,EAILQ,IAJK,EAKmB;EACxB,IAAIC,IAAI,GAAGH,GAAG,CAACI,OAAJ,CAAYD,IAAZ,KAAqB,KAAhC,CADwB,CAGxB;EACA;;EACA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