@okta/okta-auth-js 6.8.1 → 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.
- package/CHANGELOG.md +12 -0
- package/README.md +76 -41
- package/cjs/authn/AuthnTransactionImpl.js +44 -0
- package/cjs/authn/AuthnTransactionImpl.js.map +1 -0
- package/cjs/authn/api.js +105 -0
- package/cjs/authn/api.js.map +1 -0
- package/cjs/authn/factory.js +45 -0
- package/cjs/authn/factory.js.map +1 -0
- package/cjs/authn/index.js +41 -0
- package/cjs/authn/index.js.map +1 -0
- package/cjs/authn/mixin.js +82 -0
- package/cjs/authn/mixin.js.map +1 -0
- package/cjs/authn/types.js +2 -0
- package/cjs/authn/types.js.map +1 -0
- package/cjs/authn/util/flattenEmbedded.js +44 -0
- package/cjs/authn/util/flattenEmbedded.js.map +1 -0
- package/cjs/authn/util/link2fn.js +108 -0
- package/cjs/authn/util/link2fn.js.map +1 -0
- package/cjs/authn/util/links2fns.js +47 -0
- package/cjs/authn/util/links2fns.js.map +1 -0
- package/cjs/authn/util/poll.js +136 -0
- package/cjs/authn/util/poll.js.map +1 -0
- package/cjs/authn/util/stateToken.js +32 -0
- package/cjs/authn/util/stateToken.js.map +1 -0
- package/cjs/base/factory.js +47 -0
- package/cjs/base/factory.js.map +1 -0
- package/cjs/base/index.js +41 -0
- package/cjs/base/index.js.map +1 -0
- package/cjs/base/options.js +24 -0
- package/cjs/base/options.js.map +1 -0
- package/cjs/base/types.js +2 -0
- package/cjs/base/types.js.map +1 -0
- package/cjs/browser/browserStorage.js +12 -35
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +3 -9
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/clock.js +1 -5
- package/cjs/clock.js.map +1 -1
- package/cjs/constants.js +1 -7
- package/cjs/constants.js.map +1 -1
- package/cjs/core/AuthStateManager.js +225 -0
- package/cjs/core/AuthStateManager.js.map +1 -0
- package/cjs/core/ServiceManager/browser.js +157 -0
- package/cjs/core/ServiceManager/browser.js.map +1 -0
- package/cjs/core/ServiceManager/index.js +15 -0
- package/cjs/core/ServiceManager/index.js.map +1 -0
- package/cjs/core/ServiceManager/node.js +42 -0
- package/cjs/core/ServiceManager/node.js.map +1 -0
- package/cjs/core/factory.js +26 -0
- package/cjs/core/factory.js.map +1 -0
- package/cjs/core/index.js +93 -0
- package/cjs/core/index.js.map +1 -0
- package/cjs/core/mixin.js +78 -0
- package/cjs/core/mixin.js.map +1 -0
- package/cjs/core/options.js +29 -0
- package/cjs/core/options.js.map +1 -0
- package/cjs/core/storage.js +10 -0
- package/cjs/core/storage.js.map +1 -0
- package/cjs/{types → core/types}/AuthState.js +0 -0
- package/cjs/core/types/AuthState.js.map +1 -0
- package/cjs/{types → core/types}/Service.js +0 -0
- package/cjs/core/types/Service.js.map +1 -0
- package/cjs/{types → core/types}/api.js +0 -0
- package/cjs/core/types/api.js.map +1 -0
- package/cjs/core/types/index.js +41 -0
- package/cjs/core/types/index.js.map +1 -0
- package/cjs/crypto/base64.js +1 -7
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/index.js +17 -6
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/node.js +4 -10
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/crypto/oidcHash.js +1 -5
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/types.js +2 -0
- package/cjs/crypto/types.js.map +1 -0
- package/cjs/crypto/webcrypto.js +1 -3
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +1 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthPollStopError.js +1 -1
- package/cjs/errors/AuthSdkError.js +1 -1
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/errors/CustomError.js +1 -5
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js +1 -1
- package/cjs/errors/index.js +23 -1
- package/cjs/errors/index.js.map +1 -1
- package/cjs/errors/types.js +2 -0
- package/cjs/errors/types.js.map +1 -0
- package/cjs/exports/authn.js +55 -0
- package/cjs/exports/authn.js.map +1 -0
- package/cjs/exports/cdn/authn.js +11 -0
- package/cjs/exports/cdn/authn.js.map +1 -0
- package/cjs/exports/cdn/core.js +11 -0
- package/cjs/exports/cdn/core.js.map +1 -0
- package/cjs/exports/cdn/default.js +11 -0
- package/cjs/exports/cdn/default.js.map +1 -0
- package/cjs/exports/cdn/idx.js +11 -0
- package/cjs/exports/cdn/idx.js.map +1 -0
- package/cjs/exports/cdn/myaccount.js +11 -0
- package/cjs/exports/cdn/myaccount.js.map +1 -0
- package/cjs/exports/common.js +141 -0
- package/cjs/exports/common.js.map +1 -0
- package/cjs/exports/core.js +42 -0
- package/cjs/exports/core.js.map +1 -0
- package/cjs/exports/default.js +81 -0
- package/cjs/exports/default.js.map +1 -0
- package/cjs/exports/idx.js +50 -0
- package/cjs/exports/idx.js.map +1 -0
- package/cjs/exports/myaccount.js +54 -0
- package/cjs/exports/myaccount.js.map +1 -0
- package/cjs/fetch/fetchRequest.js +7 -25
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/OktaUserAgent.js +56 -0
- package/cjs/http/OktaUserAgent.js.map +1 -0
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js +54 -4
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/mixin.js +46 -0
- package/cjs/http/mixin.js.map +1 -0
- package/cjs/http/options.js +36 -0
- package/cjs/http/options.js.map +1 -0
- package/cjs/http/request.js +4 -10
- package/cjs/http/request.js.map +1 -1
- package/cjs/http/types.js +2 -0
- package/cjs/http/types.js.map +1 -0
- package/cjs/idx/IdxTransactionManager.js +85 -0
- package/cjs/idx/IdxTransactionManager.js.map +1 -0
- package/cjs/idx/authenticate.js +1 -1
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/index.js +8 -10
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/authenticator/util.js +1 -5
- package/cjs/idx/authenticator/util.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +1 -1
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/factory/OktaAuthIdx.js +14 -0
- package/cjs/idx/factory/OktaAuthIdx.js.map +1 -0
- package/cjs/idx/factory/api.js +91 -0
- package/cjs/idx/factory/api.js.map +1 -0
- package/cjs/idx/factory/index.js +28 -0
- package/cjs/idx/factory/index.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/index.js +6 -8
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +1 -5
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/idxState/index.js +3 -5
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/actionParser.js +2 -6
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js +5 -10
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js +23 -21
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js +4 -10
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js +2 -6
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/index.js +85 -3
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +7 -3
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +1 -3
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/mixin.js +28 -0
- package/cjs/idx/mixin.js.map +1 -0
- package/cjs/idx/options.js +32 -0
- package/cjs/idx/options.js.map +1 -0
- package/cjs/idx/poll.js +3 -13
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +4 -10
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +46 -69
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +7 -19
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +6 -56
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +10 -48
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +25 -51
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +10 -48
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +5 -17
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js +2 -2
- package/cjs/idx/remediators/ChallengePoll.js +3 -5
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js +2 -2
- package/cjs/idx/remediators/EnrollPoll.js +6 -16
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +12 -28
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +9 -25
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +5 -23
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/index.js +1 -3
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +11 -35
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +3 -5
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +3 -5
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +4 -6
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +5 -9
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js +2 -2
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +12 -41
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js +3 -5
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +20 -22
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +3 -13
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +10 -49
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/storage.js +89 -0
- package/cjs/idx/storage.js.map +1 -0
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/api.js +12 -0
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/index.js +28 -4
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/meta.js +2 -0
- package/cjs/idx/types/meta.js.map +1 -0
- package/cjs/idx/types/options.js.map +1 -1
- package/cjs/idx/types/storage.js +2 -0
- package/cjs/idx/types/storage.js.map +1 -0
- package/cjs/idx/unlockAccount.js +2 -6
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +17 -60
- package/cjs/idx/util.js.map +1 -1
- package/cjs/idx/webauthn.js +101 -0
- package/cjs/idx/webauthn.js.map +1 -0
- package/cjs/myaccount/api.js +3 -5
- package/cjs/myaccount/api.js.map +1 -1
- package/cjs/myaccount/factory.js +14 -0
- package/cjs/myaccount/factory.js.map +1 -0
- package/cjs/myaccount/index.js +28 -4
- package/cjs/myaccount/index.js.map +1 -1
- package/cjs/myaccount/mixin.js +23 -0
- package/cjs/myaccount/mixin.js.map +1 -0
- package/cjs/myaccount/request.js +3 -15
- package/cjs/myaccount/request.js.map +1 -1
- package/cjs/myaccount/transactions/Base.js +1 -5
- package/cjs/myaccount/transactions/Base.js.map +1 -1
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js +1 -1
- package/cjs/myaccount/transactions/EmailStatusTransaction.js +1 -1
- package/cjs/myaccount/transactions/EmailTransaction.js +1 -1
- package/cjs/myaccount/transactions/PhoneTransaction.js +1 -1
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +1 -1
- package/cjs/myaccount/transactions/ProfileTransaction.js +1 -1
- package/cjs/myaccount/transactions/index.js +1 -1
- package/cjs/myaccount/types.js.map +1 -1
- package/cjs/oidc/TokenManager.js +479 -0
- package/cjs/oidc/TokenManager.js.map +1 -0
- package/cjs/oidc/TransactionManager.js +107 -0
- package/cjs/oidc/TransactionManager.js.map +1 -0
- package/cjs/oidc/decodeToken.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +2 -8
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js +3 -5
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +3 -15
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js +3 -7
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +2 -10
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/factory/OktaAuthOAuth.js +23 -0
- package/cjs/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/cjs/oidc/factory/api.js +104 -0
- package/cjs/oidc/factory/api.js.map +1 -0
- package/cjs/oidc/factory/index.js +28 -0
- package/cjs/oidc/factory/index.js.map +1 -0
- package/cjs/oidc/getToken.js +5 -9
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js +4 -8
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +2 -8
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +2 -8
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js +2 -8
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +3 -9
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js +100 -4
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/mixin/browser.js +62 -0
- package/cjs/oidc/mixin/browser.js.map +1 -0
- package/cjs/oidc/mixin/index.js +342 -0
- package/cjs/oidc/mixin/index.js.map +1 -0
- package/cjs/oidc/mixin/node.js +44 -0
- package/cjs/oidc/mixin/node.js.map +1 -0
- package/cjs/oidc/options/OAuthOptionsConstructor.js +120 -0
- package/cjs/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/cjs/oidc/options/browser.js +6 -0
- package/cjs/oidc/options/browser.js.map +1 -0
- package/cjs/oidc/options/index.js +15 -0
- package/cjs/oidc/options/index.js.map +1 -0
- package/cjs/oidc/options/node.js +6 -0
- package/cjs/oidc/options/node.js.map +1 -0
- package/cjs/oidc/parseFromUrl.js +8 -11
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +1 -5
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +1 -5
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js +3 -7
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/storage.js +43 -0
- package/cjs/oidc/storage.js.map +1 -0
- package/cjs/{types → oidc/types}/JWT.js +0 -0
- package/cjs/oidc/types/JWT.js.map +1 -0
- package/cjs/{types → oidc/types}/Token.js +0 -0
- package/cjs/oidc/types/Token.js.map +1 -0
- package/cjs/{types → oidc/types}/TokenManager.js +0 -0
- package/cjs/oidc/types/TokenManager.js.map +1 -0
- package/cjs/oidc/types/Transaction.js +68 -0
- package/cjs/oidc/types/Transaction.js.map +1 -0
- package/cjs/oidc/types/TransactionManager.js +2 -0
- package/cjs/oidc/types/TransactionManager.js.map +1 -0
- package/cjs/{types → oidc/types}/UserClaims.js +0 -0
- package/cjs/oidc/types/UserClaims.js.map +1 -0
- package/cjs/oidc/types/api.js +2 -0
- package/cjs/oidc/types/api.js.map +1 -0
- package/cjs/oidc/types/index.js +145 -0
- package/cjs/oidc/types/index.js.map +1 -0
- package/cjs/oidc/types/meta.js +2 -0
- package/cjs/oidc/types/meta.js.map +1 -0
- package/cjs/oidc/types/options.js +2 -0
- package/cjs/oidc/types/options.js.map +1 -0
- package/cjs/oidc/types/proto.js +2 -0
- package/cjs/oidc/types/proto.js.map +1 -0
- package/cjs/oidc/types/storage.js +2 -0
- package/cjs/oidc/types/storage.js.map +1 -0
- package/cjs/oidc/util/browser.js +1 -5
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
- package/cjs/oidc/util/errors.js.map +1 -1
- package/cjs/oidc/util/index.js +12 -14
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +1 -5
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js +2 -4
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/pkce.js +3 -11
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +2 -4
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/refreshToken.js.map +1 -1
- package/cjs/oidc/util/sharedStorage.js +54 -0
- package/cjs/oidc/util/sharedStorage.js.map +1 -0
- package/cjs/oidc/util/validateClaims.js +1 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/util/validateToken.js +1 -1
- package/cjs/oidc/util/validateToken.js.map +1 -1
- package/cjs/oidc/verifyToken.js +3 -11
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -9
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +3 -3
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/services/LeaderElectionService.js +3 -5
- package/cjs/services/LeaderElectionService.js.map +1 -1
- package/cjs/services/SyncStorageService.js +26 -18
- package/cjs/services/SyncStorageService.js.map +1 -1
- package/cjs/services/index.js +3 -5
- package/cjs/services/index.js.map +1 -1
- package/cjs/session/api.js +88 -0
- package/cjs/session/api.js.map +1 -0
- package/cjs/session/factory.js +17 -0
- package/cjs/session/factory.js.map +1 -0
- package/cjs/session/index.js +54 -0
- package/cjs/session/index.js.map +1 -0
- package/cjs/session/mixin.js +32 -0
- package/cjs/session/mixin.js.map +1 -0
- package/cjs/session/types.js +2 -0
- package/cjs/session/types.js.map +1 -0
- package/cjs/storage/BaseStorageManager.js +102 -0
- package/cjs/storage/BaseStorageManager.js.map +1 -0
- package/cjs/storage/SavedObject.js +100 -0
- package/cjs/storage/SavedObject.js.map +1 -0
- package/cjs/storage/index.js +67 -0
- package/cjs/storage/index.js.map +1 -0
- package/cjs/storage/mixin.js +22 -0
- package/cjs/storage/mixin.js.map +1 -0
- package/cjs/storage/options/StorageOptionsConstructor.js +36 -0
- package/cjs/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/cjs/storage/options/browser.js +82 -0
- package/cjs/storage/options/browser.js.map +1 -0
- package/cjs/storage/options/node.js +43 -0
- package/cjs/storage/options/node.js.map +1 -0
- package/cjs/storage/types.js +2 -0
- package/cjs/storage/types.js.map +1 -0
- package/cjs/types/global.d.js +2 -0
- package/cjs/types/global.d.js.map +1 -0
- package/cjs/util/PromiseQueue.js +85 -0
- package/cjs/util/PromiseQueue.js.map +1 -0
- package/cjs/util/index.js +15 -17
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +2 -8
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js +6 -16
- package/cjs/util/object.js.map +1 -1
- package/dist/okta-auth-js.authn.min.analyzer.html +38 -0
- package/dist/okta-auth-js.authn.min.js +3 -0
- package/dist/{myaccount.umd.js.LICENSE.txt → okta-auth-js.authn.min.js.LICENSE.txt} +0 -0
- package/dist/okta-auth-js.authn.min.js.map +1 -0
- package/dist/okta-auth-js.core.min.analyzer.html +38 -0
- package/dist/okta-auth-js.core.min.js +3 -0
- package/dist/okta-auth-js.core.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.core.min.js.map +1 -0
- package/dist/okta-auth-js.idx.min.analyzer.html +38 -0
- package/dist/okta-auth-js.idx.min.js +3 -0
- package/dist/okta-auth-js.idx.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.idx.min.js.map +1 -0
- package/dist/okta-auth-js.min.analyzer.html +38 -0
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.myaccount.min.analyzer.html +38 -0
- package/dist/okta-auth-js.myaccount.min.js +3 -0
- package/dist/okta-auth-js.myaccount.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.myaccount.min.js.map +1 -0
- package/dist/okta-auth-js.polyfill.js +1 -1
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/esm/browser/authn/AuthnTransactionImpl.js +33 -0
- package/esm/browser/authn/AuthnTransactionImpl.js.map +1 -0
- package/esm/browser/authn/api.js +79 -0
- package/esm/browser/authn/api.js.map +1 -0
- package/esm/browser/authn/factory.js +37 -0
- package/esm/browser/authn/factory.js.map +1 -0
- package/esm/browser/authn/mixin.js +58 -0
- package/esm/browser/authn/mixin.js.map +1 -0
- package/esm/browser/authn/util/flattenEmbedded.js +44 -0
- package/esm/browser/authn/util/flattenEmbedded.js.map +1 -0
- package/esm/browser/authn/util/link2fn.js +103 -0
- package/esm/browser/authn/util/link2fn.js.map +1 -0
- package/esm/browser/authn/util/links2fns.js +45 -0
- package/esm/browser/authn/util/links2fns.js.map +1 -0
- package/esm/browser/authn/util/poll.js +120 -0
- package/esm/browser/authn/util/poll.js.map +1 -0
- package/esm/browser/authn/util/stateToken.js +26 -0
- package/esm/browser/authn/util/stateToken.js.map +1 -0
- package/esm/browser/base/factory.js +37 -0
- package/esm/browser/base/factory.js.map +1 -0
- package/esm/browser/base/options.js +22 -0
- package/esm/browser/base/options.js.map +1 -0
- package/esm/browser/browser/browserStorage.js +0 -9
- package/esm/browser/browser/browserStorage.js.map +1 -1
- package/esm/browser/browser/fingerprint.js +3 -2
- package/esm/browser/browser/fingerprint.js.map +1 -1
- package/esm/browser/constants.js +1 -4
- package/esm/browser/constants.js.map +1 -1
- package/esm/browser/core/AuthStateManager.js +162 -0
- package/esm/browser/core/AuthStateManager.js.map +1 -0
- package/esm/browser/core/ServiceManager/browser.js +115 -0
- package/esm/browser/core/ServiceManager/browser.js.map +1 -0
- package/esm/browser/core/factory.js +31 -0
- package/esm/browser/core/factory.js.map +1 -0
- package/esm/browser/core/mixin.js +70 -0
- package/esm/browser/core/mixin.js.map +1 -0
- package/esm/browser/core/options.js +30 -0
- package/esm/browser/core/options.js.map +1 -0
- package/esm/browser/core/storage.js +20 -0
- package/esm/browser/core/storage.js.map +1 -0
- package/esm/browser/errors/AuthApiError.js.map +1 -1
- package/esm/browser/errors/AuthSdkError.js.map +1 -1
- package/esm/browser/errors/index.js.map +1 -1
- package/esm/browser/exports/exports/authn.js +106 -0
- package/esm/browser/exports/exports/authn.js.map +1 -0
- package/esm/browser/exports/exports/core.js +102 -0
- package/esm/browser/exports/exports/core.js.map +1 -0
- package/esm/browser/exports/exports/default.js +141 -0
- package/esm/browser/exports/exports/default.js.map +1 -0
- package/esm/browser/exports/exports/idx.js +122 -0
- package/esm/browser/exports/exports/idx.js.map +1 -0
- package/esm/browser/exports/exports/myaccount.js +115 -0
- package/esm/browser/exports/exports/myaccount.js.map +1 -0
- package/esm/browser/fetch/fetchRequest.js.map +1 -1
- package/esm/browser/http/OktaUserAgent.js +39 -0
- package/esm/browser/http/OktaUserAgent.js.map +1 -0
- package/esm/browser/http/headers.js.map +1 -1
- package/esm/browser/http/mixin.js +46 -0
- package/esm/browser/http/mixin.js.map +1 -0
- package/esm/browser/http/options.js +31 -0
- package/esm/browser/http/options.js.map +1 -0
- package/esm/browser/http/request.js.map +1 -1
- package/esm/browser/idx/IdxTransactionManager.js +72 -0
- package/esm/browser/idx/IdxTransactionManager.js.map +1 -0
- package/esm/browser/idx/authenticate.js +0 -1
- package/esm/browser/idx/authenticate.js.map +1 -1
- package/esm/browser/idx/cancel.js.map +1 -1
- package/esm/browser/idx/emailVerify.js.map +1 -1
- package/esm/browser/idx/factory/OktaAuthIdx.js +23 -0
- package/esm/browser/idx/factory/OktaAuthIdx.js.map +1 -0
- package/esm/browser/idx/factory/api.js +73 -0
- package/esm/browser/idx/factory/api.js.map +1 -0
- package/esm/browser/idx/flow/FlowSpecification.js.map +1 -1
- package/esm/browser/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/esm/browser/idx/idxState/index.js.map +1 -1
- package/esm/browser/idx/idxState/v1/generateIdxAction.js +5 -2
- package/esm/browser/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/browser/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/esm/browser/idx/idxState/v1/remediationParser.js.map +1 -1
- package/esm/browser/idx/interact.js +6 -5
- package/esm/browser/idx/interact.js.map +1 -1
- package/esm/browser/idx/introspect.js +4 -3
- package/esm/browser/idx/introspect.js.map +1 -1
- package/esm/browser/idx/mixin.js +29 -0
- package/esm/browser/idx/mixin.js.map +1 -0
- package/esm/browser/idx/options.js +29 -0
- package/esm/browser/idx/options.js.map +1 -0
- package/esm/browser/idx/poll.js.map +1 -1
- package/esm/browser/idx/proceed.js.map +1 -1
- package/esm/browser/idx/recoverPassword.js.map +1 -1
- package/esm/browser/idx/register.js +2 -5
- package/esm/browser/idx/register.js.map +1 -1
- package/esm/browser/idx/remediate.js +24 -36
- package/esm/browser/idx/remediate.js.map +1 -1
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js +0 -29
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js +0 -10
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/esm/browser/idx/remediators/Base/Remediator.js.map +1 -1
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js +0 -10
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollPoll.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollProfile.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js +1 -9
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/esm/browser/idx/run.js +5 -26
- package/esm/browser/idx/run.js.map +1 -1
- package/esm/browser/idx/startTransaction.js.map +1 -1
- package/esm/browser/idx/storage.js +77 -0
- package/esm/browser/idx/storage.js.map +1 -0
- package/esm/browser/idx/transactionMeta.js +3 -2
- package/esm/browser/idx/transactionMeta.js.map +1 -1
- package/esm/browser/idx/types/api.js.map +1 -1
- package/esm/browser/idx/types/idx-js.js +1 -4
- package/esm/browser/idx/types/idx-js.js.map +1 -1
- package/esm/browser/idx/unlockAccount.js +0 -1
- package/esm/browser/idx/unlockAccount.js.map +1 -1
- package/esm/browser/idx/util.js +2 -8
- package/esm/browser/idx/util.js.map +1 -1
- package/esm/browser/idx/webauthn.js +79 -0
- package/esm/browser/idx/webauthn.js.map +1 -0
- package/esm/browser/myaccount/api.js +16 -0
- package/esm/browser/myaccount/api.js.map +1 -0
- package/esm/browser/myaccount/factory.js +23 -0
- package/esm/browser/myaccount/factory.js.map +1 -0
- package/esm/browser/myaccount/mixin.js +30 -0
- package/esm/browser/myaccount/mixin.js.map +1 -0
- package/esm/browser/myaccount/request.js +4 -1
- package/esm/browser/myaccount/request.js.map +1 -1
- package/esm/browser/myaccount/transactions/Base.js.map +1 -1
- package/esm/browser/myaccount/types.js +4 -0
- package/esm/browser/myaccount/types.js.map +1 -1
- package/esm/browser/oidc/TokenManager.js +384 -0
- package/esm/browser/oidc/TokenManager.js.map +1 -0
- package/esm/browser/oidc/TransactionManager.js +76 -0
- package/esm/browser/oidc/TransactionManager.js.map +1 -0
- package/esm/browser/oidc/decodeToken.js.map +1 -1
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -1
- package/esm/browser/oidc/endpoints/token.js +3 -0
- package/esm/browser/oidc/endpoints/token.js.map +1 -1
- package/esm/browser/oidc/endpoints/well-known.js +5 -2
- package/esm/browser/oidc/endpoints/well-known.js.map +1 -1
- package/esm/browser/oidc/exchangeCodeForTokens.js +3 -2
- package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/browser/oidc/factory/OktaAuthOAuth.js +29 -0
- package/esm/browser/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/esm/browser/oidc/factory/api.js +89 -0
- package/esm/browser/oidc/factory/api.js.map +1 -0
- package/esm/browser/oidc/getToken.js +0 -2
- package/esm/browser/oidc/getToken.js.map +1 -1
- package/esm/browser/oidc/getUserInfo.js +4 -3
- package/esm/browser/oidc/getUserInfo.js.map +1 -1
- package/esm/browser/oidc/getWithPopup.js +3 -2
- package/esm/browser/oidc/getWithPopup.js.map +1 -1
- package/esm/browser/oidc/getWithRedirect.js +1 -3
- package/esm/browser/oidc/getWithRedirect.js.map +1 -1
- package/esm/browser/oidc/getWithoutPrompt.js.map +1 -1
- package/esm/browser/oidc/handleOAuthResponse.js +3 -2
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/browser/oidc/mixin/browser.js +52 -0
- package/esm/browser/oidc/mixin/browser.js.map +1 -0
- package/esm/browser/oidc/mixin/index.js +247 -0
- package/esm/browser/oidc/mixin/index.js.map +1 -0
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js +85 -0
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/esm/browser/oidc/options/browser.js +16 -0
- package/esm/browser/oidc/options/browser.js.map +1 -0
- package/esm/browser/oidc/parseFromUrl.js +7 -5
- package/esm/browser/oidc/parseFromUrl.js.map +1 -1
- package/esm/browser/oidc/renewToken.js +1 -3
- package/esm/browser/oidc/renewToken.js.map +1 -1
- package/esm/browser/oidc/renewTokens.js +3 -2
- package/esm/browser/oidc/renewTokens.js.map +1 -1
- package/esm/browser/oidc/renewTokensWithRefresh.js.map +1 -1
- package/esm/browser/oidc/revokeToken.js +6 -3
- package/esm/browser/oidc/revokeToken.js.map +1 -1
- package/esm/browser/oidc/storage.js +49 -0
- package/esm/browser/oidc/storage.js.map +1 -0
- package/esm/browser/{types → oidc/types}/Token.js +0 -0
- package/esm/browser/oidc/types/Token.js.map +1 -0
- package/esm/browser/{types → oidc/types}/TokenManager.js +0 -0
- package/esm/browser/oidc/types/TokenManager.js.map +1 -0
- package/esm/browser/{types → oidc/types}/Transaction.js +0 -0
- package/esm/browser/oidc/types/Transaction.js.map +1 -0
- package/esm/browser/oidc/util/browser.js.map +1 -1
- package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/browser/oidc/util/errors.js.map +1 -1
- package/esm/browser/oidc/util/loginRedirect.js.map +1 -1
- package/esm/browser/oidc/util/oauth.js.map +1 -1
- package/esm/browser/oidc/util/oauthMeta.js.map +1 -1
- package/esm/browser/oidc/util/prepareTokenParams.js.map +1 -1
- package/esm/browser/oidc/util/refreshToken.js.map +1 -1
- package/esm/browser/oidc/util/sharedStorage.js +54 -0
- package/esm/browser/oidc/util/sharedStorage.js.map +1 -0
- package/esm/browser/oidc/util/validateClaims.js.map +1 -1
- package/esm/browser/oidc/util/validateToken.js +1 -3
- package/esm/browser/oidc/util/validateToken.js.map +1 -1
- package/esm/browser/oidc/verifyToken.js +0 -2
- package/esm/browser/oidc/verifyToken.js.map +1 -1
- package/esm/browser/package.json +5 -0
- package/esm/browser/services/AutoRenewService.js +1 -3
- package/esm/browser/services/AutoRenewService.js.map +1 -1
- package/esm/browser/services/LeaderElectionService.js.map +1 -1
- package/esm/browser/services/SyncStorageService.js +18 -13
- package/esm/browser/services/SyncStorageService.js.map +1 -1
- package/esm/browser/session/api.js +69 -0
- package/esm/browser/session/api.js.map +1 -0
- package/esm/browser/session/factory.js +27 -0
- package/esm/browser/session/factory.js.map +1 -0
- package/esm/browser/session/mixin.js +37 -0
- package/esm/browser/session/mixin.js.map +1 -0
- package/esm/browser/storage/BaseStorageManager.js +69 -0
- package/esm/browser/storage/BaseStorageManager.js.map +1 -0
- package/esm/browser/storage/SavedObject.js +76 -0
- package/esm/browser/storage/SavedObject.js.map +1 -0
- package/esm/browser/storage/mixin.js +26 -0
- package/esm/browser/storage/mixin.js.map +1 -0
- package/esm/browser/storage/options/StorageOptionsConstructor.js +31 -0
- package/esm/browser/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/esm/browser/storage/options/browser.js +76 -0
- package/esm/browser/storage/options/browser.js.map +1 -0
- package/esm/browser/util/PromiseQueue.js +65 -0
- package/esm/browser/util/PromiseQueue.js.map +1 -0
- package/esm/node/authn/AuthnTransactionImpl.js +33 -0
- package/esm/node/authn/AuthnTransactionImpl.js.map +1 -0
- package/esm/node/authn/api.js +80 -0
- package/esm/node/authn/api.js.map +1 -0
- package/esm/node/authn/factory.js +37 -0
- package/esm/node/authn/factory.js.map +1 -0
- package/esm/node/authn/mixin.js +58 -0
- package/esm/node/authn/mixin.js.map +1 -0
- package/esm/node/authn/util/flattenEmbedded.js +44 -0
- package/esm/node/authn/util/flattenEmbedded.js.map +1 -0
- package/esm/node/authn/util/link2fn.js +104 -0
- package/esm/node/authn/util/link2fn.js.map +1 -0
- package/esm/node/authn/util/links2fns.js +45 -0
- package/esm/node/authn/util/links2fns.js.map +1 -0
- package/esm/node/authn/util/poll.js +121 -0
- package/esm/node/authn/util/poll.js.map +1 -0
- package/esm/node/authn/util/stateToken.js +26 -0
- package/esm/node/authn/util/stateToken.js.map +1 -0
- package/esm/node/base/factory.js +37 -0
- package/esm/node/base/factory.js.map +1 -0
- package/esm/node/base/options.js +22 -0
- package/esm/node/base/options.js.map +1 -0
- package/esm/node/browser/fingerprint.js +4 -3
- package/esm/node/browser/fingerprint.js.map +1 -1
- package/esm/node/constants.js +1 -4
- package/esm/node/constants.js.map +1 -1
- package/esm/node/core/AuthStateManager.js +163 -0
- package/esm/node/core/AuthStateManager.js.map +1 -0
- package/esm/node/core/ServiceManager/node.js +34 -0
- package/esm/node/core/ServiceManager/node.js.map +1 -0
- package/esm/node/core/factory.js +31 -0
- package/esm/node/core/factory.js.map +1 -0
- package/esm/node/core/mixin.js +70 -0
- package/esm/node/core/mixin.js.map +1 -0
- package/esm/node/core/options.js +31 -0
- package/esm/node/core/options.js.map +1 -0
- package/esm/node/core/storage.js +20 -0
- package/esm/node/core/storage.js.map +1 -0
- package/esm/node/errors/AuthApiError.js.map +1 -1
- package/esm/node/errors/AuthSdkError.js.map +1 -1
- package/esm/node/errors/index.js.map +1 -1
- package/esm/node/exports/exports/authn.js +106 -0
- package/esm/node/exports/exports/authn.js.map +1 -0
- package/esm/node/exports/exports/core.js +102 -0
- package/esm/node/exports/exports/core.js.map +1 -0
- package/esm/node/exports/exports/default.js +141 -0
- package/esm/node/exports/exports/default.js.map +1 -0
- package/esm/node/exports/exports/idx.js +122 -0
- package/esm/node/exports/exports/idx.js.map +1 -0
- package/esm/node/exports/exports/myaccount.js +115 -0
- package/esm/node/exports/exports/myaccount.js.map +1 -0
- package/esm/node/fetch/fetchRequest.js.map +1 -1
- package/esm/node/http/OktaUserAgent.js +39 -0
- package/esm/node/http/OktaUserAgent.js.map +1 -0
- package/esm/node/http/headers.js.map +1 -1
- package/esm/node/http/mixin.js +46 -0
- package/esm/node/http/mixin.js.map +1 -0
- package/esm/node/http/options.js +32 -0
- package/esm/node/http/options.js.map +1 -0
- package/esm/node/http/request.js.map +1 -1
- package/esm/node/idx/IdxTransactionManager.js +72 -0
- package/esm/node/idx/IdxTransactionManager.js.map +1 -0
- package/esm/node/idx/authenticate.js +0 -1
- package/esm/node/idx/authenticate.js.map +1 -1
- package/esm/node/idx/cancel.js.map +1 -1
- package/esm/node/idx/emailVerify.js.map +1 -1
- package/esm/node/idx/factory/OktaAuthIdx.js +23 -0
- package/esm/node/idx/factory/OktaAuthIdx.js.map +1 -0
- package/esm/node/idx/factory/api.js +74 -0
- package/esm/node/idx/factory/api.js.map +1 -0
- package/esm/node/idx/flow/FlowSpecification.js.map +1 -1
- package/esm/node/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/esm/node/idx/idxState/index.js.map +1 -1
- package/esm/node/idx/idxState/v1/generateIdxAction.js +6 -2
- package/esm/node/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/node/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/esm/node/idx/idxState/v1/remediationParser.js.map +1 -1
- package/esm/node/idx/interact.js +7 -6
- package/esm/node/idx/interact.js.map +1 -1
- package/esm/node/idx/introspect.js +5 -4
- package/esm/node/idx/introspect.js.map +1 -1
- package/esm/node/idx/mixin.js +29 -0
- package/esm/node/idx/mixin.js.map +1 -0
- package/esm/node/idx/options.js +29 -0
- package/esm/node/idx/options.js.map +1 -0
- package/esm/node/idx/poll.js.map +1 -1
- package/esm/node/idx/proceed.js.map +1 -1
- package/esm/node/idx/recoverPassword.js.map +1 -1
- package/esm/node/idx/register.js +2 -5
- package/esm/node/idx/register.js.map +1 -1
- package/esm/node/idx/remediate.js +24 -36
- package/esm/node/idx/remediate.js.map +1 -1
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js +0 -29
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/esm/node/idx/remediators/Base/AuthenticatorData.js +0 -10
- package/esm/node/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/esm/node/idx/remediators/Base/Remediator.js.map +1 -1
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js +0 -10
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/esm/node/idx/remediators/EnrollPoll.js.map +1 -1
- package/esm/node/idx/remediators/EnrollProfile.js.map +1 -1
- package/esm/node/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js +1 -9
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/esm/node/idx/run.js +5 -26
- package/esm/node/idx/run.js.map +1 -1
- package/esm/node/idx/startTransaction.js.map +1 -1
- package/esm/node/idx/storage.js +77 -0
- package/esm/node/idx/storage.js.map +1 -0
- package/esm/node/idx/transactionMeta.js +3 -2
- package/esm/node/idx/transactionMeta.js.map +1 -1
- package/esm/node/idx/types/api.js.map +1 -1
- package/esm/node/idx/types/idx-js.js +1 -4
- package/esm/node/idx/types/idx-js.js.map +1 -1
- package/esm/node/idx/unlockAccount.js +0 -1
- package/esm/node/idx/unlockAccount.js.map +1 -1
- package/esm/node/idx/util.js +2 -8
- package/esm/node/idx/util.js.map +1 -1
- package/esm/node/idx/webauthn.js +79 -0
- package/esm/node/idx/webauthn.js.map +1 -0
- package/esm/node/myaccount/api.js +16 -0
- package/esm/node/myaccount/api.js.map +1 -0
- package/esm/node/myaccount/factory.js +23 -0
- package/esm/node/myaccount/factory.js.map +1 -0
- package/esm/node/myaccount/mixin.js +30 -0
- package/esm/node/myaccount/mixin.js.map +1 -0
- package/esm/node/myaccount/request.js +5 -1
- package/esm/node/myaccount/request.js.map +1 -1
- package/esm/node/myaccount/transactions/Base.js.map +1 -1
- package/esm/node/myaccount/types.js +5 -0
- package/esm/node/myaccount/types.js.map +1 -1
- package/esm/node/oidc/TokenManager.js +385 -0
- package/esm/node/oidc/TokenManager.js.map +1 -0
- package/esm/node/oidc/TransactionManager.js +76 -0
- package/esm/node/oidc/TransactionManager.js.map +1 -0
- package/esm/node/oidc/decodeToken.js.map +1 -1
- package/esm/node/oidc/endpoints/authorize.js.map +1 -1
- package/esm/node/oidc/endpoints/token.js +4 -0
- package/esm/node/oidc/endpoints/token.js.map +1 -1
- package/esm/node/oidc/endpoints/well-known.js +6 -2
- package/esm/node/oidc/endpoints/well-known.js.map +1 -1
- package/esm/node/oidc/exchangeCodeForTokens.js +3 -2
- package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/node/oidc/factory/OktaAuthOAuth.js +29 -0
- package/esm/node/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/esm/node/oidc/factory/api.js +90 -0
- package/esm/node/oidc/factory/api.js.map +1 -0
- package/esm/node/oidc/getToken.js +0 -2
- package/esm/node/oidc/getToken.js.map +1 -1
- package/esm/node/oidc/getUserInfo.js +5 -3
- package/esm/node/oidc/getUserInfo.js.map +1 -1
- package/esm/node/oidc/getWithPopup.js +3 -2
- package/esm/node/oidc/getWithPopup.js.map +1 -1
- package/esm/node/oidc/getWithRedirect.js +1 -3
- package/esm/node/oidc/getWithRedirect.js.map +1 -1
- package/esm/node/oidc/getWithoutPrompt.js.map +1 -1
- package/esm/node/oidc/handleOAuthResponse.js +3 -2
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/node/oidc/mixin/index.js +247 -0
- package/esm/node/oidc/mixin/index.js.map +1 -0
- package/esm/node/oidc/mixin/node.js +43 -0
- package/esm/node/oidc/mixin/node.js.map +1 -0
- package/esm/node/oidc/options/OAuthOptionsConstructor.js +85 -0
- package/esm/node/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/esm/node/oidc/options/node.js +16 -0
- package/esm/node/oidc/options/node.js.map +1 -0
- package/esm/node/oidc/parseFromUrl.js +7 -5
- package/esm/node/oidc/parseFromUrl.js.map +1 -1
- package/esm/node/oidc/renewToken.js +1 -3
- package/esm/node/oidc/renewToken.js.map +1 -1
- package/esm/node/oidc/renewTokens.js +3 -2
- package/esm/node/oidc/renewTokens.js.map +1 -1
- package/esm/node/oidc/renewTokensWithRefresh.js.map +1 -1
- package/esm/node/oidc/revokeToken.js +6 -3
- package/esm/node/oidc/revokeToken.js.map +1 -1
- package/esm/node/oidc/storage.js +50 -0
- package/esm/node/oidc/storage.js.map +1 -0
- package/esm/node/{types → oidc/types}/Token.js +0 -0
- package/esm/node/oidc/types/Token.js.map +1 -0
- package/esm/node/{types → oidc/types}/TokenManager.js +0 -0
- package/esm/node/oidc/types/TokenManager.js.map +1 -0
- package/esm/node/{types → oidc/types}/Transaction.js +0 -0
- package/esm/node/oidc/types/Transaction.js.map +1 -0
- package/esm/node/oidc/util/browser.js.map +1 -1
- package/esm/node/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/node/oidc/util/errors.js.map +1 -1
- package/esm/node/oidc/util/loginRedirect.js.map +1 -1
- package/esm/node/oidc/util/oauth.js.map +1 -1
- package/esm/node/oidc/util/oauthMeta.js.map +1 -1
- package/esm/node/oidc/util/prepareTokenParams.js.map +1 -1
- package/esm/node/oidc/util/refreshToken.js.map +1 -1
- package/esm/node/oidc/util/sharedStorage.js +54 -0
- package/esm/node/oidc/util/sharedStorage.js.map +1 -0
- package/esm/node/oidc/util/validateClaims.js.map +1 -1
- package/esm/node/oidc/util/validateToken.js +1 -3
- package/esm/node/oidc/util/validateToken.js.map +1 -1
- package/esm/node/oidc/verifyToken.js +0 -2
- package/esm/node/oidc/verifyToken.js.map +1 -1
- package/esm/node/package.json +5 -0
- package/esm/node/server/serverStorage.js +0 -4
- package/esm/node/server/serverStorage.js.map +1 -1
- package/esm/node/session/api.js +70 -0
- package/esm/node/session/api.js.map +1 -0
- package/esm/node/session/factory.js +27 -0
- package/esm/node/session/factory.js.map +1 -0
- package/esm/node/session/mixin.js +37 -0
- package/esm/node/session/mixin.js.map +1 -0
- package/esm/node/storage/BaseStorageManager.js +69 -0
- package/esm/node/storage/BaseStorageManager.js.map +1 -0
- package/esm/node/storage/SavedObject.js +76 -0
- package/esm/node/storage/SavedObject.js.map +1 -0
- package/esm/node/storage/mixin.js +26 -0
- package/esm/node/storage/mixin.js.map +1 -0
- package/esm/node/storage/options/StorageOptionsConstructor.js +31 -0
- package/esm/node/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/esm/node/storage/options/node.js +40 -0
- package/esm/node/storage/options/node.js.map +1 -0
- package/esm/node/util/PromiseQueue.js +65 -0
- package/esm/node/util/PromiseQueue.js.map +1 -0
- package/package.json +71 -28
- package/types/lib/authn/AuthnTransactionImpl.d.ts +41 -0
- package/types/lib/authn/api.d.ts +23 -0
- package/types/lib/authn/factory.d.ts +15 -0
- package/types/lib/authn/index.d.ts +3 -0
- package/types/lib/authn/mixin.d.ts +16 -0
- package/types/lib/authn/types.d.ts +101 -0
- package/types/lib/authn/util/flattenEmbedded.d.ts +3 -0
- package/types/lib/authn/util/link2fn.d.ts +3 -0
- package/types/lib/authn/util/links2fns.d.ts +3 -0
- package/types/lib/authn/util/poll.d.ts +21 -0
- package/types/lib/authn/util/stateToken.d.ts +15 -0
- package/types/lib/base/factory.d.ts +2 -0
- package/types/lib/base/index.d.ts +3 -0
- package/types/lib/base/options.d.ts +16 -0
- package/types/lib/base/types.d.ts +43 -0
- package/types/lib/browser/browserStorage.d.ts +33 -0
- package/types/lib/browser/fingerprint.d.ts +14 -0
- package/{lib → types/lib}/clock.d.ts +0 -0
- package/types/lib/constants.d.ts +30 -0
- package/types/lib/core/AuthStateManager.d.ts +33 -0
- package/types/lib/core/ServiceManager/browser.d.ts +32 -0
- package/{lib/crypto/webcrypto.d.ts → types/lib/core/ServiceManager/index.d.ts} +0 -0
- package/types/lib/core/ServiceManager/node.d.ts +23 -0
- package/types/lib/core/factory.d.ts +5 -0
- package/types/lib/core/index.d.ts +7 -0
- package/types/lib/core/mixin.d.ts +4 -0
- package/types/lib/core/options.d.ts +50 -0
- package/types/lib/core/storage.d.ts +15 -0
- package/types/lib/core/types/AuthState.d.ts +33 -0
- package/types/lib/core/types/Service.d.ts +27 -0
- package/types/lib/core/types/api.d.ts +15 -0
- package/types/lib/core/types/index.d.ts +3 -0
- package/{lib → types/lib}/crypto/base64.d.ts +0 -0
- package/{lib → types/lib}/crypto/browser.d.ts +0 -0
- package/types/lib/crypto/index.d.ts +16 -0
- package/{lib → types/lib}/crypto/node.d.ts +0 -0
- package/{lib → types/lib}/crypto/oidcHash.d.ts +0 -0
- package/types/lib/crypto/types.d.ts +4 -0
- package/{lib → types/lib}/crypto/verifyToken.d.ts +0 -0
- package/types/lib/crypto/webcrypto.d.ts +12 -0
- package/types/lib/errors/AuthApiError.d.ts +24 -0
- package/{lib → types/lib}/errors/AuthPollStopError.d.ts +0 -0
- package/types/lib/errors/AuthSdkError.d.ts +22 -0
- package/{lib → types/lib}/errors/CustomError.d.ts +0 -0
- package/{lib → types/lib}/errors/OAuthError.d.ts +0 -0
- package/types/lib/errors/index.d.ts +19 -0
- package/types/lib/errors/types.d.ts +14 -0
- package/types/lib/exports/authn.d.ts +11 -0
- package/types/lib/exports/cdn/authn.d.ts +2 -0
- package/types/lib/exports/cdn/core.d.ts +2 -0
- package/types/lib/exports/cdn/default.d.ts +2 -0
- package/types/lib/exports/cdn/idx.d.ts +2 -0
- package/types/lib/exports/cdn/myaccount.d.ts +2 -0
- package/types/lib/exports/common.d.ts +11 -0
- package/types/lib/exports/core.d.ts +10 -0
- package/types/lib/exports/default.d.ts +13 -0
- package/types/lib/exports/idx.d.ts +11 -0
- package/types/lib/exports/myaccount.d.ts +11 -0
- package/{lib → types/lib}/features.d.ts +0 -0
- package/types/lib/fetch/fetchRequest.d.ts +14 -0
- package/types/lib/http/OktaUserAgent.d.ts +22 -0
- package/types/lib/http/headers.d.ts +14 -0
- package/types/lib/http/index.d.ts +6 -0
- package/types/lib/http/mixin.d.ts +4 -0
- package/types/lib/http/options.d.ts +25 -0
- package/types/lib/http/request.d.ts +16 -0
- package/types/lib/http/types.d.ts +65 -0
- package/types/lib/idx/IdxTransactionManager.d.ts +18 -0
- package/types/lib/idx/authenticate.d.ts +13 -0
- package/{lib → types/lib}/idx/authenticator/Authenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/OktaPassword.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/OktaVerifyTotp.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/SecurityQuestionEnrollment.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/SecurityQuestionVerification.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/VerificationCodeAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/WebauthnEnrollment.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/WebauthnVerification.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/getAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/index.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/util.d.ts +0 -0
- package/types/lib/idx/cancel.d.ts +13 -0
- package/types/lib/idx/emailVerify.d.ts +23 -0
- package/types/lib/idx/factory/OktaAuthIdx.d.ts +9 -0
- package/types/lib/idx/factory/api.d.ts +14 -0
- package/types/lib/idx/factory/index.d.ts +2 -0
- package/{lib → types/lib}/idx/flow/AccountUnlockFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/AuthenticationFlow.d.ts +0 -0
- package/types/lib/idx/flow/FlowSpecification.d.ts +9 -0
- package/{lib → types/lib}/idx/flow/PasswordRecoveryFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/RegistrationFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/RemediationFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/index.d.ts +0 -0
- package/types/lib/idx/handleInteractionCodeRedirect.d.ts +13 -0
- package/types/lib/idx/idxState/index.d.ts +7 -0
- package/{lib → types/lib}/idx/idxState/v1/actionParser.d.ts +0 -0
- package/types/lib/idx/idxState/v1/generateIdxAction.d.ts +15 -0
- package/types/lib/idx/idxState/v1/idxResponseParser.d.ts +21 -0
- package/types/lib/idx/idxState/v1/makeIdxState.d.ts +14 -0
- package/{lib → types/lib}/idx/idxState/v1/parsers.d.ts +0 -0
- package/types/lib/idx/idxState/v1/remediationParser.d.ts +13 -0
- package/types/lib/idx/index.d.ts +30 -0
- package/types/lib/idx/interact.d.ts +26 -0
- package/types/lib/idx/introspect.d.ts +14 -0
- package/types/lib/idx/mixin.d.ts +6 -0
- package/types/lib/idx/options.d.ts +57 -0
- package/types/lib/idx/poll.d.ts +13 -0
- package/types/lib/idx/proceed.d.ts +14 -0
- package/types/lib/idx/recoverPassword.d.ts +13 -0
- package/types/lib/idx/register.d.ts +13 -0
- package/types/lib/idx/remediate.d.ts +20 -0
- package/{lib → types/lib}/idx/remediators/AuthenticatorEnrollmentData.d.ts +0 -0
- package/types/lib/idx/remediators/AuthenticatorVerificationData.d.ts +24 -0
- package/types/lib/idx/remediators/Base/AuthenticatorData.d.ts +26 -0
- package/types/lib/idx/remediators/Base/Remediator.d.ts +42 -0
- package/types/lib/idx/remediators/Base/SelectAuthenticator.d.ts +32 -0
- package/types/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +25 -0
- package/{lib → types/lib}/idx/remediators/ChallengeAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ChallengePoll.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/EnrollAuthenticator.d.ts +0 -0
- package/types/lib/idx/remediators/EnrollPoll.d.ts +23 -0
- package/types/lib/idx/remediators/EnrollProfile.d.ts +39 -0
- package/types/lib/idx/remediators/EnrollmentChannelData.d.ts +57 -0
- package/types/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +8 -0
- package/{lib → types/lib}/idx/remediators/GenericRemediator/index.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/GenericRemediator/util.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/Identify.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ReEnrollAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/RedirectIdp.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ResetAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/SelectAuthenticatorEnroll.d.ts +0 -0
- package/types/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +36 -0
- package/{lib → types/lib}/idx/remediators/SelectEnrollProfile.d.ts +0 -0
- package/types/lib/idx/remediators/SelectEnrollmentChannel.d.ts +46 -0
- package/{lib → types/lib}/idx/remediators/Skip.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/index.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/util.d.ts +0 -0
- package/types/lib/idx/run.d.ts +13 -0
- package/types/lib/idx/startTransaction.d.ts +13 -0
- package/types/lib/idx/storage.d.ts +18 -0
- package/types/lib/idx/transactionMeta.d.ts +21 -0
- package/{lib → types/lib}/idx/types/FlowIdentifier.d.ts +0 -0
- package/types/lib/idx/types/api.d.ts +158 -0
- package/{lib → types/lib}/idx/types/idx-js.d.ts +0 -0
- package/types/lib/idx/types/index.d.ts +19 -0
- package/types/lib/idx/types/meta.d.ts +22 -0
- package/types/lib/idx/types/options.d.ts +67 -0
- package/types/lib/idx/types/storage.d.ts +28 -0
- package/types/lib/idx/unlockAccount.d.ts +13 -0
- package/types/lib/idx/util.d.ts +14 -0
- package/types/lib/idx/webauthn.d.ts +31 -0
- package/{lib → types/lib}/myaccount/api.d.ts +0 -0
- package/{lib → types/lib}/myaccount/emailApi.d.ts +0 -0
- package/types/lib/myaccount/factory.d.ts +6 -0
- package/types/lib/myaccount/index.d.ts +15 -0
- package/types/lib/myaccount/mixin.d.ts +4 -0
- package/{lib → types/lib}/myaccount/phoneApi.d.ts +0 -0
- package/{lib → types/lib}/myaccount/profileApi.d.ts +0 -0
- package/types/lib/myaccount/request.d.ts +29 -0
- package/types/lib/myaccount/transactions/Base.d.ts +15 -0
- package/{lib → types/lib}/myaccount/transactions/EmailChallengeTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/EmailStatusTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/EmailTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/PhoneTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/ProfileSchemaTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/ProfileTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/index.d.ts +0 -0
- package/types/lib/myaccount/types.d.ts +58 -0
- package/types/lib/oidc/TokenManager.d.ts +53 -0
- package/types/lib/oidc/TransactionManager.d.ts +24 -0
- package/types/lib/oidc/decodeToken.d.ts +2 -0
- package/types/lib/oidc/endpoints/authorize.d.ts +14 -0
- package/{lib → types/lib}/oidc/endpoints/index.d.ts +0 -0
- package/types/lib/oidc/endpoints/token.d.ts +15 -0
- package/types/lib/oidc/endpoints/well-known.d.ts +3 -0
- package/types/lib/oidc/exchangeCodeForTokens.d.ts +14 -0
- package/types/lib/oidc/factory/OktaAuthOAuth.d.ts +4 -0
- package/types/lib/oidc/factory/api.d.ts +15 -0
- package/types/lib/oidc/factory/index.d.ts +2 -0
- package/types/lib/oidc/getToken.d.ts +2 -0
- package/types/lib/oidc/getUserInfo.d.ts +2 -0
- package/types/lib/oidc/getWithPopup.d.ts +2 -0
- package/types/lib/oidc/getWithRedirect.d.ts +2 -0
- package/types/lib/oidc/getWithoutPrompt.d.ts +2 -0
- package/types/lib/oidc/handleOAuthResponse.d.ts +2 -0
- package/types/lib/oidc/index.d.ts +35 -0
- package/types/lib/oidc/mixin/browser.d.ts +17 -0
- package/types/lib/oidc/mixin/index.d.ts +4 -0
- package/types/lib/oidc/mixin/node.d.ts +17 -0
- package/types/lib/oidc/options/OAuthOptionsConstructor.d.ts +48 -0
- package/types/lib/oidc/options/browser.d.ts +1 -0
- package/types/lib/oidc/options/index.d.ts +1 -0
- package/types/lib/oidc/options/node.d.ts +1 -0
- package/types/lib/oidc/parseFromUrl.d.ts +5 -0
- package/types/lib/oidc/renewToken.d.ts +2 -0
- package/types/lib/oidc/renewTokens.d.ts +2 -0
- package/types/lib/oidc/renewTokensWithRefresh.d.ts +2 -0
- package/types/lib/oidc/revokeToken.d.ts +14 -0
- package/types/lib/oidc/storage.d.ts +16 -0
- package/{lib → types/lib/oidc}/types/JWT.d.ts +0 -0
- package/{lib → types/lib/oidc}/types/Token.d.ts +0 -0
- package/types/lib/oidc/types/TokenManager.d.ts +61 -0
- package/types/lib/oidc/types/Transaction.d.ts +29 -0
- package/types/lib/oidc/types/TransactionManager.d.ts +15 -0
- package/{lib → types/lib/oidc}/types/UserClaims.d.ts +0 -0
- package/types/lib/oidc/types/api.d.ts +117 -0
- package/types/lib/oidc/types/index.d.ts +22 -0
- package/types/lib/oidc/types/meta.d.ts +21 -0
- package/types/lib/oidc/types/options.d.ts +77 -0
- package/{lib/types/OAuth.d.ts → types/lib/oidc/types/proto.d.ts} +0 -0
- package/types/lib/oidc/types/storage.d.ts +13 -0
- package/types/lib/oidc/util/browser.d.ts +6 -0
- package/types/lib/oidc/util/defaultTokenParams.d.ts +2 -0
- package/types/lib/oidc/util/errors.d.ts +15 -0
- package/{lib → types/lib}/oidc/util/index.d.ts +0 -0
- package/types/lib/oidc/util/loginRedirect.d.ts +30 -0
- package/types/lib/oidc/util/oauth.d.ts +6 -0
- package/types/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/{lib → types/lib}/oidc/util/pkce.d.ts +0 -0
- package/types/lib/oidc/util/prepareTokenParams.d.ts +6 -0
- package/types/lib/oidc/util/refreshToken.d.ts +3 -0
- package/types/lib/oidc/util/sharedStorage.d.ts +5 -0
- package/{lib → types/lib}/oidc/util/urlParams.d.ts +0 -0
- package/types/lib/oidc/util/validateClaims.d.ts +14 -0
- package/types/lib/oidc/util/validateToken.d.ts +2 -0
- package/types/lib/oidc/verifyToken.d.ts +2 -0
- package/types/lib/server/serverStorage.d.ts +24 -0
- package/types/lib/services/AutoRenewService.d.ts +27 -0
- package/types/lib/services/LeaderElectionService.d.ts +33 -0
- package/types/lib/services/SyncStorageService.d.ts +38 -0
- package/{lib → types/lib}/services/index.d.ts +0 -0
- package/{lib/session.d.ts → types/lib/session/api.d.ts} +0 -0
- package/types/lib/session/factory.d.ts +3 -0
- package/types/lib/session/index.d.ts +4 -0
- package/types/lib/session/mixin.d.ts +5 -0
- package/types/lib/session/types.d.ts +18 -0
- package/types/lib/storage/BaseStorageManager.d.ts +23 -0
- package/types/lib/storage/SavedObject.d.ts +25 -0
- package/types/lib/storage/index.d.ts +5 -0
- package/types/lib/storage/mixin.d.ts +3 -0
- package/types/lib/storage/options/StorageOptionsConstructor.d.ts +20 -0
- package/types/lib/storage/options/browser.d.ts +15 -0
- package/types/lib/storage/options/node.d.ts +15 -0
- package/types/lib/storage/types.d.ts +78 -0
- package/types/lib/util/PromiseQueue.d.ts +30 -0
- package/{lib → types/lib}/util/console.d.ts +0 -0
- package/types/lib/util/index.d.ts +17 -0
- package/{lib → types/lib}/util/misc.d.ts +0 -0
- package/{lib → types/lib}/util/object.d.ts +0 -0
- package/{lib → types/lib}/util/types.d.ts +0 -0
- package/{lib → types/lib}/util/url.d.ts +0 -0
- package/umd/authn.js +3 -0
- package/{dist/okta-auth-js.umd.js.LICENSE.txt → umd/authn.js.LICENSE.txt} +0 -0
- package/umd/authn.js.map +1 -0
- package/umd/core.js +3 -0
- package/umd/core.js.LICENSE.txt +14 -0
- package/umd/core.js.map +1 -0
- package/umd/default.js +3 -0
- package/umd/default.js.LICENSE.txt +14 -0
- package/umd/default.js.map +1 -0
- package/umd/idx.js +3 -0
- package/umd/idx.js.LICENSE.txt +14 -0
- package/umd/idx.js.map +1 -0
- package/umd/myaccount.js +3 -0
- package/umd/myaccount.js.LICENSE.txt +14 -0
- package/umd/myaccount.js.map +1 -0
- package/cjs/AuthStateManager.js +0 -231
- package/cjs/AuthStateManager.js.map +0 -1
- package/cjs/OktaAuth.js +0 -760
- package/cjs/OktaAuth.js.map +0 -1
- package/cjs/OktaUserAgent.js +0 -56
- package/cjs/OktaUserAgent.js.map +0 -1
- package/cjs/PromiseQueue.js +0 -89
- package/cjs/PromiseQueue.js.map +0 -1
- package/cjs/SavedObject.js +0 -112
- package/cjs/SavedObject.js.map +0 -1
- package/cjs/ServiceManager.js +0 -171
- package/cjs/ServiceManager.js.map +0 -1
- package/cjs/StorageManager.js +0 -210
- package/cjs/StorageManager.js.map +0 -1
- package/cjs/TokenManager.js +0 -496
- package/cjs/TokenManager.js.map +0 -1
- package/cjs/TransactionManager.js +0 -373
- package/cjs/TransactionManager.js.map +0 -1
- package/cjs/builderUtil.js +0 -49
- package/cjs/builderUtil.js.map +0 -1
- package/cjs/cdnEntry.js +0 -52
- package/cjs/cdnEntry.js.map +0 -1
- package/cjs/crypto/webauthn.js +0 -101
- package/cjs/crypto/webauthn.js.map +0 -1
- package/cjs/index.js +0 -186
- package/cjs/index.js.map +0 -1
- package/cjs/options/browser.js +0 -86
- package/cjs/options/browser.js.map +0 -1
- package/cjs/options/index.js +0 -105
- package/cjs/options/index.js.map +0 -1
- package/cjs/options/node.js +0 -45
- package/cjs/options/node.js.map +0 -1
- package/cjs/session.js +0 -88
- package/cjs/session.js.map +0 -1
- package/cjs/tx/AuthTransaction.js +0 -234
- package/cjs/tx/AuthTransaction.js.map +0 -1
- package/cjs/tx/TransactionState.js +0 -2
- package/cjs/tx/TransactionState.js.map +0 -1
- package/cjs/tx/api.js +0 -102
- package/cjs/tx/api.js.map +0 -1
- package/cjs/tx/index.js +0 -69
- package/cjs/tx/index.js.map +0 -1
- package/cjs/tx/poll.js +0 -138
- package/cjs/tx/poll.js.map +0 -1
- package/cjs/tx/util.js +0 -36
- package/cjs/tx/util.js.map +0 -1
- package/cjs/types/AuthState.js.map +0 -1
- package/cjs/types/Cookies.js +0 -2
- package/cjs/types/Cookies.js.map +0 -1
- package/cjs/types/EventEmitter.js +0 -2
- package/cjs/types/EventEmitter.js.map +0 -1
- package/cjs/types/JWT.js.map +0 -1
- package/cjs/types/OAuth.js +0 -2
- package/cjs/types/OAuth.js.map +0 -1
- package/cjs/types/OktaAuthOptions.js +0 -2
- package/cjs/types/OktaAuthOptions.js.map +0 -1
- package/cjs/types/Service.js.map +0 -1
- package/cjs/types/Storage.js +0 -2
- package/cjs/types/Storage.js.map +0 -1
- package/cjs/types/Token.js.map +0 -1
- package/cjs/types/TokenManager.js.map +0 -1
- package/cjs/types/Transaction.js +0 -77
- package/cjs/types/Transaction.js.map +0 -1
- package/cjs/types/UserClaims.js.map +0 -1
- package/cjs/types/api.js.map +0 -1
- package/cjs/types/http.js +0 -2
- package/cjs/types/http.js.map +0 -1
- package/cjs/types/index.js +0 -212
- package/cjs/types/index.js.map +0 -1
- package/cjs/util/sharedStorage.js +0 -58
- package/cjs/util/sharedStorage.js.map +0 -1
- package/cjs/util/storage.js +0 -29
- package/cjs/util/storage.js.map +0 -1
- package/dist/myaccount.umd.js +0 -3
- package/dist/myaccount.umd.js.map +0 -1
- package/dist/okta-auth-js.umd.js +0 -3
- package/dist/okta-auth-js.umd.js.map +0 -1
- package/esm/browser/AuthStateManager.js +0 -161
- package/esm/browser/AuthStateManager.js.map +0 -1
- package/esm/browser/OktaAuth.js +0 -557
- package/esm/browser/OktaAuth.js.map +0 -1
- package/esm/browser/OktaUserAgent.js +0 -39
- package/esm/browser/OktaUserAgent.js.map +0 -1
- package/esm/browser/PromiseQueue.js +0 -65
- package/esm/browser/PromiseQueue.js.map +0 -1
- package/esm/browser/SavedObject.js +0 -82
- package/esm/browser/SavedObject.js.map +0 -1
- package/esm/browser/ServiceManager.js +0 -115
- package/esm/browser/ServiceManager.js.map +0 -1
- package/esm/browser/StorageManager.js +0 -148
- package/esm/browser/StorageManager.js.map +0 -1
- package/esm/browser/TokenManager.js +0 -386
- package/esm/browser/TokenManager.js.map +0 -1
- package/esm/browser/TransactionManager.js +0 -244
- package/esm/browser/TransactionManager.js.map +0 -1
- package/esm/browser/builderUtil.js +0 -39
- package/esm/browser/builderUtil.js.map +0 -1
- package/esm/browser/crypto/webauthn.js +0 -79
- package/esm/browser/crypto/webauthn.js.map +0 -1
- package/esm/browser/index.js +0 -92
- package/esm/browser/index.js.map +0 -1
- package/esm/browser/myaccount/myaccount/index.js +0 -24
- package/esm/browser/myaccount/myaccount/index.js.map +0 -1
- package/esm/browser/options/browser.js +0 -77
- package/esm/browser/options/browser.js.map +0 -1
- package/esm/browser/options/index.js +0 -85
- package/esm/browser/options/index.js.map +0 -1
- package/esm/browser/session.js +0 -66
- package/esm/browser/session.js.map +0 -1
- package/esm/browser/tx/AuthTransaction.js +0 -174
- package/esm/browser/tx/AuthTransaction.js.map +0 -1
- package/esm/browser/tx/api.js +0 -72
- package/esm/browser/tx/api.js.map +0 -1
- package/esm/browser/tx/poll.js +0 -117
- package/esm/browser/tx/poll.js.map +0 -1
- package/esm/browser/tx/util.js +0 -26
- package/esm/browser/tx/util.js.map +0 -1
- package/esm/browser/types/Token.js.map +0 -1
- package/esm/browser/types/TokenManager.js.map +0 -1
- package/esm/browser/types/Transaction.js.map +0 -1
- package/esm/browser/util/sharedStorage.js +0 -56
- package/esm/browser/util/sharedStorage.js.map +0 -1
- package/esm/browser/util/storage.js +0 -26
- package/esm/browser/util/storage.js.map +0 -1
- package/esm/node/AuthStateManager.js +0 -161
- package/esm/node/AuthStateManager.js.map +0 -1
- package/esm/node/OktaAuth.js +0 -557
- package/esm/node/OktaAuth.js.map +0 -1
- package/esm/node/OktaUserAgent.js +0 -39
- package/esm/node/OktaUserAgent.js.map +0 -1
- package/esm/node/PromiseQueue.js +0 -65
- package/esm/node/PromiseQueue.js.map +0 -1
- package/esm/node/SavedObject.js +0 -82
- package/esm/node/SavedObject.js.map +0 -1
- package/esm/node/ServiceManager.js +0 -115
- package/esm/node/ServiceManager.js.map +0 -1
- package/esm/node/StorageManager.js +0 -148
- package/esm/node/StorageManager.js.map +0 -1
- package/esm/node/TokenManager.js +0 -387
- package/esm/node/TokenManager.js.map +0 -1
- package/esm/node/TransactionManager.js +0 -244
- package/esm/node/TransactionManager.js.map +0 -1
- package/esm/node/browser/browserStorage.js +0 -216
- package/esm/node/browser/browserStorage.js.map +0 -1
- package/esm/node/builderUtil.js +0 -39
- package/esm/node/builderUtil.js.map +0 -1
- package/esm/node/crypto/webauthn.js +0 -79
- package/esm/node/crypto/webauthn.js.map +0 -1
- package/esm/node/index.js +0 -92
- package/esm/node/index.js.map +0 -1
- package/esm/node/myaccount/myaccount/index.js +0 -24
- package/esm/node/myaccount/myaccount/index.js.map +0 -1
- package/esm/node/options/index.js +0 -85
- package/esm/node/options/index.js.map +0 -1
- package/esm/node/options/node.js +0 -41
- package/esm/node/options/node.js.map +0 -1
- package/esm/node/services/AutoRenewService.js +0 -77
- package/esm/node/services/AutoRenewService.js.map +0 -1
- package/esm/node/services/LeaderElectionService.js +0 -74
- package/esm/node/services/LeaderElectionService.js.map +0 -1
- package/esm/node/services/SyncStorageService.js +0 -130
- package/esm/node/services/SyncStorageService.js.map +0 -1
- package/esm/node/session.js +0 -66
- package/esm/node/session.js.map +0 -1
- package/esm/node/tx/AuthTransaction.js +0 -174
- package/esm/node/tx/AuthTransaction.js.map +0 -1
- package/esm/node/tx/api.js +0 -72
- package/esm/node/tx/api.js.map +0 -1
- package/esm/node/tx/poll.js +0 -117
- package/esm/node/tx/poll.js.map +0 -1
- package/esm/node/tx/util.js +0 -26
- package/esm/node/tx/util.js.map +0 -1
- package/esm/node/types/Token.js.map +0 -1
- package/esm/node/types/TokenManager.js.map +0 -1
- package/esm/node/types/Transaction.js.map +0 -1
- package/esm/node/util/sharedStorage.js +0 -56
- package/esm/node/util/sharedStorage.js.map +0 -1
- package/esm/node/util/storage.js +0 -26
- package/esm/node/util/storage.js.map +0 -1
- package/esm/package.json +0 -5
- package/lib/AuthStateManager.d.ts +0 -33
- package/lib/OktaAuth.d.ts +0 -81
- package/lib/OktaUserAgent.d.ts +0 -22
- package/lib/PromiseQueue.d.ts +0 -30
- package/lib/SavedObject.d.ts +0 -26
- package/lib/ServiceManager.d.ts +0 -32
- package/lib/StorageManager.d.ts +0 -28
- package/lib/TokenManager.d.ts +0 -53
- package/lib/TransactionManager.d.ts +0 -39
- package/lib/browser/browserStorage.d.ts +0 -15
- package/lib/browser/fingerprint.d.ts +0 -13
- package/lib/builderUtil.d.ts +0 -14
- package/lib/cdnEntry.d.ts +0 -18
- package/lib/constants.d.ts +0 -33
- package/lib/crypto/index.d.ts +0 -15
- package/lib/crypto/webauthn.d.ts +0 -25
- package/lib/errors/AuthApiError.d.ts +0 -23
- package/lib/errors/AuthSdkError.d.ts +0 -22
- package/lib/errors/index.d.ts +0 -18
- package/lib/fetch/fetchRequest.d.ts +0 -14
- package/lib/http/headers.d.ts +0 -14
- package/lib/http/index.d.ts +0 -2
- package/lib/http/request.d.ts +0 -16
- package/lib/idx/authenticate.d.ts +0 -13
- package/lib/idx/cancel.d.ts +0 -13
- package/lib/idx/emailVerify.d.ts +0 -26
- package/lib/idx/flow/FlowSpecification.d.ts +0 -9
- package/lib/idx/handleInteractionCodeRedirect.d.ts +0 -13
- package/lib/idx/idxState/index.d.ts +0 -7
- package/lib/idx/idxState/v1/generateIdxAction.d.ts +0 -15
- package/lib/idx/idxState/v1/idxResponseParser.d.ts +0 -21
- package/lib/idx/idxState/v1/makeIdxState.d.ts +0 -14
- package/lib/idx/idxState/v1/remediationParser.d.ts +0 -13
- package/lib/idx/index.d.ts +0 -24
- package/lib/idx/interact.d.ts +0 -25
- package/lib/idx/introspect.d.ts +0 -14
- package/lib/idx/poll.d.ts +0 -13
- package/lib/idx/proceed.d.ts +0 -14
- package/lib/idx/recoverPassword.d.ts +0 -13
- package/lib/idx/register.d.ts +0 -13
- package/lib/idx/remediate.d.ts +0 -21
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +0 -28
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +0 -46
- package/lib/idx/remediators/Base/Remediator.d.ts +0 -43
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +0 -54
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +0 -26
- package/lib/idx/remediators/EnrollPoll.d.ts +0 -23
- package/lib/idx/remediators/EnrollProfile.d.ts +0 -39
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +0 -58
- package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +0 -9
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +0 -36
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +0 -48
- package/lib/idx/run.d.ts +0 -13
- package/lib/idx/startTransaction.d.ts +0 -13
- package/lib/idx/transactionMeta.d.ts +0 -21
- package/lib/idx/types/api.d.ts +0 -112
- package/lib/idx/types/index.d.ts +0 -18
- package/lib/idx/types/options.d.ts +0 -46
- package/lib/idx/unlockAccount.d.ts +0 -13
- package/lib/idx/util.d.ts +0 -15
- package/lib/index.d.ts +0 -26
- package/lib/myaccount/index.d.ts +0 -13
- package/lib/myaccount/request.d.ts +0 -29
- package/lib/myaccount/transactions/Base.d.ts +0 -15
- package/lib/myaccount/types.d.ts +0 -55
- package/lib/oidc/decodeToken.d.ts +0 -2
- package/lib/oidc/endpoints/authorize.d.ts +0 -14
- package/lib/oidc/endpoints/token.d.ts +0 -14
- package/lib/oidc/endpoints/well-known.d.ts +0 -3
- package/lib/oidc/exchangeCodeForTokens.d.ts +0 -14
- package/lib/oidc/getToken.d.ts +0 -2
- package/lib/oidc/getUserInfo.d.ts +0 -2
- package/lib/oidc/getWithPopup.d.ts +0 -2
- package/lib/oidc/getWithRedirect.d.ts +0 -2
- package/lib/oidc/getWithoutPrompt.d.ts +0 -2
- package/lib/oidc/handleOAuthResponse.d.ts +0 -2
- package/lib/oidc/index.d.ts +0 -28
- package/lib/oidc/parseFromUrl.d.ts +0 -5
- package/lib/oidc/renewToken.d.ts +0 -2
- package/lib/oidc/renewTokens.d.ts +0 -2
- package/lib/oidc/renewTokensWithRefresh.d.ts +0 -2
- package/lib/oidc/revokeToken.d.ts +0 -14
- package/lib/oidc/util/browser.d.ts +0 -6
- package/lib/oidc/util/defaultTokenParams.d.ts +0 -2
- package/lib/oidc/util/errors.d.ts +0 -15
- package/lib/oidc/util/loginRedirect.d.ts +0 -30
- package/lib/oidc/util/oauth.d.ts +0 -6
- package/lib/oidc/util/oauthMeta.d.ts +0 -2
- package/lib/oidc/util/prepareTokenParams.d.ts +0 -5
- package/lib/oidc/util/refreshToken.d.ts +0 -3
- package/lib/oidc/util/validateClaims.d.ts +0 -14
- package/lib/oidc/util/validateToken.d.ts +0 -2
- package/lib/oidc/verifyToken.d.ts +0 -2
- package/lib/options/browser.d.ts +0 -16
- package/lib/options/index.d.ts +0 -14
- package/lib/options/node.d.ts +0 -16
- package/lib/server/serverStorage.d.ts +0 -25
- package/lib/services/AutoRenewService.d.ts +0 -27
- package/lib/services/LeaderElectionService.d.ts +0 -33
- package/lib/services/SyncStorageService.d.ts +0 -38
- package/lib/tx/AuthTransaction.d.ts +0 -58
- package/lib/tx/TransactionState.d.ts +0 -37
- package/lib/tx/api.d.ts +0 -18
- package/lib/tx/index.d.ts +0 -17
- package/lib/tx/poll.d.ts +0 -20
- package/lib/tx/util.d.ts +0 -15
- package/lib/types/AuthState.d.ts +0 -25
- package/lib/types/Cookies.d.ts +0 -26
- package/lib/types/EventEmitter.d.ts +0 -17
- package/lib/types/OktaAuthOptions.d.ts +0 -93
- package/lib/types/Service.d.ts +0 -26
- package/lib/types/Storage.d.ts +0 -95
- package/lib/types/TokenManager.d.ts +0 -39
- package/lib/types/Transaction.d.ts +0 -40
- package/lib/types/api.d.ts +0 -251
- package/lib/types/http.d.ts +0 -47
- package/lib/types/index.d.ts +0 -27
- package/lib/util/index.d.ts +0 -17
- package/lib/util/sharedStorage.d.ts +0 -6
- package/lib/util/storage.d.ts +0 -12
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.createIdxAPI = createIdxAPI;
|
|
4
|
+
|
|
5
|
+
var _oidc = require("../../oidc");
|
|
6
|
+
|
|
7
|
+
var _authenticate = require("../authenticate");
|
|
8
|
+
|
|
9
|
+
var _cancel = require("../cancel");
|
|
10
|
+
|
|
11
|
+
var _emailVerify = require("../emailVerify");
|
|
12
|
+
|
|
13
|
+
var _handleInteractionCodeRedirect = require("../handleInteractionCodeRedirect");
|
|
14
|
+
|
|
15
|
+
var _idxState = require("../idxState");
|
|
16
|
+
|
|
17
|
+
var _interact = require("../interact");
|
|
18
|
+
|
|
19
|
+
var _introspect = require("../introspect");
|
|
20
|
+
|
|
21
|
+
var _poll = require("../poll");
|
|
22
|
+
|
|
23
|
+
var _proceed = require("../proceed");
|
|
24
|
+
|
|
25
|
+
var _recoverPassword = require("../recoverPassword");
|
|
26
|
+
|
|
27
|
+
var _register = require("../register");
|
|
28
|
+
|
|
29
|
+
var _startTransaction = require("../startTransaction");
|
|
30
|
+
|
|
31
|
+
var _transactionMeta = require("../transactionMeta");
|
|
32
|
+
|
|
33
|
+
var _unlockAccount = require("../unlockAccount");
|
|
34
|
+
|
|
35
|
+
/*!
|
|
36
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
37
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
38
|
+
*
|
|
39
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
40
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
41
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
42
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
43
|
+
*
|
|
44
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
// Factory
|
|
48
|
+
function createIdxAPI(sdk) {
|
|
49
|
+
const boundStartTransaction = _startTransaction.startTransaction.bind(null, sdk);
|
|
50
|
+
|
|
51
|
+
const idx = {
|
|
52
|
+
interact: _interact.interact.bind(null, sdk),
|
|
53
|
+
introspect: _introspect.introspect.bind(null, sdk),
|
|
54
|
+
makeIdxResponse: _idxState.makeIdxState.bind(null, sdk),
|
|
55
|
+
authenticate: _authenticate.authenticate.bind(null, sdk),
|
|
56
|
+
register: _register.register.bind(null, sdk),
|
|
57
|
+
start: boundStartTransaction,
|
|
58
|
+
startTransaction: boundStartTransaction,
|
|
59
|
+
// Use `start` instead. `startTransaction` will be removed in 7.0
|
|
60
|
+
poll: _poll.poll.bind(null, sdk),
|
|
61
|
+
proceed: _proceed.proceed.bind(null, sdk),
|
|
62
|
+
cancel: _cancel.cancel.bind(null, sdk),
|
|
63
|
+
recoverPassword: _recoverPassword.recoverPassword.bind(null, sdk),
|
|
64
|
+
// oauth redirect callback
|
|
65
|
+
handleInteractionCodeRedirect: _handleInteractionCodeRedirect.handleInteractionCodeRedirect.bind(null, sdk),
|
|
66
|
+
// interaction required callback
|
|
67
|
+
isInteractionRequired: _oidc.isInteractionRequired.bind(null, sdk),
|
|
68
|
+
isInteractionRequiredError: _oidc.isInteractionRequiredError,
|
|
69
|
+
// email verify callback
|
|
70
|
+
handleEmailVerifyCallback: _emailVerify.handleEmailVerifyCallback.bind(null, sdk),
|
|
71
|
+
isEmailVerifyCallback: _emailVerify.isEmailVerifyCallback,
|
|
72
|
+
parseEmailVerifyCallback: _emailVerify.parseEmailVerifyCallback,
|
|
73
|
+
isEmailVerifyCallbackError: _emailVerify.isEmailVerifyCallbackError,
|
|
74
|
+
getSavedTransactionMeta: _transactionMeta.getSavedTransactionMeta.bind(null, sdk),
|
|
75
|
+
createTransactionMeta: _transactionMeta.createTransactionMeta.bind(null, sdk),
|
|
76
|
+
getTransactionMeta: _transactionMeta.getTransactionMeta.bind(null, sdk),
|
|
77
|
+
saveTransactionMeta: _transactionMeta.saveTransactionMeta.bind(null, sdk),
|
|
78
|
+
clearTransactionMeta: _transactionMeta.clearTransactionMeta.bind(null, sdk),
|
|
79
|
+
isTransactionMetaValid: _transactionMeta.isTransactionMetaValid,
|
|
80
|
+
setFlow: flow => {
|
|
81
|
+
sdk.options.flow = flow;
|
|
82
|
+
},
|
|
83
|
+
getFlow: () => {
|
|
84
|
+
return sdk.options.flow;
|
|
85
|
+
},
|
|
86
|
+
canProceed: _proceed.canProceed.bind(null, sdk),
|
|
87
|
+
unlockAccount: _unlockAccount.unlockAccount.bind(null, sdk)
|
|
88
|
+
};
|
|
89
|
+
return idx;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","names":["createIdxAPI","sdk","boundStartTransaction","startTransaction","bind","idx","interact","introspect","makeIdxResponse","makeIdxState","authenticate","register","start","poll","proceed","cancel","recoverPassword","handleInteractionCodeRedirect","isInteractionRequired","isInteractionRequiredError","handleEmailVerifyCallback","isEmailVerifyCallback","parseEmailVerifyCallback","isEmailVerifyCallbackError","getSavedTransactionMeta","createTransactionMeta","getTransactionMeta","saveTransactionMeta","clearTransactionMeta","isTransactionMetaValid","setFlow","flow","options","getFlow","canProceed","unlockAccount"],"sources":["../../../../lib/idx/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 { isInteractionRequired, isInteractionRequiredError } from '../../oidc';\nimport { authenticate } from '../authenticate';\nimport { cancel } from '../cancel';\nimport {\n handleEmailVerifyCallback,\n isEmailVerifyCallback,\n isEmailVerifyCallbackError,\n parseEmailVerifyCallback\n} from '../emailVerify';\nimport { handleInteractionCodeRedirect } from '../handleInteractionCodeRedirect';\nimport { makeIdxState } from '../idxState';\nimport { interact } from '../interact';\nimport { introspect } from '../introspect';\nimport { poll } from '../poll';\nimport { canProceed, proceed } from '../proceed';\nimport { recoverPassword } from '../recoverPassword';\nimport { register } from '../register';\nimport { startTransaction } from '../startTransaction';\nimport {\n clearTransactionMeta,\n createTransactionMeta,\n getSavedTransactionMeta,\n getTransactionMeta,\n isTransactionMetaValid,\n saveTransactionMeta\n} from '../transactionMeta';\nimport { FlowIdentifier, IdxAPI, OktaAuthIdxInterface } from '../types';\nimport { unlockAccount } from '../unlockAccount';\n\n// Factory\nexport function createIdxAPI(sdk: OktaAuthIdxInterface): IdxAPI {\n const boundStartTransaction = startTransaction.bind(null, sdk);\n const idx = {\n interact: interact.bind(null, sdk),\n introspect: introspect.bind(null, sdk),\n makeIdxResponse: makeIdxState.bind(null, sdk),\n \n authenticate: authenticate.bind(null, sdk),\n register: register.bind(null, sdk),\n start: boundStartTransaction,\n startTransaction: boundStartTransaction, // Use `start` instead. `startTransaction` will be removed in 7.0\n poll: poll.bind(null, sdk),\n proceed: proceed.bind(null, sdk),\n cancel: cancel.bind(null, sdk),\n recoverPassword: recoverPassword.bind(null, sdk),\n\n // oauth redirect callback\n handleInteractionCodeRedirect: handleInteractionCodeRedirect.bind(null, sdk),\n\n // interaction required callback\n isInteractionRequired: isInteractionRequired.bind(null, sdk),\n isInteractionRequiredError,\n\n // email verify callback\n handleEmailVerifyCallback: handleEmailVerifyCallback.bind(null, sdk),\n isEmailVerifyCallback,\n parseEmailVerifyCallback,\n isEmailVerifyCallbackError,\n \n getSavedTransactionMeta: getSavedTransactionMeta.bind(null, sdk),\n createTransactionMeta: createTransactionMeta.bind(null, sdk),\n getTransactionMeta: getTransactionMeta.bind(null, sdk),\n saveTransactionMeta: saveTransactionMeta.bind(null, sdk),\n clearTransactionMeta: clearTransactionMeta.bind(null, sdk),\n isTransactionMetaValid,\n setFlow: (flow: FlowIdentifier) => {\n sdk.options.flow = flow;\n },\n getFlow: (): FlowIdentifier | undefined => {\n return sdk.options.flow;\n },\n canProceed: canProceed.bind(null, sdk),\n unlockAccount: unlockAccount.bind(null, sdk),\n };\n return idx;\n}\n\n"],"mappings":";;;;AAaA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AASA;;AAxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA+BA;AACO,SAASA,YAAT,CAAsBC,GAAtB,EAAyD;EAC9D,MAAMC,qBAAqB,GAAGC,kCAAA,CAAiBC,IAAjB,CAAsB,IAAtB,EAA4BH,GAA5B,CAA9B;;EACA,MAAMI,GAAG,GAAG;IACVC,QAAQ,EAAEA,kBAAA,CAASF,IAAT,CAAc,IAAd,EAAoBH,GAApB,CADA;IAEVM,UAAU,EAAEA,sBAAA,CAAWH,IAAX,CAAgB,IAAhB,EAAsBH,GAAtB,CAFF;IAGVO,eAAe,EAAEC,sBAAA,CAAaL,IAAb,CAAkB,IAAlB,EAAwBH,GAAxB,CAHP;IAKVS,YAAY,EAAEA,0BAAA,CAAaN,IAAb,CAAkB,IAAlB,EAAwBH,GAAxB,CALJ;IAMVU,QAAQ,EAAEA,kBAAA,CAASP,IAAT,CAAc,IAAd,EAAoBH,GAApB,CANA;IAOVW,KAAK,EAAEV,qBAPG;IAQVC,gBAAgB,EAAED,qBARR;IAQ+B;IACzCW,IAAI,EAAEA,UAAA,CAAKT,IAAL,CAAU,IAAV,EAAgBH,GAAhB,CATI;IAUVa,OAAO,EAAEA,gBAAA,CAAQV,IAAR,CAAa,IAAb,EAAmBH,GAAnB,CAVC;IAWVc,MAAM,EAAEA,cAAA,CAAOX,IAAP,CAAY,IAAZ,EAAkBH,GAAlB,CAXE;IAYVe,eAAe,EAAEA,gCAAA,CAAgBZ,IAAhB,CAAqB,IAArB,EAA2BH,GAA3B,CAZP;IAcV;IACAgB,6BAA6B,EAAEA,4DAAA,CAA8Bb,IAA9B,CAAmC,IAAnC,EAAyCH,GAAzC,CAfrB;IAiBV;IACAiB,qBAAqB,EAAEA,2BAAA,CAAsBd,IAAtB,CAA2B,IAA3B,EAAiCH,GAAjC,CAlBb;IAmBVkB,0BAA0B,EAA1BA,gCAnBU;IAqBV;IACAC,yBAAyB,EAAEA,sCAAA,CAA0BhB,IAA1B,CAA+B,IAA/B,EAAqCH,GAArC,CAtBjB;IAuBVoB,qBAAqB,EAArBA,kCAvBU;IAwBVC,wBAAwB,EAAxBA,qCAxBU;IAyBVC,0BAA0B,EAA1BA,uCAzBU;IA2BVC,uBAAuB,EAAEA,wCAAA,CAAwBpB,IAAxB,CAA6B,IAA7B,EAAmCH,GAAnC,CA3Bf;IA4BVwB,qBAAqB,EAAEA,sCAAA,CAAsBrB,IAAtB,CAA2B,IAA3B,EAAiCH,GAAjC,CA5Bb;IA6BVyB,kBAAkB,EAAEA,mCAAA,CAAmBtB,IAAnB,CAAwB,IAAxB,EAA8BH,GAA9B,CA7BV;IA8BV0B,mBAAmB,EAAEA,oCAAA,CAAoBvB,IAApB,CAAyB,IAAzB,EAA+BH,GAA/B,CA9BX;IA+BV2B,oBAAoB,EAAEA,qCAAA,CAAqBxB,IAArB,CAA0B,IAA1B,EAAgCH,GAAhC,CA/BZ;IAgCV4B,sBAAsB,EAAtBA,uCAhCU;IAiCVC,OAAO,EAAGC,IAAD,IAA0B;MACjC9B,GAAG,CAAC+B,OAAJ,CAAYD,IAAZ,GAAmBA,IAAnB;IACD,CAnCS;IAoCVE,OAAO,EAAE,MAAkC;MACzC,OAAOhC,GAAG,CAAC+B,OAAJ,CAAYD,IAAnB;IACD,CAtCS;IAuCVG,UAAU,EAAEA,mBAAA,CAAW9B,IAAX,CAAgB,IAAhB,EAAsBH,GAAtB,CAvCF;IAwCVkC,aAAa,EAAEA,4BAAA,CAAc/B,IAAd,CAAmB,IAAnB,EAAyBH,GAAzB;EAxCL,CAAZ;EA0CA,OAAOI,GAAP;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 _OktaAuthIdx = require("./OktaAuthIdx");
|
|
17
|
+
|
|
18
|
+
Object.keys(_OktaAuthIdx).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _OktaAuthIdx[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _OktaAuthIdx[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/idx/factory/index.ts"],"sourcesContent":["export * from './api';\nexport * from './OktaAuthIdx';\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowSpecification.js","names":["getFlowSpecification","oktaAuth","flow","remediators","actions","withCredentials","RegistrationFlow","PasswordRecoveryFlow","AccountUnlockFlow","AuthenticationFlow"],"sources":["../../../../lib/idx/flow/FlowSpecification.ts"],"sourcesContent":["import { OktaAuthIdxInterface, FlowIdentifier } from '
|
|
1
|
+
{"version":3,"file":"FlowSpecification.js","names":["getFlowSpecification","oktaAuth","flow","remediators","actions","withCredentials","RegistrationFlow","PasswordRecoveryFlow","AccountUnlockFlow","AuthenticationFlow"],"sources":["../../../../lib/idx/flow/FlowSpecification.ts"],"sourcesContent":["import { OktaAuthIdxInterface, FlowIdentifier } from '../types';\nimport { AuthenticationFlow } from './AuthenticationFlow';\nimport { PasswordRecoveryFlow } from './PasswordRecoveryFlow';\nimport { RegistrationFlow } from './RegistrationFlow';\nimport { AccountUnlockFlow } from './AccountUnlockFlow';\nimport { RemediationFlow } from './RemediationFlow';\n\nexport interface FlowSpecification {\n flow: FlowIdentifier;\n remediators: RemediationFlow;\n actions?: string[];\n withCredentials?: boolean;\n}\n\n// eslint-disable-next-line complexity\nexport function getFlowSpecification(\n oktaAuth: OktaAuthIdxInterface,\n flow: FlowIdentifier = 'default'\n): FlowSpecification {\n let remediators, actions, withCredentials = true;\n switch (flow) {\n case 'register':\n case 'signup':\n case 'enrollProfile':\n remediators = RegistrationFlow;\n withCredentials = false;\n break;\n case 'recoverPassword':\n case 'resetPassword':\n remediators = PasswordRecoveryFlow;\n actions = [\n 'currentAuthenticator-recover', \n 'currentAuthenticatorEnrollment-recover'\n ];\n withCredentials = false;\n break;\n case 'unlockAccount':\n remediators = AccountUnlockFlow;\n withCredentials = false;\n actions = [\n 'unlock-account'\n ];\n break;\n case 'authenticate':\n case 'login':\n case 'signin':\n remediators = AuthenticationFlow;\n break;\n default:\n // default case has no flow monitor\n remediators = AuthenticationFlow;\n break;\n }\n return { flow, remediators, actions, withCredentials };\n}\n"],"mappings":";;;;AACA;;AACA;;AACA;;AACA;;AAUA;AACO,SAASA,oBAAT,CACLC,QADK,EAELC,IAAoB,GAAG,SAFlB,EAGc;EACnB,IAAIC,WAAJ;EAAA,IAAiBC,OAAjB;EAAA,IAA0BC,eAAe,GAAG,IAA5C;;EACA,QAAQH,IAAR;IACE,KAAK,UAAL;IACA,KAAK,QAAL;IACA,KAAK,eAAL;MACEC,WAAW,GAAGG,kCAAd;MACAD,eAAe,GAAG,KAAlB;MACA;;IACF,KAAK,iBAAL;IACA,KAAK,eAAL;MACEF,WAAW,GAAGI,0CAAd;MACAH,OAAO,GAAG,CACR,8BADQ,EAER,wCAFQ,CAAV;MAIAC,eAAe,GAAG,KAAlB;MACA;;IACF,KAAK,eAAL;MACEF,WAAW,GAAGK,oCAAd;MACAH,eAAe,GAAG,KAAlB;MACAD,OAAO,GAAG,CACR,gBADQ,CAAV;MAGA;;IACF,KAAK,cAAL;IACA,KAAK,OAAL;IACA,KAAK,QAAL;MACED,WAAW,GAAGM,sCAAd;MACA;;IACF;MACE;MACAN,WAAW,GAAGM,sCAAd;MACA;EA/BJ;;EAiCA,OAAO;IAAEP,IAAF;IAAQC,WAAR;IAAqBC,OAArB;IAA8BC;EAA9B,CAAP;AACD"}
|
package/cjs/idx/flow/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
-
|
|
5
3
|
var _AuthenticationFlow = require("./AuthenticationFlow");
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Object.keys(_AuthenticationFlow).forEach(function (key) {
|
|
8
6
|
if (key === "default" || key === "__esModule") return;
|
|
9
7
|
if (key in exports && exports[key] === _AuthenticationFlow[key]) return;
|
|
10
8
|
Object.defineProperty(exports, key, {
|
|
@@ -17,7 +15,7 @@ _Object$keys(_AuthenticationFlow).forEach(function (key) {
|
|
|
17
15
|
|
|
18
16
|
var _FlowSpecification = require("./FlowSpecification");
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
Object.keys(_FlowSpecification).forEach(function (key) {
|
|
21
19
|
if (key === "default" || key === "__esModule") return;
|
|
22
20
|
if (key in exports && exports[key] === _FlowSpecification[key]) return;
|
|
23
21
|
Object.defineProperty(exports, key, {
|
|
@@ -30,7 +28,7 @@ _Object$keys(_FlowSpecification).forEach(function (key) {
|
|
|
30
28
|
|
|
31
29
|
var _PasswordRecoveryFlow = require("./PasswordRecoveryFlow");
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Object.keys(_PasswordRecoveryFlow).forEach(function (key) {
|
|
34
32
|
if (key === "default" || key === "__esModule") return;
|
|
35
33
|
if (key in exports && exports[key] === _PasswordRecoveryFlow[key]) return;
|
|
36
34
|
Object.defineProperty(exports, key, {
|
|
@@ -43,7 +41,7 @@ _Object$keys(_PasswordRecoveryFlow).forEach(function (key) {
|
|
|
43
41
|
|
|
44
42
|
var _RegistrationFlow = require("./RegistrationFlow");
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
Object.keys(_RegistrationFlow).forEach(function (key) {
|
|
47
45
|
if (key === "default" || key === "__esModule") return;
|
|
48
46
|
if (key in exports && exports[key] === _RegistrationFlow[key]) return;
|
|
49
47
|
Object.defineProperty(exports, key, {
|
|
@@ -56,7 +54,7 @@ _Object$keys(_RegistrationFlow).forEach(function (key) {
|
|
|
56
54
|
|
|
57
55
|
var _AccountUnlockFlow = require("./AccountUnlockFlow");
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
Object.keys(_AccountUnlockFlow).forEach(function (key) {
|
|
60
58
|
if (key === "default" || key === "__esModule") return;
|
|
61
59
|
if (key in exports && exports[key] === _AccountUnlockFlow[key]) return;
|
|
62
60
|
Object.defineProperty(exports, key, {
|
|
@@ -69,7 +67,7 @@ _Object$keys(_AccountUnlockFlow).forEach(function (key) {
|
|
|
69
67
|
|
|
70
68
|
var _RemediationFlow = require("./RemediationFlow");
|
|
71
69
|
|
|
72
|
-
|
|
70
|
+
Object.keys(_RemediationFlow).forEach(function (key) {
|
|
73
71
|
if (key === "default" || key === "__esModule") return;
|
|
74
72
|
if (key in exports && exports[key] === _RemediationFlow[key]) return;
|
|
75
73
|
Object.defineProperty(exports, key, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/idx/flow/index.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\nexport * from './AuthenticationFlow';\nexport * from './FlowSpecification';\nexport * from './PasswordRecoveryFlow';\nexport * from './RegistrationFlow';\nexport * from './AccountUnlockFlow';\nexport * from './RemediationFlow';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/idx/flow/index.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\nexport * from './AuthenticationFlow';\nexport * from './FlowSpecification';\nexport * from './PasswordRecoveryFlow';\nexport * from './RegistrationFlow';\nexport * from './AccountUnlockFlow';\nexport * from './RemediationFlow';\n"],"mappings":";;AAYA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.handleInteractionCodeRedirect = handleInteractionCodeRedirect;
|
|
6
4
|
|
|
7
|
-
var _url = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/url"));
|
|
8
|
-
|
|
9
5
|
var _errors = require("../errors");
|
|
10
6
|
|
|
11
7
|
/*!
|
|
@@ -34,7 +30,7 @@ async function handleInteractionCodeRedirect(authClient, url) {
|
|
|
34
30
|
searchParams // URL API has been added to the polyfill
|
|
35
31
|
// eslint-disable-next-line compat/compat
|
|
36
32
|
|
|
37
|
-
} = new
|
|
33
|
+
} = new URL(url);
|
|
38
34
|
const state = searchParams.get('state');
|
|
39
35
|
const interactionCode = searchParams.get('interaction_code'); // Error handling
|
|
40
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleInteractionCodeRedirect.js","names":["handleInteractionCodeRedirect","authClient","url","meta","transactionManager","load","AuthSdkError","codeVerifier","state","savedState","searchParams","get","interactionCode","error","OAuthError","tokens","token","exchangeCodeForTokens","tokenManager","setTokens"],"sources":["../../../lib/idx/handleInteractionCodeRedirect.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 { AuthSdkError, OAuthError } from '../errors';\nimport {
|
|
1
|
+
{"version":3,"file":"handleInteractionCodeRedirect.js","names":["handleInteractionCodeRedirect","authClient","url","meta","transactionManager","load","AuthSdkError","codeVerifier","state","savedState","searchParams","URL","get","interactionCode","error","OAuthError","tokens","token","exchangeCodeForTokens","tokenManager","setTokens"],"sources":["../../../lib/idx/handleInteractionCodeRedirect.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 { AuthSdkError, OAuthError } from '../errors';\nimport { IdxTransactionMeta } from './types/meta';\nimport { OktaAuthIdxInterface } from './types';\n\nexport async function handleInteractionCodeRedirect(\n authClient: OktaAuthIdxInterface, \n url: string\n): Promise<void> {\n const meta = authClient.transactionManager.load() as IdxTransactionMeta;\n if (!meta) {\n throw new AuthSdkError('No transaction data was found in storage');\n }\n\n const { \n codeVerifier,\n state: savedState \n } = meta;\n const { \n searchParams\n // URL API has been added to the polyfill\n // eslint-disable-next-line compat/compat\n } = new URL(url); \n const state = searchParams.get('state');\n const interactionCode = searchParams.get('interaction_code');\n\n // Error handling\n const error = searchParams.get('error');\n if (error) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n throw new OAuthError(error, searchParams.get('error_description')!);\n }\n if (state !== savedState) {\n throw new AuthSdkError('State in redirect uri does not match with transaction state');\n }\n if (!interactionCode) {\n throw new AuthSdkError('Unable to parse interaction_code from the url');\n }\n \n // Save tokens to storage\n const { tokens } = await authClient.token.exchangeCodeForTokens({ interactionCode, codeVerifier });\n authClient.tokenManager.setTokens(tokens);\n}"],"mappings":";;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,eAAeA,6BAAf,CACLC,UADK,EAELC,GAFK,EAGU;EACf,MAAMC,IAAI,GAAGF,UAAU,CAACG,kBAAX,CAA8BC,IAA9B,EAAb;;EACA,IAAI,CAACF,IAAL,EAAW;IACT,MAAM,IAAIG,oBAAJ,CAAiB,0CAAjB,CAAN;EACD;;EAED,MAAM;IACJC,YADI;IAEJC,KAAK,EAAEC;EAFH,IAGFN,IAHJ;EAIA,MAAM;IACJO,YADI,CAEN;IACA;;EAHM,IAIF,IAAIC,GAAJ,CAAQT,GAAR,CAJJ;EAKA,MAAMM,KAAK,GAAGE,YAAY,CAACE,GAAb,CAAiB,OAAjB,CAAd;EACA,MAAMC,eAAe,GAAGH,YAAY,CAACE,GAAb,CAAiB,kBAAjB,CAAxB,CAhBe,CAkBf;;EACA,MAAME,KAAK,GAAGJ,YAAY,CAACE,GAAb,CAAiB,OAAjB,CAAd;;EACA,IAAIE,KAAJ,EAAW;IACT;IACA,MAAM,IAAIC,kBAAJ,CAAeD,KAAf,EAAsBJ,YAAY,CAACE,GAAb,CAAiB,mBAAjB,CAAtB,CAAN;EACD;;EACD,IAAIJ,KAAK,KAAKC,UAAd,EAA0B;IACxB,MAAM,IAAIH,oBAAJ,CAAiB,6DAAjB,CAAN;EACD;;EACD,IAAI,CAACO,eAAL,EAAsB;IACpB,MAAM,IAAIP,oBAAJ,CAAiB,+CAAjB,CAAN;EACD,CA7Bc,CA+Bf;;;EACA,MAAM;IAAEU;EAAF,IAAa,MAAMf,UAAU,CAACgB,KAAX,CAAiBC,qBAAjB,CAAuC;IAAEL,eAAF;IAAmBN;EAAnB,CAAvC,CAAzB;EACAN,UAAU,CAACkB,YAAX,CAAwBC,SAAxB,CAAkCJ,MAAlC;AACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.makeIdxState = makeIdxState;
|
|
6
6
|
exports.parsersForVersion = void 0;
|
|
@@ -33,7 +33,7 @@ function validateVersionConfig(version) {
|
|
|
33
33
|
throw new Error('version is required');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const cleanVersion = (version
|
|
36
|
+
const cleanVersion = (version ?? '').replace(/[^0-9a-zA-Z._-]/, '');
|
|
37
37
|
|
|
38
38
|
if (cleanVersion !== version || !version) {
|
|
39
39
|
throw new Error('invalid version supplied - version is required and uses semver syntax');
|
|
@@ -43,9 +43,7 @@ function validateVersionConfig(version) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function makeIdxState(authClient, rawIdxResponse, toPersist, requestDidSucceed) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const version = (_rawIdxResponse$versi = rawIdxResponse === null || rawIdxResponse === void 0 ? void 0 : rawIdxResponse.version) !== null && _rawIdxResponse$versi !== void 0 ? _rawIdxResponse$versi : _constants.IDX_API_VERSION;
|
|
46
|
+
const version = (rawIdxResponse === null || rawIdxResponse === void 0 ? void 0 : rawIdxResponse.version) ?? _constants.IDX_API_VERSION;
|
|
49
47
|
validateVersionConfig(version);
|
|
50
48
|
const {
|
|
51
49
|
makeIdxState
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["parsersForVersion","version","v1","undefined","Error","validateVersionConfig","cleanVersion","replace","makeIdxState","authClient","rawIdxResponse","toPersist","requestDidSucceed","IDX_API_VERSION"],"sources":["../../../../lib/idx/idxState/index.ts"],"sourcesContent":["import { OktaAuthIdxInterface } from '
|
|
1
|
+
{"version":3,"file":"index.js","names":["parsersForVersion","version","v1","undefined","Error","validateVersionConfig","cleanVersion","replace","makeIdxState","authClient","rawIdxResponse","toPersist","requestDidSucceed","IDX_API_VERSION"],"sources":["../../../../lib/idx/idxState/index.ts"],"sourcesContent":["import { OktaAuthIdxInterface } from '../types'; // auth-js/types\nimport { IdxResponse, IdxToPersist, RawIdxResponse } from '../types/idx-js'; // idx/types\nimport { IDX_API_VERSION } from '../../constants';\nimport v1 from './v1/parsers';\n\n\nexport const parsersForVersion = function parsersForVersion( version ) {\n switch (version) {\n case '1.0.0':\n return v1;\n case undefined:\n case null:\n throw new Error('Api version is required');\n default:\n throw new Error(`Unknown api version: ${version}. Use an exact semver version.`);\n }\n};\n\nexport function validateVersionConfig(version) {\n if ( !version ) {\n throw new Error('version is required');\n }\n\n const cleanVersion = (version ?? '').replace(/[^0-9a-zA-Z._-]/, '');\n if ( cleanVersion !== version || !version ) {\n throw new Error('invalid version supplied - version is required and uses semver syntax');\n }\n\n parsersForVersion(version); // will throw for invalid version\n}\n\nexport function makeIdxState ( \n authClient: OktaAuthIdxInterface,\n rawIdxResponse: RawIdxResponse,\n toPersist: IdxToPersist,\n requestDidSucceed: boolean,\n): IdxResponse {\n const version = rawIdxResponse?.version ?? IDX_API_VERSION;\n validateVersionConfig(version);\n \n const { makeIdxState } = parsersForVersion(version);\n return makeIdxState(authClient, rawIdxResponse, toPersist, requestDidSucceed);\n}\n"],"mappings":";;;;;;;;AAEA;;AACA;;AAHoD;AAC8B;AAK3E,MAAMA,iBAAiB,GAAG,SAASA,iBAAT,CAA4BC,OAA5B,EAAsC;EACrE,QAAQA,OAAR;IACE,KAAK,OAAL;MACE,OAAOC,gBAAP;;IACF,KAAKC,SAAL;IACA,KAAK,IAAL;MACE,MAAM,IAAIC,KAAJ,CAAU,yBAAV,CAAN;;IACF;MACE,MAAM,IAAIA,KAAJ,CAAW,wBAAuBH,OAAQ,iCAA1C,CAAN;EAPJ;AASD,CAVM;;;;AAYA,SAASI,qBAAT,CAA+BJ,OAA/B,EAAwC;EAC7C,IAAK,CAACA,OAAN,EAAgB;IACd,MAAM,IAAIG,KAAJ,CAAU,qBAAV,CAAN;EACD;;EAED,MAAME,YAAY,GAAG,CAACL,OAAO,IAAI,EAAZ,EAAgBM,OAAhB,CAAwB,iBAAxB,EAA2C,EAA3C,CAArB;;EACA,IAAKD,YAAY,KAAKL,OAAjB,IAA4B,CAACA,OAAlC,EAA4C;IAC1C,MAAM,IAAIG,KAAJ,CAAU,uEAAV,CAAN;EACD;;EAEDJ,iBAAiB,CAACC,OAAD,CAAjB,CAV6C,CAUjB;AAC7B;;AAEM,SAASO,YAAT,CACLC,UADK,EAELC,cAFK,EAGLC,SAHK,EAILC,iBAJK,EAKQ;EACb,MAAMX,OAAO,GAAG,CAAAS,cAAc,SAAd,IAAAA,cAAc,WAAd,YAAAA,cAAc,CAAET,OAAhB,KAA2BY,0BAA3C;EACAR,qBAAqB,CAACJ,OAAD,CAArB;EAEA,MAAM;IAAEO;EAAF,IAAmBR,iBAAiB,CAACC,OAAD,CAA1C;EACA,OAAOO,YAAY,CAACC,UAAD,EAAaC,cAAb,EAA6BC,SAA7B,EAAwCC,iBAAxC,CAAnB;AACD"}
|
|
@@ -41,17 +41,13 @@ const divideSingleActionParamsByMutability = function divideSingleActionParamsBy
|
|
|
41
41
|
|
|
42
42
|
for (let field of action.value) {
|
|
43
43
|
if (isFieldMutable(field)) {
|
|
44
|
-
var _field$value;
|
|
45
|
-
|
|
46
44
|
neededParamsForAction.push(field);
|
|
47
45
|
|
|
48
|
-
if (
|
|
46
|
+
if (field.value ?? false) {
|
|
49
47
|
defaultParamsForAction[field.name] = field.value;
|
|
50
48
|
}
|
|
51
49
|
} else {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
immutableParamsForAction[field.name] = (_field$value2 = field.value) !== null && _field$value2 !== void 0 ? _field$value2 : '';
|
|
50
|
+
immutableParamsForAction[field.name] = field.value ?? '';
|
|
55
51
|
}
|
|
56
52
|
}
|
|
57
53
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionParser.js","names":["isFieldMutable","field","mutable","divideSingleActionParamsByMutability","action","defaultParamsForAction","neededParamsForAction","immutableParamsForAction","value","push","name","divideActionParamsByMutability","actionList","Array","isArray","neededParams","defaultParams","immutableParams"],"sources":["../../../../../lib/idx/idxState/v1/actionParser.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-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// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nconst isFieldMutable = function isFieldMutable(field) {\n // mutable defaults to true, annoyingly\n return ( field.mutable !== false );\n};\n\nconst divideSingleActionParamsByMutability = function divideSingleActionParamsByMutability( action ) {\n const defaultParamsForAction = {}; // mutable and present\n const neededParamsForAction = []; // mutable values\n const immutableParamsForAction = {}; // immutable\n // TODO: remove assumption that form names are unique, neededParams being an array is a temp fix\n // not all actions have value (e.g. redirect)\n // making sure they are not empty and instead hold the remediation object\n if (!action.value) {\n neededParamsForAction.push(action);\n return { defaultParamsForAction, neededParamsForAction, immutableParamsForAction };\n }\n\n for ( let field of action.value ) {\n\n if ( isFieldMutable( field ) ) {\n\n neededParamsForAction.push(field);\n\n if ( field.value ?? false ) {\n defaultParamsForAction[field.name] = field.value;\n }\n\n } else {\n immutableParamsForAction[field.name] = field.value ?? '';\n }\n }\n return { defaultParamsForAction, neededParamsForAction, immutableParamsForAction };\n};\n\nexport const divideActionParamsByMutability = function divideActionParamsByMutability( actionList ) {\n // TODO: when removing form name is unique assumption, this may all be redundant\n actionList = Array.isArray(actionList) ? actionList : [ actionList ];\n const neededParams = [];\n const defaultParams = {};\n const immutableParams = {};\n\n for ( let action of actionList ) {\n const { \n defaultParamsForAction, \n neededParamsForAction, \n immutableParamsForAction \n } = divideSingleActionParamsByMutability(action);\n neededParams.push(neededParamsForAction);\n defaultParams[action.name] = defaultParamsForAction;\n immutableParams[action.name] = immutableParamsForAction;\n }\n\n return { defaultParams, neededParams, immutableParams };\n};\n\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA,MAAMA,cAAc,GAAG,SAASA,cAAT,CAAwBC,KAAxB,EAA+B;EACpD;EACA,OAASA,KAAK,CAACC,OAAN,KAAkB,KAA3B;AACD,CAHD;;AAKA,MAAMC,oCAAoC,GAAG,SAASA,oCAAT,CAA+CC,MAA/C,EAAwD;EACnG,MAAMC,sBAAsB,GAAG,EAA/B,CADmG,CAChE;;EACnC,MAAMC,qBAAqB,GAAG,EAA9B,CAFmG,CAEjE;;EAClC,MAAMC,wBAAwB,GAAG,EAAjC,CAHmG,CAG9D;EACrC;EACA;EACA;;EACA,IAAI,CAACH,MAAM,CAACI,KAAZ,EAAmB;IACjBF,qBAAqB,CAACG,IAAtB,CAA2BL,MAA3B;IACA,OAAO;MAAEC,sBAAF;MAA0BC,qBAA1B;MAAiDC;IAAjD,CAAP;EACD;;EAED,KAAM,IAAIN,KAAV,IAAmBG,MAAM,CAACI,KAA1B,EAAkC;IAEhC,IAAKR,cAAc,CAAEC,KAAF,CAAnB,EAA+B;
|
|
1
|
+
{"version":3,"file":"actionParser.js","names":["isFieldMutable","field","mutable","divideSingleActionParamsByMutability","action","defaultParamsForAction","neededParamsForAction","immutableParamsForAction","value","push","name","divideActionParamsByMutability","actionList","Array","isArray","neededParams","defaultParams","immutableParams"],"sources":["../../../../../lib/idx/idxState/v1/actionParser.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-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// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nconst isFieldMutable = function isFieldMutable(field) {\n // mutable defaults to true, annoyingly\n return ( field.mutable !== false );\n};\n\nconst divideSingleActionParamsByMutability = function divideSingleActionParamsByMutability( action ) {\n const defaultParamsForAction = {}; // mutable and present\n const neededParamsForAction = []; // mutable values\n const immutableParamsForAction = {}; // immutable\n // TODO: remove assumption that form names are unique, neededParams being an array is a temp fix\n // not all actions have value (e.g. redirect)\n // making sure they are not empty and instead hold the remediation object\n if (!action.value) {\n neededParamsForAction.push(action);\n return { defaultParamsForAction, neededParamsForAction, immutableParamsForAction };\n }\n\n for ( let field of action.value ) {\n\n if ( isFieldMutable( field ) ) {\n\n neededParamsForAction.push(field);\n\n if ( field.value ?? false ) {\n defaultParamsForAction[field.name] = field.value;\n }\n\n } else {\n immutableParamsForAction[field.name] = field.value ?? '';\n }\n }\n return { defaultParamsForAction, neededParamsForAction, immutableParamsForAction };\n};\n\nexport const divideActionParamsByMutability = function divideActionParamsByMutability( actionList ) {\n // TODO: when removing form name is unique assumption, this may all be redundant\n actionList = Array.isArray(actionList) ? actionList : [ actionList ];\n const neededParams = [];\n const defaultParams = {};\n const immutableParams = {};\n\n for ( let action of actionList ) {\n const { \n defaultParamsForAction, \n neededParamsForAction, \n immutableParamsForAction \n } = divideSingleActionParamsByMutability(action);\n neededParams.push(neededParamsForAction);\n defaultParams[action.name] = defaultParamsForAction;\n immutableParams[action.name] = immutableParamsForAction;\n }\n\n return { defaultParams, neededParams, immutableParams };\n};\n\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA,MAAMA,cAAc,GAAG,SAASA,cAAT,CAAwBC,KAAxB,EAA+B;EACpD;EACA,OAASA,KAAK,CAACC,OAAN,KAAkB,KAA3B;AACD,CAHD;;AAKA,MAAMC,oCAAoC,GAAG,SAASA,oCAAT,CAA+CC,MAA/C,EAAwD;EACnG,MAAMC,sBAAsB,GAAG,EAA/B,CADmG,CAChE;;EACnC,MAAMC,qBAAqB,GAAG,EAA9B,CAFmG,CAEjE;;EAClC,MAAMC,wBAAwB,GAAG,EAAjC,CAHmG,CAG9D;EACrC;EACA;EACA;;EACA,IAAI,CAACH,MAAM,CAACI,KAAZ,EAAmB;IACjBF,qBAAqB,CAACG,IAAtB,CAA2BL,MAA3B;IACA,OAAO;MAAEC,sBAAF;MAA0BC,qBAA1B;MAAiDC;IAAjD,CAAP;EACD;;EAED,KAAM,IAAIN,KAAV,IAAmBG,MAAM,CAACI,KAA1B,EAAkC;IAEhC,IAAKR,cAAc,CAAEC,KAAF,CAAnB,EAA+B;MAE7BK,qBAAqB,CAACG,IAAtB,CAA2BR,KAA3B;;MAEA,IAAKA,KAAK,CAACO,KAAN,IAAe,KAApB,EAA4B;QAC1BH,sBAAsB,CAACJ,KAAK,CAACS,IAAP,CAAtB,GAAqCT,KAAK,CAACO,KAA3C;MACD;IAEF,CARD,MAQO;MACLD,wBAAwB,CAACN,KAAK,CAACS,IAAP,CAAxB,GAAuCT,KAAK,CAACO,KAAN,IAAe,EAAtD;IACD;EACF;;EACD,OAAO;IAAEH,sBAAF;IAA0BC,qBAA1B;IAAiDC;EAAjD,CAAP;AACD,CA3BD;;AA6BO,MAAMI,8BAA8B,GAAG,SAASA,8BAAT,CAAyCC,UAAzC,EAAsD;EAClG;EACAA,UAAU,GAAGC,KAAK,CAACC,OAAN,CAAcF,UAAd,IAA4BA,UAA5B,GAAyC,CAAEA,UAAF,CAAtD;EACA,MAAMG,YAAY,GAAG,EAArB;EACA,MAAMC,aAAa,GAAG,EAAtB;EACA,MAAMC,eAAe,GAAG,EAAxB;;EAEA,KAAM,IAAIb,MAAV,IAAoBQ,UAApB,EAAiC;IAC/B,MAAM;MACJP,sBADI;MAEJC,qBAFI;MAGJC;IAHI,IAIFJ,oCAAoC,CAACC,MAAD,CAJxC;IAKAW,YAAY,CAACN,IAAb,CAAkBH,qBAAlB;IACAU,aAAa,CAACZ,MAAM,CAACM,IAAR,CAAb,GAA6BL,sBAA7B;IACAY,eAAe,CAACb,MAAM,CAACM,IAAR,CAAf,GAA+BH,wBAA/B;EACD;;EAED,OAAO;IAAES,aAAF;IAAiBD,YAAjB;IAA+BE;EAA/B,CAAP;AACD,CAnBM"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.default = void 0;
|
|
6
6
|
|
|
7
|
-
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
8
|
-
|
|
9
7
|
var _http = require("../../../http");
|
|
10
8
|
|
|
11
9
|
var _actionParser = require("./actionParser");
|
|
@@ -37,20 +35,18 @@ const generateDirectFetch = function generateDirectFetch(authClient, {
|
|
|
37
35
|
'Content-Type': 'application/json',
|
|
38
36
|
'Accept': actionDefinition.accepts || 'application/ion+json'
|
|
39
37
|
};
|
|
40
|
-
const body =
|
|
38
|
+
const body = JSON.stringify({ ...defaultParamsForAction,
|
|
41
39
|
...params,
|
|
42
40
|
...immutableParamsForAction
|
|
43
41
|
});
|
|
44
42
|
|
|
45
43
|
try {
|
|
46
|
-
var _toPersist$withCreden;
|
|
47
|
-
|
|
48
44
|
const response = await (0, _http.httpRequest)(authClient, {
|
|
49
45
|
url: target,
|
|
50
46
|
method: actionDefinition.method,
|
|
51
47
|
headers,
|
|
52
48
|
args: body,
|
|
53
|
-
withCredentials: (
|
|
49
|
+
withCredentials: (toPersist === null || toPersist === void 0 ? void 0 : toPersist.withCredentials) ?? true
|
|
54
50
|
});
|
|
55
51
|
return authClient.idx.makeIdxResponse({ ...response
|
|
56
52
|
}, toPersist, true);
|
|
@@ -71,10 +67,9 @@ const generateDirectFetch = function generateDirectFetch(authClient, {
|
|
|
71
67
|
// the response reaches here when Okta Verify is not installed
|
|
72
68
|
// set `stepUp` to true if flow should be continued without showing any errors
|
|
73
69
|
idxResponse.stepUp = true;
|
|
74
|
-
}
|
|
75
|
-
|
|
70
|
+
}
|
|
76
71
|
|
|
77
|
-
|
|
72
|
+
return idxResponse;
|
|
78
73
|
}
|
|
79
74
|
};
|
|
80
75
|
}; // TODO: Resolve in M2: Either build the final polling solution or remove this code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateIdxAction.js","names":["generateDirectFetch","authClient","actionDefinition","defaultParamsForAction","immutableParamsForAction","toPersist","target","href","params","headers","accepts","body","response","httpRequest","url","method","args","withCredentials","idx","makeIdxResponse","err","AuthApiError","xhr","payload","responseJSON","
|
|
1
|
+
{"version":3,"file":"generateIdxAction.js","names":["generateDirectFetch","authClient","actionDefinition","defaultParamsForAction","immutableParamsForAction","toPersist","target","href","params","headers","accepts","body","JSON","stringify","response","httpRequest","url","method","args","withCredentials","idx","makeIdxResponse","err","AuthApiError","xhr","payload","responseJSON","parse","responseText","wwwAuthHeader","idxResponse","status","stepUp","generateIdxAction","generator","defaultParams","neededParams","immutableParams","divideActionParamsByMutability","action","name"],"sources":["../../../../../lib/idx/idxState/v1/generateIdxAction.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-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/* eslint-disable max-len, complexity */\nimport { httpRequest } from '../../../http';\nimport { OktaAuthIdxInterface } from '../../types'; // auth-js/types\nimport { IdxActionFunction, IdxActionParams, IdxResponse, IdxToPersist } from '../../types/idx-js';\nimport { divideActionParamsByMutability } from './actionParser';\nimport AuthApiError from '../../../errors/AuthApiError';\n\nconst generateDirectFetch = function generateDirectFetch(authClient: OktaAuthIdxInterface, { \n actionDefinition, \n defaultParamsForAction = {}, \n immutableParamsForAction = {}, \n toPersist = {} as IdxToPersist\n}): IdxActionFunction {\n const target = actionDefinition.href;\n return async function(params: IdxActionParams = {}): Promise<IdxResponse> {\n const headers = {\n 'Content-Type': 'application/json',\n 'Accept': actionDefinition.accepts || 'application/ion+json',\n };\n const body = JSON.stringify({\n ...defaultParamsForAction,\n ...params,\n ...immutableParamsForAction\n });\n\n try {\n const response = await httpRequest(authClient, {\n url: target,\n method: actionDefinition.method,\n headers,\n args: body,\n withCredentials: toPersist?.withCredentials ?? true\n });\n\n return authClient.idx.makeIdxResponse({ ...response }, toPersist, true);\n }\n catch (err) {\n if (!(err instanceof AuthApiError) || !err?.xhr) {\n throw err;\n }\n\n const response = err.xhr;\n const payload = response.responseJSON || JSON.parse(response.responseText);\n const wwwAuthHeader = response.headers['WWW-Authenticate'] || response.headers['www-authenticate'];\n\n const idxResponse = authClient.idx.makeIdxResponse({ ...payload }, toPersist, false);\n if (response.status === 401 && wwwAuthHeader === 'Oktadevicejwt realm=\"Okta Device\"') {\n // Okta server responds 401 status code with WWW-Authenticate header and new remediation\n // so that the iOS/MacOS credential SSO extension (Okta Verify) can intercept\n // the response reaches here when Okta Verify is not installed\n // set `stepUp` to true if flow should be continued without showing any errors\n idxResponse.stepUp = true;\n }\n\n return idxResponse;\n }\n };\n};\n\n// TODO: Resolve in M2: Either build the final polling solution or remove this code\n// const generatePollingFetch = function generatePollingFetch( { actionDefinition, defaultParamsForAction = {}, immutableParamsForAction = {} } ) {\n// // TODO: Discussions ongoing about when/how to terminate polling: OKTA-246581\n// const target = actionDefinition.href;\n// return async function(params) {\n// return fetch(target, {\n// method: actionDefinition.method,\n// headers: {\n// 'content-type': actionDefinition.accepts,\n// },\n// body: JSON.stringify({ ...defaultParamsForAction, ...params, ...immutableParamsForAction })\n// })\n// .then( response => response.ok ? response.json() : response.json().then( err => Promise.reject(err)) )\n// .then( idxResponse => makeIdxState(authClient, idxResponse) );\n// };\n// };\n\nconst generateIdxAction = function generateIdxAction( authClient: OktaAuthIdxInterface, actionDefinition, toPersist ): IdxActionFunction {\n // TODO: leaving this here to see where the polling is EXPECTED to drop into the code, but removing any accidental trigger of incomplete code\n // const generator = actionDefinition.refresh ? generatePollingFetch : generateDirectFetch;\n const generator = generateDirectFetch;\n const { defaultParams, neededParams, immutableParams } = divideActionParamsByMutability( actionDefinition );\n\n const action = generator(authClient, {\n actionDefinition,\n defaultParamsForAction: defaultParams[actionDefinition.name],\n immutableParamsForAction: immutableParams[actionDefinition.name],\n toPersist\n });\n action.neededParams = neededParams;\n return action;\n};\n\nexport default generateIdxAction;\n"],"mappings":";;;;;;AAaA;;AAGA;;AACA;;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAOA,MAAMA,mBAAmB,GAAG,SAASA,mBAAT,CAA6BC,UAA7B,EAA+D;EACzFC,gBADyF;EAEzFC,sBAAsB,GAAG,EAFgE;EAGzFC,wBAAwB,GAAG,EAH8D;EAIzFC,SAAS,GAAG;AAJ6E,CAA/D,EAKN;EACpB,MAAMC,MAAM,GAAGJ,gBAAgB,CAACK,IAAhC;EACA,OAAO,gBAAeC,MAAuB,GAAG,EAAzC,EAAmE;IACxE,MAAMC,OAAO,GAAG;MACd,gBAAgB,kBADF;MAEd,UAAUP,gBAAgB,CAACQ,OAAjB,IAA4B;IAFxB,CAAhB;IAIA,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAe,EAC1B,GAAGV,sBADuB;MAE1B,GAAGK,MAFuB;MAG1B,GAAGJ;IAHuB,CAAf,CAAb;;IAMA,IAAI;MACF,MAAMU,QAAQ,GAAG,MAAM,IAAAC,iBAAA,EAAYd,UAAZ,EAAwB;QAC7Ce,GAAG,EAAEV,MADwC;QAE7CW,MAAM,EAAEf,gBAAgB,CAACe,MAFoB;QAG7CR,OAH6C;QAI7CS,IAAI,EAAEP,IAJuC;QAK7CQ,eAAe,EAAE,CAAAd,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEc,eAAX,KAA8B;MALF,CAAxB,CAAvB;MAQA,OAAOlB,UAAU,CAACmB,GAAX,CAAeC,eAAf,CAA+B,EAAE,GAAGP;MAAL,CAA/B,EAAgDT,SAAhD,EAA2D,IAA3D,CAAP;IACD,CAVD,CAWA,OAAOiB,GAAP,EAAY;MACV,IAAI,EAAEA,GAAG,YAAYC,qBAAjB,KAAkC,EAACD,GAAD,aAACA,GAAD,eAACA,GAAG,CAAEE,GAAN,CAAtC,EAAiD;QAC/C,MAAMF,GAAN;MACD;;MAED,MAAMR,QAAQ,GAAGQ,GAAG,CAACE,GAArB;MACA,MAAMC,OAAO,GAAGX,QAAQ,CAACY,YAAT,IAAyBd,IAAI,CAACe,KAAL,CAAWb,QAAQ,CAACc,YAApB,CAAzC;MACA,MAAMC,aAAa,GAAGf,QAAQ,CAACL,OAAT,CAAiB,kBAAjB,KAAwCK,QAAQ,CAACL,OAAT,CAAiB,kBAAjB,CAA9D;MAEA,MAAMqB,WAAW,GAAG7B,UAAU,CAACmB,GAAX,CAAeC,eAAf,CAA+B,EAAE,GAAGI;MAAL,CAA/B,EAA+CpB,SAA/C,EAA0D,KAA1D,CAApB;;MACA,IAAIS,QAAQ,CAACiB,MAAT,KAAoB,GAApB,IAA2BF,aAAa,KAAK,mCAAjD,EAAsF;QACpF;QACA;QACA;QACA;QACAC,WAAW,CAACE,MAAZ,GAAqB,IAArB;MACD;;MAED,OAAOF,WAAP;IACD;EACF,CA1CD;AA2CD,CAlDD,C,CAoDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,MAAMG,iBAAiB,GAAG,SAASA,iBAAT,CAA4BhC,UAA5B,EAA8DC,gBAA9D,EAAgFG,SAAhF,EAA+G;EACvI;EACA;EACA,MAAM6B,SAAS,GAAGlC,mBAAlB;EACA,MAAM;IAAEmC,aAAF;IAAiBC,YAAjB;IAA+BC;EAA/B,IAAmD,IAAAC,4CAAA,EAAgCpC,gBAAhC,CAAzD;EAEA,MAAMqC,MAAM,GAAGL,SAAS,CAACjC,UAAD,EAAa;IACnCC,gBADmC;IAEnCC,sBAAsB,EAAEgC,aAAa,CAACjC,gBAAgB,CAACsC,IAAlB,CAFF;IAGnCpC,wBAAwB,EAAEiC,eAAe,CAACnC,gBAAgB,CAACsC,IAAlB,CAHN;IAInCnC;EAJmC,CAAb,CAAxB;EAMAkC,MAAM,CAACH,YAAP,GAAsBA,YAAtB;EACA,OAAOG,MAAP;AACD,CAdD;;eAgBeN,iB"}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.parseNonRemediations = exports.parseIdxResponse = void 0;
|
|
6
6
|
|
|
7
|
-
var _fromEntries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/from-entries"));
|
|
8
|
-
|
|
9
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
10
|
-
|
|
11
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
12
|
-
|
|
13
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
14
|
-
|
|
15
|
-
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
|
16
|
-
|
|
17
7
|
var _remediationParser = require("./remediationParser");
|
|
18
8
|
|
|
19
9
|
var _generateIdxAction = _interopRequireDefault(require("./generateIdxAction"));
|
|
20
10
|
|
|
21
11
|
var _jsonpathPlus = require("jsonpath-plus");
|
|
22
12
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
/*!
|
|
14
|
+
* Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
15
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
16
|
+
*
|
|
17
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
20
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
*
|
|
22
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/* eslint-disable max-len */
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-nocheck
|
|
28
|
+
// auth-js/types
|
|
29
|
+
const SKIP_FIELDS = Object.fromEntries(['remediation', // remediations are put into proceed/neededToProceed
|
|
26
30
|
'context' // the API response of 'context' isn't externally useful. We ignore it and put all non-action (contextual) info into idxState.context
|
|
27
|
-
]
|
|
31
|
+
].map(field => [field, !!'skip this field']));
|
|
28
32
|
|
|
29
33
|
const parseNonRemediations = function parseNonRemediations(authClient, idxResponse, toPersist = {}) {
|
|
30
|
-
var _context2;
|
|
31
|
-
|
|
32
34
|
const actions = {};
|
|
33
35
|
const context = {};
|
|
34
|
-
|
|
36
|
+
Object.keys(idxResponse).filter(field => !SKIP_FIELDS[field]).forEach(field => {
|
|
35
37
|
const fieldIsObject = typeof idxResponse[field] === 'object' && !!idxResponse[field];
|
|
36
38
|
|
|
37
39
|
if (!fieldIsObject) {
|
|
@@ -64,7 +66,7 @@ const parseNonRemediations = function parseNonRemediations(authClient, idxRespon
|
|
|
64
66
|
|
|
65
67
|
|
|
66
68
|
context[field].value = {};
|
|
67
|
-
|
|
69
|
+
Object.entries(fieldValue).forEach(([subField, value]) => {
|
|
68
70
|
if (value.rel) {
|
|
69
71
|
// is [field].value[subField] an action?
|
|
70
72
|
// add any "action" value subfields to actions
|
|
@@ -84,7 +86,7 @@ const parseNonRemediations = function parseNonRemediations(authClient, idxRespon
|
|
|
84
86
|
exports.parseNonRemediations = parseNonRemediations;
|
|
85
87
|
|
|
86
88
|
const expandRelatesTo = (idxResponse, value) => {
|
|
87
|
-
|
|
89
|
+
Object.keys(value).forEach(k => {
|
|
88
90
|
if (k === 'relatesTo') {
|
|
89
91
|
const query = Array.isArray(value[k]) ? value[k][0] : value[k];
|
|
90
92
|
|
|
@@ -126,7 +128,7 @@ const parseIdxResponse = function parseIdxResponse(authClient, idxResponse, toPe
|
|
|
126
128
|
|
|
127
129
|
const remediationData = ((_idxResponse$remediat = idxResponse.remediation) === null || _idxResponse$remediat === void 0 ? void 0 : _idxResponse$remediat.value) || [];
|
|
128
130
|
remediationData.forEach(remediation => expandRelatesTo(idxResponse, remediation));
|
|
129
|
-
const remediations =
|
|
131
|
+
const remediations = remediationData.map(remediation => convertRemediationAction(authClient, remediation, toPersist));
|
|
130
132
|
const {
|
|
131
133
|
context,
|
|
132
134
|
actions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idxResponseParser.js","names":["SKIP_FIELDS","field","parseNonRemediations","authClient","idxResponse","toPersist","actions","context","forEach","fieldIsObject","rel","name","generateIdxAction","value","fieldValue","type","info","subField","expandRelatesTo","k","query","Array","isArray","result","JSONPath","path","json","innerValue","convertRemediationAction","remediation","remediationActions","generateRemediationFunctions","actionFn","action","parseIdxResponse","remediationData","remediations"],"sources":["../../../../../lib/idx/idxState/v1/idxResponseParser.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-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/* eslint-disable max-len */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { OktaAuthIdxInterface } from '
|
|
1
|
+
{"version":3,"file":"idxResponseParser.js","names":["SKIP_FIELDS","Object","fromEntries","map","field","parseNonRemediations","authClient","idxResponse","toPersist","actions","context","keys","filter","forEach","fieldIsObject","rel","name","generateIdxAction","value","fieldValue","type","info","entries","subField","expandRelatesTo","k","query","Array","isArray","result","JSONPath","path","json","innerValue","convertRemediationAction","remediation","remediationActions","generateRemediationFunctions","actionFn","action","parseIdxResponse","remediationData","remediations"],"sources":["../../../../../lib/idx/idxState/v1/idxResponseParser.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-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/* eslint-disable max-len */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { OktaAuthIdxInterface } from '../../types'; // auth-js/types\nimport { generateRemediationFunctions } from './remediationParser';\nimport generateIdxAction from './generateIdxAction';\nimport { JSONPath } from 'jsonpath-plus';\n\nconst SKIP_FIELDS = Object.fromEntries([\n 'remediation', // remediations are put into proceed/neededToProceed\n 'context', // the API response of 'context' isn't externally useful. We ignore it and put all non-action (contextual) info into idxState.context\n].map( (field) => [ field, !!'skip this field' ] ));\n\nexport const parseNonRemediations = function parseNonRemediations( authClient: OktaAuthIdxInterface, idxResponse, toPersist = {} ) {\n const actions = {};\n const context = {};\n\n Object.keys(idxResponse)\n .filter( field => !SKIP_FIELDS[field])\n .forEach( field => {\n const fieldIsObject = typeof idxResponse[field] === 'object' && !!idxResponse[field];\n\n if ( !fieldIsObject ) {\n // simple fields are contextual info\n context[field] = idxResponse[field];\n return;\n }\n\n if ( idxResponse[field].rel ) {\n // top level actions\n actions[idxResponse[field].name] = generateIdxAction(authClient, idxResponse[field], toPersist);\n return;\n }\n\n const { value: fieldValue, type, ...info} = idxResponse[field];\n context[field] = { type, ...info}; // add the non-action parts as context\n\n if ( type !== 'object' ) {\n // only object values hold actions\n context[field].value = fieldValue;\n return;\n }\n\n // We are an object field containing an object value\n context[field].value = {};\n Object.entries(fieldValue)\n .forEach( ([subField, value]) => {\n if (value.rel) { // is [field].value[subField] an action?\n // add any \"action\" value subfields to actions\n actions[`${field}-${subField.name || subField}`] = generateIdxAction(authClient, value, toPersist);\n } else {\n // add non-action value subfields to context\n context[field].value[subField] = value;\n }\n });\n });\n\n return { context, actions };\n};\n\nconst expandRelatesTo = (idxResponse, value) => {\n Object.keys(value).forEach(k => {\n if (k === 'relatesTo') {\n const query = Array.isArray(value[k]) ? value[k][0] : value[k];\n if (typeof query === 'string') {\n // eslint-disable-next-line new-cap\n const result = JSONPath({ path: query, json: idxResponse })[0];\n if (result) {\n value[k] = result;\n return;\n }\n }\n }\n if (Array.isArray(value[k])) {\n value[k].forEach(innerValue => expandRelatesTo(idxResponse, innerValue));\n }\n });\n};\n\nconst convertRemediationAction = (authClient: OktaAuthIdxInterface, remediation, toPersist) => {\n // Only remediation that has `rel` field (indicator for form submission) can have http action\n if (remediation.rel) {\n const remediationActions = generateRemediationFunctions( authClient, [remediation], toPersist );\n const actionFn = remediationActions[remediation.name];\n return {\n ...remediation,\n action: actionFn,\n };\n }\n \n return remediation;\n};\n\nexport const parseIdxResponse = function parseIdxResponse( authClient: OktaAuthIdxInterface, idxResponse, toPersist = {} ): {\n remediations: IdxRemediation[];\n context: IdxContext;\n actions: IdxActions;\n} {\n const remediationData = idxResponse.remediation?.value || [];\n\n remediationData.forEach(\n remediation => expandRelatesTo(idxResponse, remediation)\n );\n\n const remediations = remediationData.map(remediation => convertRemediationAction( authClient, remediation, toPersist ));\n\n const { context, actions } = parseNonRemediations( authClient, idxResponse, toPersist );\n\n return {\n remediations,\n context,\n actions,\n };\n};\n"],"mappings":";;;;;;AAgBA;;AACA;;AACA;;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACuD;AAKvD,MAAMA,WAAW,GAAGC,MAAM,CAACC,WAAP,CAAmB,CACrC,aADqC,EACtB;AACf,SAFqC,CAE1B;AAF0B,EAGrCC,GAHqC,CAG/BC,KAAD,IAAW,CAAEA,KAAF,EAAS,CAAC,CAAC,iBAAX,CAHqB,CAAnB,CAApB;;AAKO,MAAMC,oBAAoB,GAAG,SAASA,oBAAT,CAA+BC,UAA/B,EAAiEC,WAAjE,EAA8EC,SAAS,GAAG,EAA1F,EAA+F;EACjI,MAAMC,OAAO,GAAG,EAAhB;EACA,MAAMC,OAAO,GAAG,EAAhB;EAEAT,MAAM,CAACU,IAAP,CAAYJ,WAAZ,EACGK,MADH,CACWR,KAAK,IAAI,CAACJ,WAAW,CAACI,KAAD,CADhC,EAEGS,OAFH,CAEYT,KAAK,IAAI;IACjB,MAAMU,aAAa,GAAG,OAAOP,WAAW,CAACH,KAAD,CAAlB,KAA8B,QAA9B,IAA0C,CAAC,CAACG,WAAW,CAACH,KAAD,CAA7E;;IAEA,IAAK,CAACU,aAAN,EAAsB;MACpB;MACAJ,OAAO,CAACN,KAAD,CAAP,GAAiBG,WAAW,CAACH,KAAD,CAA5B;MACA;IACD;;IAED,IAAKG,WAAW,CAACH,KAAD,CAAX,CAAmBW,GAAxB,EAA8B;MAC5B;MACAN,OAAO,CAACF,WAAW,CAACH,KAAD,CAAX,CAAmBY,IAApB,CAAP,GAAmC,IAAAC,0BAAA,EAAkBX,UAAlB,EAA8BC,WAAW,CAACH,KAAD,CAAzC,EAAkDI,SAAlD,CAAnC;MACA;IACD;;IAED,MAAM;MAAEU,KAAK,EAAEC,UAAT;MAAqBC,IAArB;MAA2B,GAAGC;IAA9B,IAAsCd,WAAW,CAACH,KAAD,CAAvD;IACAM,OAAO,CAACN,KAAD,CAAP,GAAiB;MAAEgB,IAAF;MAAQ,GAAGC;IAAX,CAAjB,CAhBiB,CAgBkB;;IAEnC,IAAKD,IAAI,KAAK,QAAd,EAAyB;MACvB;MACAV,OAAO,CAACN,KAAD,CAAP,CAAec,KAAf,GAAuBC,UAAvB;MACA;IACD,CAtBgB,CAwBjB;;;IACAT,OAAO,CAACN,KAAD,CAAP,CAAec,KAAf,GAAuB,EAAvB;IACAjB,MAAM,CAACqB,OAAP,CAAeH,UAAf,EACGN,OADH,CACY,CAAC,CAACU,QAAD,EAAWL,KAAX,CAAD,KAAuB;MAC/B,IAAIA,KAAK,CAACH,GAAV,EAAe;QAAE;QACf;QACAN,OAAO,CAAE,GAAEL,KAAM,IAAGmB,QAAQ,CAACP,IAAT,IAAiBO,QAAS,EAAvC,CAAP,GAAmD,IAAAN,0BAAA,EAAkBX,UAAlB,EAA8BY,KAA9B,EAAqCV,SAArC,CAAnD;MACD,CAHD,MAGO;QACL;QACAE,OAAO,CAACN,KAAD,CAAP,CAAec,KAAf,CAAqBK,QAArB,IAAiCL,KAAjC;MACD;IACF,CATH;EAUD,CAtCH;EAwCA,OAAO;IAAER,OAAF;IAAWD;EAAX,CAAP;AACD,CA7CM;;;;AA+CP,MAAMe,eAAe,GAAG,CAACjB,WAAD,EAAcW,KAAd,KAAwB;EAC9CjB,MAAM,CAACU,IAAP,CAAYO,KAAZ,EAAmBL,OAAnB,CAA2BY,CAAC,IAAI;IAC9B,IAAIA,CAAC,KAAK,WAAV,EAAuB;MACrB,MAAMC,KAAK,GAAGC,KAAK,CAACC,OAAN,CAAcV,KAAK,CAACO,CAAD,CAAnB,IAA0BP,KAAK,CAACO,CAAD,CAAL,CAAS,CAAT,CAA1B,GAAwCP,KAAK,CAACO,CAAD,CAA3D;;MACA,IAAI,OAAOC,KAAP,KAAiB,QAArB,EAA+B;QAC7B;QACA,MAAMG,MAAM,GAAG,IAAAC,sBAAA,EAAS;UAAEC,IAAI,EAAEL,KAAR;UAAeM,IAAI,EAAEzB;QAArB,CAAT,EAA6C,CAA7C,CAAf;;QACA,IAAIsB,MAAJ,EAAY;UACVX,KAAK,CAACO,CAAD,CAAL,GAAWI,MAAX;UACA;QACD;MACF;IACF;;IACD,IAAIF,KAAK,CAACC,OAAN,CAAcV,KAAK,CAACO,CAAD,CAAnB,CAAJ,EAA6B;MAC3BP,KAAK,CAACO,CAAD,CAAL,CAASZ,OAAT,CAAiBoB,UAAU,IAAIT,eAAe,CAACjB,WAAD,EAAc0B,UAAd,CAA9C;IACD;EACF,CAfD;AAgBD,CAjBD;;AAmBA,MAAMC,wBAAwB,GAAG,CAAC5B,UAAD,EAAmC6B,WAAnC,EAAgD3B,SAAhD,KAA8D;EAC7F;EACA,IAAI2B,WAAW,CAACpB,GAAhB,EAAqB;IACnB,MAAMqB,kBAAkB,GAAG,IAAAC,+CAAA,EAA8B/B,UAA9B,EAA0C,CAAC6B,WAAD,CAA1C,EAAyD3B,SAAzD,CAA3B;IACA,MAAM8B,QAAQ,GAAGF,kBAAkB,CAACD,WAAW,CAACnB,IAAb,CAAnC;IACA,OAAO,EACL,GAAGmB,WADE;MAELI,MAAM,EAAED;IAFH,CAAP;EAID;;EAED,OAAOH,WAAP;AACD,CAZD;;AAcO,MAAMK,gBAAgB,GAAG,SAASA,gBAAT,CAA2BlC,UAA3B,EAA6DC,WAA7D,EAA0EC,SAAS,GAAG,EAAtF,EAI9B;EAAA;;EACA,MAAMiC,eAAe,GAAG,0BAAAlC,WAAW,CAAC4B,WAAZ,gFAAyBjB,KAAzB,KAAkC,EAA1D;EAEAuB,eAAe,CAAC5B,OAAhB,CACEsB,WAAW,IAAIX,eAAe,CAACjB,WAAD,EAAc4B,WAAd,CADhC;EAIA,MAAMO,YAAY,GAAGD,eAAe,CAACtC,GAAhB,CAAoBgC,WAAW,IAAID,wBAAwB,CAAE5B,UAAF,EAAc6B,WAAd,EAA2B3B,SAA3B,CAA3D,CAArB;EAEA,MAAM;IAAEE,OAAF;IAAWD;EAAX,IAAuBJ,oBAAoB,CAAEC,UAAF,EAAcC,WAAd,EAA2BC,SAA3B,CAAjD;EAEA,OAAO;IACLkC,YADK;IAELhC,OAFK;IAGLD;EAHK,CAAP;AAKD,CApBM"}
|