@okta/okta-auth-js 6.9.0 → 7.0.1
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 +14 -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 +2 -2
- 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 +8 -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/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 +4 -3
- 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 +4 -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 +5 -4
- 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 +4 -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 -26
- 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 -47
- 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
package/cjs/idx/remediate.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.remediate = remediate;
|
|
6
4
|
|
|
7
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
8
|
-
|
|
9
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
10
|
-
|
|
11
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
12
|
-
|
|
13
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
14
|
-
|
|
15
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
16
|
-
|
|
17
5
|
var _errors = require("../errors");
|
|
18
6
|
|
|
19
7
|
var _util = require("./util");
|
|
@@ -32,10 +20,8 @@ var _util = require("./util");
|
|
|
32
20
|
|
|
33
21
|
/* eslint-disable max-statements, max-depth, complexity */
|
|
34
22
|
function getActionFromValues(values, idxResponse) {
|
|
35
|
-
var _context;
|
|
36
|
-
|
|
37
23
|
// Currently support resend actions only
|
|
38
|
-
return
|
|
24
|
+
return Object.keys(idxResponse.actions).find(action => !!values.resend && action.includes('-resend'));
|
|
39
25
|
}
|
|
40
26
|
|
|
41
27
|
function removeActionFromValues(values) {
|
|
@@ -47,7 +33,7 @@ function removeActionFromValues(values) {
|
|
|
47
33
|
|
|
48
34
|
function removeActionFromOptions(options, actionName) {
|
|
49
35
|
let actions = options.actions || [];
|
|
50
|
-
actions =
|
|
36
|
+
actions = actions.filter(entry => {
|
|
51
37
|
if (typeof entry === 'string') {
|
|
52
38
|
return entry !== actionName;
|
|
53
39
|
}
|
|
@@ -95,13 +81,10 @@ async function remediate(authClient, idxResponse, values, options) {
|
|
|
95
81
|
let optionsWithoutExecutedAction = removeActionFromOptions(options, action);
|
|
96
82
|
|
|
97
83
|
if (typeof idxResponse.actions[action] === 'function') {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
} catch (e) {
|
|
104
|
-
return (0, _util.handleIdxError)(authClient, e, options);
|
|
84
|
+
idxResponse = await idxResponse.actions[action](params);
|
|
85
|
+
|
|
86
|
+
if (idxResponse.requestDidSucceed === false) {
|
|
87
|
+
return (0, _util.handleFailedResponse)(authClient, idxResponse, options);
|
|
105
88
|
}
|
|
106
89
|
|
|
107
90
|
if (action === 'cancel') {
|
|
@@ -115,18 +98,15 @@ async function remediate(authClient, idxResponse, values, options) {
|
|
|
115
98
|
} // search for action in remediation list
|
|
116
99
|
|
|
117
100
|
|
|
118
|
-
const remediationAction =
|
|
101
|
+
const remediationAction = neededToProceed.find(({
|
|
119
102
|
name
|
|
120
103
|
}) => name === action);
|
|
121
104
|
|
|
122
105
|
if (remediationAction) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
};
|
|
128
|
-
} catch (e) {
|
|
129
|
-
return (0, _util.handleIdxError)(authClient, e, options);
|
|
106
|
+
idxResponse = await idxResponse.proceed(action, params);
|
|
107
|
+
|
|
108
|
+
if (idxResponse.requestDidSucceed === false) {
|
|
109
|
+
return (0, _util.handleFailedResponse)(authClient, idxResponse, options);
|
|
130
110
|
}
|
|
131
111
|
|
|
132
112
|
return remediate(authClient, idxResponse, values, optionsWithoutExecutedAction); // recursive call
|
|
@@ -145,21 +125,21 @@ async function remediate(authClient, idxResponse, values, options) {
|
|
|
145
125
|
}
|
|
146
126
|
|
|
147
127
|
if (!remediator) {
|
|
128
|
+
// With options.step, remediator is not required
|
|
148
129
|
if (options.step) {
|
|
149
130
|
values = (0, _util.filterValuesForRemediation)(idxResponse, options.step, values); // include only requested values
|
|
150
131
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
};
|
|
156
|
-
return {
|
|
157
|
-
idxResponse
|
|
158
|
-
};
|
|
159
|
-
} catch (e) {
|
|
160
|
-
return (0, _util.handleIdxError)(authClient, e, options);
|
|
132
|
+
idxResponse = await idxResponse.proceed(options.step, values);
|
|
133
|
+
|
|
134
|
+
if (idxResponse.requestDidSucceed === false) {
|
|
135
|
+
return (0, _util.handleFailedResponse)(authClient, idxResponse, options);
|
|
161
136
|
}
|
|
162
|
-
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
idxResponse
|
|
140
|
+
};
|
|
141
|
+
} // With default flow, remediator is not required
|
|
142
|
+
|
|
163
143
|
|
|
164
144
|
if (flow === 'default') {
|
|
165
145
|
return {
|
|
@@ -169,7 +149,7 @@ async function remediate(authClient, idxResponse, values, options) {
|
|
|
169
149
|
|
|
170
150
|
throw new _errors.AuthSdkError(`
|
|
171
151
|
No remediation can match current flow, check policy settings in your org.
|
|
172
|
-
Remediations: [${
|
|
152
|
+
Remediations: [${neededToProceed.reduce((acc, curr) => acc ? acc + ' ,' + curr.name : curr.name, '')}]
|
|
173
153
|
`);
|
|
174
154
|
} // Return next step to the caller
|
|
175
155
|
|
|
@@ -184,34 +164,31 @@ async function remediate(authClient, idxResponse, values, options) {
|
|
|
184
164
|
|
|
185
165
|
const name = remediator.getName();
|
|
186
166
|
const data = remediator.getData();
|
|
167
|
+
idxResponse = await idxResponse.proceed(name, data);
|
|
187
168
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}; // We may want to trim the values bag for the next remediation
|
|
193
|
-
// Let the remediator decide what the values should be (default to current values)
|
|
194
|
-
|
|
195
|
-
values = remediator.getValuesAfterProceed();
|
|
196
|
-
options = { ...options,
|
|
197
|
-
step: undefined
|
|
198
|
-
}; // do not re-use the step
|
|
199
|
-
// generic remediator should not auto proceed in pending status
|
|
200
|
-
// return nextStep directly
|
|
201
|
-
|
|
202
|
-
if (options.useGenericRemediator && !idxResponse.interactionCode && !(0, _util.isTerminalResponse)(idxResponse)) {
|
|
203
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
204
|
-
const gr = (0, _util.getRemediator)(idxResponse.neededToProceed, values, options);
|
|
205
|
-
const nextStep = (0, _util.getNextStep)(authClient, gr, idxResponse);
|
|
206
|
-
return {
|
|
207
|
-
idxResponse,
|
|
208
|
-
nextStep
|
|
209
|
-
};
|
|
210
|
-
}
|
|
169
|
+
if (idxResponse.requestDidSucceed === false) {
|
|
170
|
+
return (0, _util.handleFailedResponse)(authClient, idxResponse, options);
|
|
171
|
+
} // We may want to trim the values bag for the next remediation
|
|
172
|
+
// Let the remediator decide what the values should be (default to current values)
|
|
211
173
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
174
|
+
|
|
175
|
+
values = remediator.getValuesAfterProceed();
|
|
176
|
+
options = { ...options,
|
|
177
|
+
step: undefined
|
|
178
|
+
}; // do not re-use the step
|
|
179
|
+
// generic remediator should not auto proceed in pending status
|
|
180
|
+
// return nextStep directly
|
|
181
|
+
|
|
182
|
+
if (options.useGenericRemediator && !idxResponse.interactionCode && !(0, _util.isTerminalResponse)(idxResponse)) {
|
|
183
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
184
|
+
const gr = (0, _util.getRemediator)(idxResponse.neededToProceed, values, options);
|
|
185
|
+
const nextStep = (0, _util.getNextStep)(authClient, gr, idxResponse);
|
|
186
|
+
return {
|
|
187
|
+
idxResponse,
|
|
188
|
+
nextStep
|
|
189
|
+
};
|
|
215
190
|
}
|
|
191
|
+
|
|
192
|
+
return remediate(authClient, idxResponse, values, options); // recursive call
|
|
216
193
|
}
|
|
217
194
|
//# sourceMappingURL=remediate.js.map
|
package/cjs/idx/remediate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remediate.js","names":["getActionFromValues","values","idxResponse","actions","action","resend","removeActionFromValues","undefined","removeActionFromOptions","options","actionName","entry","name","remediate","authClient","neededToProceed","interactionCode","flow","remediator","getRemediator","actionFromValues","actionFromOptions","params","valuesWithoutExecutedAction","optionsWithoutExecutedAction","requestDidSucceed","e","handleIdxError","canceled","remediationAction","proceed","terminal","isTerminalResponse","step","filterValuesForRemediation","AuthSdkError","acc","curr","canRemediate","nextStep","getNextStep","getName","data","getData","getValuesAfterProceed","useGenericRemediator","gr"],"sources":["../../../lib/idx/remediate.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\n/* eslint-disable max-statements, max-depth, complexity */\nimport { OktaAuthIdxInterface } from '../types';\nimport { AuthSdkError } from '../errors';\nimport { RemediationValues } from './remediators';\nimport { RemediateOptions, RemediationResponse } from './types';\nimport { \n IdxResponse,\n IdxActionParams, \n} from './types/idx-js';\nimport {\n isTerminalResponse,\n filterValuesForRemediation,\n getRemediator,\n getNextStep,\n handleIdxError\n} from './util';\n\nexport interface RemediateActionWithOptionalParams {\n name: string;\n params?: IdxActionParams;\n}\n\nexport type RemediateAction = string | RemediateActionWithOptionalParams;\n\n\nfunction getActionFromValues(values: RemediationValues, idxResponse: IdxResponse): string | undefined {\n // Currently support resend actions only\n return Object.keys(idxResponse.actions).find(action => !!values.resend && action.includes('-resend'));\n}\n\nfunction removeActionFromValues(values: RemediationValues): RemediationValues {\n // Currently support resend actions only\n return {\n ...values,\n resend: undefined\n };\n}\n\nfunction removeActionFromOptions(options: RemediateOptions, actionName: string): RemediateOptions {\n let actions = options.actions || [];\n actions = actions.filter(entry => {\n if (typeof entry === 'string') {\n return entry !== actionName;\n }\n return entry.name !== actionName;\n });\n\n return { ...options, actions };\n}\n\n// This function is called recursively until it reaches success or cannot be remediated\nexport async function remediate(\n authClient: OktaAuthIdxInterface,\n idxResponse: IdxResponse,\n values: RemediationValues,\n options: RemediateOptions\n): Promise<RemediationResponse> {\n let { neededToProceed, interactionCode } = idxResponse;\n const { flow } = options;\n\n // If the response contains an interaction code, there is no need to remediate\n if (interactionCode) {\n return { idxResponse };\n }\n\n const remediator = getRemediator(neededToProceed, values, options);\n\n // Try actions in idxResponse first\n const actionFromValues = getActionFromValues(values, idxResponse);\n const actionFromOptions = options.actions || [];\n const actions = [\n ...actionFromOptions,\n ...(actionFromValues && [actionFromValues] || []),\n ];\n if (actions) {\n for (let action of actions) {\n // Action can either be specified as a string, or as an object with name and optional params\n let params: IdxActionParams = {};\n if (typeof action !== 'string') {\n params = action.params || {};\n action = action.name;\n }\n let valuesWithoutExecutedAction = removeActionFromValues(values);\n let optionsWithoutExecutedAction = removeActionFromOptions(options, action);\n\n if (typeof idxResponse.actions[action] === 'function') {\n try {\n idxResponse = await idxResponse.actions[action](params);\n idxResponse = { ...idxResponse, requestDidSucceed: true };\n } catch (e) {\n return handleIdxError(authClient, e, options);\n }\n if (action === 'cancel') {\n return { idxResponse, canceled: true };\n }\n return remediate(\n authClient, \n idxResponse, \n valuesWithoutExecutedAction, \n optionsWithoutExecutedAction\n ); // recursive call\n }\n\n // search for action in remediation list\n const remediationAction = neededToProceed.find(({ name }) => name === action);\n if (remediationAction) {\n try {\n idxResponse = await idxResponse.proceed(action, params);\n idxResponse = { ...idxResponse, requestDidSucceed: true };\n }\n catch (e) {\n return handleIdxError(authClient, e, options);\n }\n\n return remediate(authClient, idxResponse, values, optionsWithoutExecutedAction); // recursive call\n }\n }\n }\n\n // Do not attempt to remediate if response is in terminal state\n const terminal = isTerminalResponse(idxResponse);\n if (terminal) {\n return { idxResponse, terminal };\n }\n\n if (!remediator) {\n if (options.step) {\n values = filterValuesForRemediation(idxResponse, options.step, values); // include only requested values\n try {\n idxResponse = await idxResponse.proceed(options.step, values);\n idxResponse = { ...idxResponse, requestDidSucceed: true };\n return { idxResponse };\n } catch(e) {\n return handleIdxError(authClient, e, options);\n }\n }\n if (flow === 'default') {\n return { idxResponse };\n }\n throw new AuthSdkError(`\n No remediation can match current flow, check policy settings in your org.\n Remediations: [${neededToProceed.reduce((acc, curr) => acc ? acc + ' ,' + curr.name : curr.name, '')}]\n `);\n }\n\n // Return next step to the caller\n if (!remediator.canRemediate()) {\n const nextStep = getNextStep(authClient, remediator, idxResponse);\n return {\n idxResponse,\n nextStep,\n };\n }\n\n const name = remediator.getName();\n const data = remediator.getData();\n try {\n idxResponse = await idxResponse.proceed(name, data);\n idxResponse = { ...idxResponse, requestDidSucceed: true };\n // We may want to trim the values bag for the next remediation\n // Let the remediator decide what the values should be (default to current values)\n values = remediator.getValuesAfterProceed();\n options = { ...options, step: undefined }; // do not re-use the step\n\n // generic remediator should not auto proceed in pending status\n // return nextStep directly\n if (options.useGenericRemediator && !idxResponse.interactionCode && !isTerminalResponse(idxResponse)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const gr = getRemediator(idxResponse.neededToProceed, values, options)!;\n const nextStep = getNextStep(authClient, gr, idxResponse);\n return {\n idxResponse,\n nextStep,\n };\n }\n \n return remediate(authClient, idxResponse, values, options); // recursive call\n } catch (e) {\n return handleIdxError(authClient, e, options);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA;;AAOA;;AAtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AAyBA,SAASA,mBAAT,CAA6BC,MAA7B,EAAwDC,WAAxD,EAAsG;EAAA;;EACpG;EACA,OAAO,iDAAYA,WAAW,CAACC,OAAxB,kBAAsCC,MAAM,IAAI,CAAC,CAACH,MAAM,CAACI,MAAT,IAAmB,uBAAAD,MAAM,MAAN,CAAAA,MAAM,EAAU,SAAV,CAAzE,CAAP;AACD;;AAED,SAASE,sBAAT,CAAgCL,MAAhC,EAA8E;EAC5E;EACA,OAAO,EACL,GAAGA,MADE;IAELI,MAAM,EAAEE;EAFH,CAAP;AAID;;AAED,SAASC,uBAAT,CAAiCC,OAAjC,EAA4DC,UAA5D,EAAkG;EAChG,IAAIP,OAAO,GAAGM,OAAO,CAACN,OAAR,IAAmB,EAAjC;EACAA,OAAO,GAAG,qBAAAA,OAAO,MAAP,CAAAA,OAAO,EAAQQ,KAAK,IAAI;IAChC,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;MAC7B,OAAOA,KAAK,KAAKD,UAAjB;IACD;;IACD,OAAOC,KAAK,CAACC,IAAN,KAAeF,UAAtB;EACD,CALgB,CAAjB;EAOA,OAAO,EAAE,GAAGD,OAAL;IAAcN;EAAd,CAAP;AACD,C,CAED;;;AACO,eAAeU,SAAf,CACLC,UADK,EAELZ,WAFK,EAGLD,MAHK,EAILQ,OAJK,EAKyB;EAC9B,IAAI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AAcwB,IAAI,EAAE1B;IAApB,CAAV,CANE,CAMyC;IAE3C;IACA;;IACA,IAAIE,OAAO,CAACoC,oBAAR,IAAgC,CAAC3C,WAAW,CAACc,eAA7C,IAAgE,CAAC,IAAAgB,wBAAA,EAAmB9B,WAAnB,CAArE,EAAsG;MACpG;MACA,MAAM4C,EAAE,GAAG,IAAA3B,mBAAA,EAAcjB,WAAW,CAACa,eAA1B,EAA2Cd,MAA3C,EAAmDQ,OAAnD,CAAX;MACA,MAAM8B,QAAQ,GAAG,IAAAC,iBAAA,EAAY1B,UAAZ,EAAwBgC,EAAxB,EAA4B5C,WAA5B,CAAjB;MACA,OAAO;QACLA,WADK;QAELqC;MAFK,CAAP;IAID;;IAED,OAAO1B,SAAS,CAACC,UAAD,EAAaZ,WAAb,EAA0BD,MAA1B,EAAkCQ,OAAlC,CAAhB,CApBE,CAoB0D;EAC7D,CArBD,CAqBE,OAAOiB,CAAP,EAAU;IACV,OAAO,IAAAC,oBAAA,EAAeb,UAAf,EAA2BY,CAA3B,EAA8BjB,OAA9B,CAAP;EACD;AACF"}
|
|
1
|
+
{"version":3,"file":"remediate.js","names":["getActionFromValues","values","idxResponse","Object","keys","actions","find","action","resend","includes","removeActionFromValues","undefined","removeActionFromOptions","options","actionName","filter","entry","name","remediate","authClient","neededToProceed","interactionCode","flow","remediator","getRemediator","actionFromValues","actionFromOptions","params","valuesWithoutExecutedAction","optionsWithoutExecutedAction","requestDidSucceed","handleFailedResponse","canceled","remediationAction","proceed","terminal","isTerminalResponse","step","filterValuesForRemediation","AuthSdkError","reduce","acc","curr","canRemediate","nextStep","getNextStep","getName","data","getData","getValuesAfterProceed","useGenericRemediator","gr"],"sources":["../../../lib/idx/remediate.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\n/* eslint-disable max-statements, max-depth, complexity */\nimport { AuthSdkError } from '../errors';\nimport { RemediationValues } from './remediators';\nimport { OktaAuthIdxInterface, RemediateOptions, RemediationResponse } from './types';\nimport { \n IdxResponse,\n IdxActionParams, \n} from './types/idx-js';\nimport {\n isTerminalResponse,\n filterValuesForRemediation,\n getRemediator,\n getNextStep,\n handleFailedResponse\n} from './util';\n\nexport interface RemediateActionWithOptionalParams {\n name: string;\n params?: IdxActionParams;\n}\n\nexport type RemediateAction = string | RemediateActionWithOptionalParams;\n\n\nfunction getActionFromValues(values: RemediationValues, idxResponse: IdxResponse): string | undefined {\n // Currently support resend actions only\n return Object.keys(idxResponse.actions).find(action => !!values.resend && action.includes('-resend'));\n}\n\nfunction removeActionFromValues(values: RemediationValues): RemediationValues {\n // Currently support resend actions only\n return {\n ...values,\n resend: undefined\n };\n}\n\nfunction removeActionFromOptions(options: RemediateOptions, actionName: string): RemediateOptions {\n let actions = options.actions || [];\n actions = actions.filter(entry => {\n if (typeof entry === 'string') {\n return entry !== actionName;\n }\n return entry.name !== actionName;\n });\n\n return { ...options, actions };\n}\n\n// This function is called recursively until it reaches success or cannot be remediated\nexport async function remediate(\n authClient: OktaAuthIdxInterface,\n idxResponse: IdxResponse,\n values: RemediationValues,\n options: RemediateOptions\n): Promise<RemediationResponse> {\n let { neededToProceed, interactionCode } = idxResponse;\n const { flow } = options;\n\n // If the response contains an interaction code, there is no need to remediate\n if (interactionCode) {\n return { idxResponse };\n }\n\n const remediator = getRemediator(neededToProceed, values, options);\n\n // Try actions in idxResponse first\n const actionFromValues = getActionFromValues(values, idxResponse);\n const actionFromOptions = options.actions || [];\n const actions = [\n ...actionFromOptions,\n ...(actionFromValues && [actionFromValues] || []),\n ];\n if (actions) {\n for (let action of actions) {\n // Action can either be specified as a string, or as an object with name and optional params\n let params: IdxActionParams = {};\n if (typeof action !== 'string') {\n params = action.params || {};\n action = action.name;\n }\n let valuesWithoutExecutedAction = removeActionFromValues(values);\n let optionsWithoutExecutedAction = removeActionFromOptions(options, action);\n\n if (typeof idxResponse.actions[action] === 'function') {\n idxResponse = await idxResponse.actions[action](params);\n if (idxResponse.requestDidSucceed === false) {\n return handleFailedResponse(authClient, idxResponse, options);\n }\n if (action === 'cancel') {\n return { idxResponse, canceled: true };\n }\n return remediate(\n authClient, \n idxResponse, \n valuesWithoutExecutedAction, \n optionsWithoutExecutedAction\n ); // recursive call\n }\n\n // search for action in remediation list\n const remediationAction = neededToProceed.find(({ name }) => name === action);\n if (remediationAction) {\n idxResponse = await idxResponse.proceed(action, params);\n if (idxResponse.requestDidSucceed === false) {\n return handleFailedResponse(authClient, idxResponse, options);\n }\n return remediate(authClient, idxResponse, values, optionsWithoutExecutedAction); // recursive call\n }\n }\n }\n\n // Do not attempt to remediate if response is in terminal state\n const terminal = isTerminalResponse(idxResponse);\n if (terminal) {\n return { idxResponse, terminal };\n }\n\n if (!remediator) {\n // With options.step, remediator is not required\n if (options.step) {\n values = filterValuesForRemediation(idxResponse, options.step, values); // include only requested values\n idxResponse = await idxResponse.proceed(options.step, values);\n if (idxResponse.requestDidSucceed === false) {\n return handleFailedResponse(authClient, idxResponse, options);\n }\n return { idxResponse };\n }\n\n // With default flow, remediator is not required\n if (flow === 'default') {\n return { idxResponse };\n }\n throw new AuthSdkError(`\n No remediation can match current flow, check policy settings in your org.\n Remediations: [${neededToProceed.reduce((acc, curr) => acc ? acc + ' ,' + curr.name : curr.name, '')}]\n `);\n }\n\n // Return next step to the caller\n if (!remediator.canRemediate()) {\n const nextStep = getNextStep(authClient, remediator, idxResponse);\n return {\n idxResponse,\n nextStep,\n };\n }\n\n const name = remediator.getName();\n const data = remediator.getData();\n\n idxResponse = await idxResponse.proceed(name, data);\n if (idxResponse.requestDidSucceed === false) {\n return handleFailedResponse(authClient, idxResponse, options);\n }\n // We may want to trim the values bag for the next remediation\n // Let the remediator decide what the values should be (default to current values)\n values = remediator.getValuesAfterProceed();\n options = { ...options, step: undefined }; // do not re-use the step\n\n // generic remediator should not auto proceed in pending status\n // return nextStep directly\n if (options.useGenericRemediator && !idxResponse.interactionCode && !isTerminalResponse(idxResponse)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const gr = getRemediator(idxResponse.neededToProceed, values, options)!;\n const nextStep = getNextStep(authClient, gr, idxResponse);\n return {\n idxResponse,\n nextStep,\n };\n }\n \n return remediate(authClient, idxResponse, values, options); // recursive call\n\n}\n"],"mappings":";;;;AAcA;;AAOA;;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AAwBA,SAASA,mBAAT,CAA6BC,MAA7B,EAAwDC,WAAxD,EAAsG;EACpG;EACA,OAAOC,MAAM,CAACC,IAAP,CAAYF,WAAW,CAACG,OAAxB,EAAiCC,IAAjC,CAAsCC,MAAM,IAAI,CAAC,CAACN,MAAM,CAACO,MAAT,IAAmBD,MAAM,CAACE,QAAP,CAAgB,SAAhB,CAAnE,CAAP;AACD;;AAED,SAASC,sBAAT,CAAgCT,MAAhC,EAA8E;EAC5E;EACA,OAAO,EACL,GAAGA,MADE;IAELO,MAAM,EAAEG;EAFH,CAAP;AAID;;AAED,SAASC,uBAAT,CAAiCC,OAAjC,EAA4DC,UAA5D,EAAkG;EAChG,IAAIT,OAAO,GAAGQ,OAAO,CAACR,OAAR,IAAmB,EAAjC;EACAA,OAAO,GAAGA,OAAO,CAACU,MAAR,CAAeC,KAAK,IAAI;IAChC,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;MAC7B,OAAOA,KAAK,KAAKF,UAAjB;IACD;;IACD,OAAOE,KAAK,CAACC,IAAN,KAAeH,UAAtB;EACD,CALS,CAAV;EAOA,OAAO,EAAE,GAAGD,OAAL;IAAcR;EAAd,CAAP;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AAE1B;EAApB,CAAV,CAvG8B,CAuGa;EAE3C;EACA;;EACA,IAAIE,OAAO,CAACqC,oBAAR,IAAgC,CAAChD,WAAW,CAACmB,eAA7C,IAAgE,CAAC,IAAAe,wBAAA,EAAmBlC,WAAnB,CAArE,EAAsG;IACpG;IACA,MAAMiD,EAAE,GAAG,IAAA3B,mBAAA,EAActB,WAAW,CAACkB,eAA1B,EAA2CnB,MAA3C,EAAmDY,OAAnD,CAAX;IACA,MAAM+B,QAAQ,GAAG,IAAAC,iBAAA,EAAY1B,UAAZ,EAAwBgC,EAAxB,EAA4BjD,WAA5B,CAAjB;IACA,OAAO;MACLA,WADK;MAEL0C;IAFK,CAAP;EAID;;EAED,OAAO1B,SAAS,CAACC,UAAD,EAAajB,WAAb,EAA0BD,MAA1B,EAAkCY,OAAlC,CAAhB,CArH8B,CAqH8B;AAE7D"}
|
|
@@ -1,16 +1,10 @@
|
|
|
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.AuthenticatorEnrollmentData = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
10
|
-
|
|
11
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
|
|
12
|
-
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
8
|
|
|
15
9
|
var _AuthenticatorData = require("./Base/AuthenticatorData");
|
|
16
10
|
|
|
@@ -31,12 +25,10 @@ var _util = require("./util");
|
|
|
31
25
|
*/
|
|
32
26
|
class AuthenticatorEnrollmentData extends _AuthenticatorData.AuthenticatorData {
|
|
33
27
|
mapAuthenticator() {
|
|
34
|
-
var _context;
|
|
35
|
-
|
|
36
28
|
const authenticatorData = this.getAuthenticatorData();
|
|
37
29
|
const authenticatorFromRemediation = (0, _util.getAuthenticatorFromRemediation)(this.remediation);
|
|
38
30
|
return {
|
|
39
|
-
id:
|
|
31
|
+
id: authenticatorFromRemediation.form.value.find(({
|
|
40
32
|
name
|
|
41
33
|
}) => name === 'id').value,
|
|
42
34
|
methodType: authenticatorData.methodType,
|
|
@@ -45,19 +37,15 @@ class AuthenticatorEnrollmentData extends _AuthenticatorData.AuthenticatorData {
|
|
|
45
37
|
}
|
|
46
38
|
|
|
47
39
|
getInputAuthenticator(remediation) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return (0, _map.default)(_context2 = [{
|
|
40
|
+
return [{
|
|
51
41
|
name: 'methodType',
|
|
52
42
|
type: 'string'
|
|
53
43
|
}, {
|
|
54
44
|
name: 'phoneNumber',
|
|
55
45
|
label: 'Phone Number',
|
|
56
46
|
type: 'string'
|
|
57
|
-
}]
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const value = (0, _find.default)(_context3 = remediation.form.value).call(_context3, val => val.name === item.name);
|
|
47
|
+
}].map(item => {
|
|
48
|
+
const value = remediation.form.value.find(val => val.name === item.name);
|
|
61
49
|
return { ...value,
|
|
62
50
|
...item
|
|
63
51
|
};
|
|
@@ -70,7 +58,7 @@ class AuthenticatorEnrollmentData extends _AuthenticatorData.AuthenticatorData {
|
|
|
70
58
|
|
|
71
59
|
const {
|
|
72
60
|
phoneNumber
|
|
73
|
-
} =
|
|
61
|
+
} = this.values;
|
|
74
62
|
|
|
75
63
|
if (!data && !phoneNumber) {
|
|
76
64
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticatorEnrollmentData.js","names":["AuthenticatorEnrollmentData","AuthenticatorData","mapAuthenticator","authenticatorData","getAuthenticatorData","authenticatorFromRemediation","getAuthenticatorFromRemediation","remediation","id","form","value","name","methodType","phoneNumber","getInputAuthenticator","type","label","item","val","mapAuthenticatorDataFromValues","data"],"sources":["../../../../lib/idx/remediators/AuthenticatorEnrollmentData.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { AuthenticatorData, AuthenticatorDataValues } from './Base/AuthenticatorData';\nimport { getAuthenticatorFromRemediation } from './util';\n\nexport type AuthenticatorEnrollmentDataValues = AuthenticatorDataValues & {\n phoneNumber?: string;\n resend?: boolean; // resend is not a remediator value - revise when IdxResponse structure is updated\n}\nexport class AuthenticatorEnrollmentData extends AuthenticatorData<AuthenticatorEnrollmentDataValues> {\n static remediationName = 'authenticator-enrollment-data';\n\n mapAuthenticator() {\n const authenticatorData = this.getAuthenticatorData();\n const authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation)!;\n return { \n id: authenticatorFromRemediation.form!.value\n .find(({ name }) => name === 'id')!.value,\n methodType: authenticatorData!.methodType,\n phoneNumber: authenticatorData!.phoneNumber,\n };\n }\n\n getInputAuthenticator(remediation) {\n return [\n { name: 'methodType', type: 'string' }, \n { name: 'phoneNumber', label: 'Phone Number', type: 'string' }\n ].map(item => {\n const value = remediation.form.value.find(val => val.name === item.name);\n return { ...value, ...item };\n });\n }\n\n protected mapAuthenticatorDataFromValues(data?) {\n // get mapped authenticator from base class\n data = super.mapAuthenticatorDataFromValues(data);\n // add phoneNumber to authenticator if it exists in values\n const { phoneNumber } = this.values;\n if (!data && !phoneNumber) {\n return;\n }\n\n return { \n ...(data && data), \n ...(phoneNumber && { phoneNumber }) \n };\n }\n\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthenticatorEnrollmentData.js","names":["AuthenticatorEnrollmentData","AuthenticatorData","mapAuthenticator","authenticatorData","getAuthenticatorData","authenticatorFromRemediation","getAuthenticatorFromRemediation","remediation","id","form","value","find","name","methodType","phoneNumber","getInputAuthenticator","type","label","map","item","val","mapAuthenticatorDataFromValues","data","values"],"sources":["../../../../lib/idx/remediators/AuthenticatorEnrollmentData.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { AuthenticatorData, AuthenticatorDataValues } from './Base/AuthenticatorData';\nimport { getAuthenticatorFromRemediation } from './util';\n\nexport type AuthenticatorEnrollmentDataValues = AuthenticatorDataValues & {\n phoneNumber?: string;\n resend?: boolean; // resend is not a remediator value - revise when IdxResponse structure is updated\n}\nexport class AuthenticatorEnrollmentData extends AuthenticatorData<AuthenticatorEnrollmentDataValues> {\n static remediationName = 'authenticator-enrollment-data';\n\n mapAuthenticator() {\n const authenticatorData = this.getAuthenticatorData();\n const authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation)!;\n return { \n id: authenticatorFromRemediation.form!.value\n .find(({ name }) => name === 'id')!.value,\n methodType: authenticatorData!.methodType,\n phoneNumber: authenticatorData!.phoneNumber,\n };\n }\n\n getInputAuthenticator(remediation) {\n return [\n { name: 'methodType', type: 'string' }, \n { name: 'phoneNumber', label: 'Phone Number', type: 'string' }\n ].map(item => {\n const value = remediation.form.value.find(val => val.name === item.name);\n return { ...value, ...item };\n });\n }\n\n protected mapAuthenticatorDataFromValues(data?) {\n // get mapped authenticator from base class\n data = super.mapAuthenticatorDataFromValues(data);\n // add phoneNumber to authenticator if it exists in values\n const { phoneNumber } = this.values;\n if (!data && !phoneNumber) {\n return;\n }\n\n return { \n ...(data && data), \n ...(phoneNumber && { phoneNumber }) \n };\n }\n\n}\n"],"mappings":";;;;;;;;AAcA;;AACA;;AAfA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUO,MAAMA,2BAAN,SAA0CC,oCAA1C,CAA+F;EAGpGC,gBAAgB,GAAG;IACjB,MAAMC,iBAAiB,GAAG,KAAKC,oBAAL,EAA1B;IACA,MAAMC,4BAA4B,GAAG,IAAAC,qCAAA,EAAgC,KAAKC,WAArC,CAArC;IACA,OAAO;MACLC,EAAE,EAAEH,4BAA4B,CAACI,IAA7B,CAAmCC,KAAnC,CACDC,IADC,CACI,CAAC;QAAEC;MAAF,CAAD,KAAcA,IAAI,KAAK,IAD3B,EACkCF,KAFjC;MAGLG,UAAU,EAAEV,iBAAiB,CAAEU,UAH1B;MAILC,WAAW,EAAEX,iBAAiB,CAAEW;IAJ3B,CAAP;EAMD;;EAEDC,qBAAqB,CAACR,WAAD,EAAc;IACjC,OAAO,CACL;MAAEK,IAAI,EAAE,YAAR;MAAsBI,IAAI,EAAE;IAA5B,CADK,EAEL;MAAEJ,IAAI,EAAE,aAAR;MAAuBK,KAAK,EAAE,cAA9B;MAA8CD,IAAI,EAAE;IAApD,CAFK,EAGLE,GAHK,CAGDC,IAAI,IAAI;MACZ,MAAMT,KAAK,GAAGH,WAAW,CAACE,IAAZ,CAAiBC,KAAjB,CAAuBC,IAAvB,CAA4BS,GAAG,IAAIA,GAAG,CAACR,IAAJ,KAAaO,IAAI,CAACP,IAArD,CAAd;MACA,OAAO,EAAE,GAAGF,KAAL;QAAY,GAAGS;MAAf,CAAP;IACD,CANM,CAAP;EAOD;;EAESE,8BAA8B,CAACC,IAAD,EAAQ;IAC9C;IACAA,IAAI,GAAG,MAAMD,8BAAN,CAAqCC,IAArC,CAAP,CAF8C,CAG9C;;IACA,MAAM;MAAER;IAAF,IAAkB,KAAKS,MAA7B;;IACA,IAAI,CAACD,IAAD,IAAS,CAACR,WAAd,EAA2B;MACzB;IACD;;IAED,OAAO,EACL,IAAIQ,IAAI,IAAIA,IAAZ,CADK;MAEL,IAAIR,WAAW,IAAI;QAAEA;MAAF,CAAnB;IAFK,CAAP;EAID;;AArCmG;;;8BAAzFd,2B,qBACc,+B"}
|
|
@@ -1,22 +1,10 @@
|
|
|
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.AuthenticatorVerificationData = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
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 _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
|
|
16
|
-
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
18
|
-
|
|
19
|
-
var _errors = require("../../errors");
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
8
|
|
|
21
9
|
var _AuthenticatorData = require("./Base/AuthenticatorData");
|
|
22
10
|
|
|
@@ -34,49 +22,13 @@ var _AuthenticatorData = require("./Base/AuthenticatorData");
|
|
|
34
22
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
35
23
|
*/
|
|
36
24
|
class AuthenticatorVerificationData extends _AuthenticatorData.AuthenticatorData {
|
|
37
|
-
// will be removed in next major version
|
|
38
|
-
constructor(remediation, values = {}, options = {}) {
|
|
39
|
-
super(remediation, values); // will be removed in next major version
|
|
40
|
-
|
|
41
|
-
this.shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator !== false && this.authenticator.methods.length === 1 && this.authenticator.methods[0].type === 'email';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
canRemediate() {
|
|
45
|
-
// auto proceed if there is only one method (will be removed in next major version)
|
|
46
|
-
if (this.shouldProceedWithEmailAuthenticator !== false) {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return super.canRemediate();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
25
|
mapAuthenticator() {
|
|
54
|
-
// auto proceed with the only methodType option
|
|
55
|
-
if (this.shouldProceedWithEmailAuthenticator !== false) {
|
|
56
|
-
var _authenticatorFromRem, _context;
|
|
57
|
-
|
|
58
|
-
const authenticatorFromRemediation = this.getAuthenticatorFromRemediation();
|
|
59
|
-
return (_authenticatorFromRem = authenticatorFromRemediation.form) === null || _authenticatorFromRem === void 0 ? void 0 : (0, _reduce.default)(_context = _authenticatorFromRem.value).call(_context, (acc, curr) => {
|
|
60
|
-
if (curr.value) {
|
|
61
|
-
acc[curr.name] = curr.value;
|
|
62
|
-
} else if (curr.options) {
|
|
63
|
-
acc[curr.name] = curr.options[0].value;
|
|
64
|
-
} else {
|
|
65
|
-
throw new _errors.AuthSdkError(`Unsupported authenticator data type: ${curr}`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return acc;
|
|
69
|
-
}, {});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
26
|
return this.getAuthenticatorData();
|
|
73
27
|
}
|
|
74
28
|
|
|
75
29
|
getInputAuthenticator() {
|
|
76
|
-
var _context2;
|
|
77
|
-
|
|
78
30
|
const authenticator = this.getAuthenticatorFromRemediation();
|
|
79
|
-
const methodType =
|
|
31
|
+
const methodType = authenticator.form.value.find(({
|
|
80
32
|
name
|
|
81
33
|
}) => name === 'methodType'); // if has methodType in form, let user select the methodType
|
|
82
34
|
|
|
@@ -95,12 +47,10 @@ class AuthenticatorVerificationData extends _AuthenticatorData.AuthenticatorData
|
|
|
95
47
|
}
|
|
96
48
|
|
|
97
49
|
getValuesAfterProceed() {
|
|
98
|
-
var _context3;
|
|
99
|
-
|
|
100
50
|
this.values = super.getValuesAfterProceed();
|
|
101
|
-
let trimmedValues =
|
|
102
|
-
return
|
|
103
|
-
[valueKey]:
|
|
51
|
+
let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'authenticator');
|
|
52
|
+
return trimmedValues.reduce((values, valueKey) => ({ ...values,
|
|
53
|
+
[valueKey]: this.values[valueKey]
|
|
104
54
|
}), {});
|
|
105
55
|
}
|
|
106
56
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticatorVerificationData.js","names":["AuthenticatorVerificationData","AuthenticatorData","
|
|
1
|
+
{"version":3,"file":"AuthenticatorVerificationData.js","names":["AuthenticatorVerificationData","AuthenticatorData","mapAuthenticator","getAuthenticatorData","getInputAuthenticator","authenticator","getAuthenticatorFromRemediation","methodType","form","value","find","name","options","type","required","inputs","getValuesAfterProceed","values","trimmedValues","Object","keys","filter","valueKey","reduce"],"sources":["../../../../lib/idx/remediators/AuthenticatorVerificationData.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { AuthenticatorData, AuthenticatorDataValues } from './Base/AuthenticatorData';\n\nexport type AuthenticatorVerificationDataValues = AuthenticatorDataValues;\n\nexport class AuthenticatorVerificationData extends AuthenticatorData<AuthenticatorVerificationDataValues> {\n static remediationName = 'authenticator-verification-data';\n\n mapAuthenticator() {\n return this.getAuthenticatorData();\n }\n\n getInputAuthenticator() {\n const authenticator = this.getAuthenticatorFromRemediation();\n const methodType = authenticator.form!.value.find(({ name }) => name === 'methodType');\n // if has methodType in form, let user select the methodType\n if (methodType && methodType.options) {\n return { \n name: 'methodType', \n type: 'string', \n required: true, \n options: methodType.options \n };\n }\n // no methodType, then return form values\n const inputs = [...authenticator.form!.value];\n return inputs;\n }\n\n getValuesAfterProceed(): AuthenticatorVerificationDataValues {\n this.values = super.getValuesAfterProceed();\n let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'authenticator');\n return trimmedValues.reduce((values, valueKey) => ({...values, [valueKey]: this.values[valueKey]}), {});\n }\n}\n"],"mappings":";;;;;;;;AAaA;;AAbA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,MAAMA,6BAAN,SAA4CC,oCAA5C,CAAmG;EAGxGC,gBAAgB,GAAG;IACjB,OAAO,KAAKC,oBAAL,EAAP;EACD;;EAEDC,qBAAqB,GAAG;IACtB,MAAMC,aAAa,GAAG,KAAKC,+BAAL,EAAtB;IACA,MAAMC,UAAU,GAAGF,aAAa,CAACG,IAAd,CAAoBC,KAApB,CAA0BC,IAA1B,CAA+B,CAAC;MAAEC;IAAF,CAAD,KAAcA,IAAI,KAAK,YAAtD,CAAnB,CAFsB,CAGtB;;IACA,IAAIJ,UAAU,IAAIA,UAAU,CAACK,OAA7B,EAAsC;MACpC,OAAO;QACLD,IAAI,EAAE,YADD;QAELE,IAAI,EAAE,QAFD;QAGLC,QAAQ,EAAE,IAHL;QAILF,OAAO,EAAEL,UAAU,CAACK;MAJf,CAAP;IAMD,CAXqB,CAYtB;;;IACA,MAAMG,MAAM,GAAG,CAAC,GAAGV,aAAa,CAACG,IAAd,CAAoBC,KAAxB,CAAf;IACA,OAAOM,MAAP;EACD;;EAEDC,qBAAqB,GAAwC;IAC3D,KAAKC,MAAL,GAAc,MAAMD,qBAAN,EAAd;IACA,IAAIE,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKH,MAAjB,EAAyBI,MAAzB,CAAgCC,QAAQ,IAAIA,QAAQ,KAAK,eAAzD,CAApB;IACA,OAAOJ,aAAa,CAACK,MAAd,CAAqB,CAACN,MAAD,EAASK,QAAT,MAAuB,EAAC,GAAGL,MAAJ;MAAY,CAACK,QAAD,GAAY,KAAKL,MAAL,CAAYK,QAAZ;IAAxB,CAAvB,CAArB,EAA6F,EAA7F,CAAP;EACD;;AA5BuG;;;8BAA7FtB,6B,qBACc,iC"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.AuthenticatorData = void 0;
|
|
6
4
|
|
|
7
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
|
|
8
|
-
|
|
9
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
10
|
-
|
|
11
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
12
|
-
|
|
13
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
14
|
-
|
|
15
5
|
var _Remediator = require("./Remediator");
|
|
16
6
|
|
|
17
|
-
var
|
|
7
|
+
var _api = require("../../types/api");
|
|
18
8
|
|
|
19
9
|
var _util = require("../../authenticator/util");
|
|
20
10
|
|
|
@@ -44,9 +34,7 @@ class AuthenticatorData extends _Remediator.Remediator {
|
|
|
44
34
|
const authenticatorData = this.getAuthenticatorData();
|
|
45
35
|
|
|
46
36
|
if (authenticatorData) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(0, _values.default)(this).authenticatorsData = (0, _map.default)(_context = (0, _values.default)(this).authenticatorsData).call(_context, data => {
|
|
37
|
+
this.values.authenticatorsData = this.values.authenticatorsData.map(data => {
|
|
50
38
|
if ((0, _util.compareAuthenticators)(this.authenticator, data)) {
|
|
51
39
|
return this.mapAuthenticatorDataFromValues(data);
|
|
52
40
|
}
|
|
@@ -57,30 +45,17 @@ class AuthenticatorData extends _Remediator.Remediator {
|
|
|
57
45
|
const data = this.mapAuthenticatorDataFromValues();
|
|
58
46
|
|
|
59
47
|
if (data) {
|
|
60
|
-
|
|
48
|
+
this.values.authenticatorsData.push(data);
|
|
61
49
|
}
|
|
62
50
|
}
|
|
63
51
|
}
|
|
64
52
|
|
|
65
53
|
getAuthenticatorData() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return (0, _find.default)(_context2 = (0, _values.default)(this).authenticatorsData).call(_context2, data => (0, _util.compareAuthenticators)(this.authenticator, data));
|
|
54
|
+
return this.values.authenticatorsData.find(data => (0, _util.compareAuthenticators)(this.authenticator, data));
|
|
69
55
|
}
|
|
70
56
|
|
|
71
57
|
canRemediate() {
|
|
72
|
-
return
|
|
73
|
-
} // TODO: remove this override method in the next major version - OKTA-491236
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
getNextStep(authClient) {
|
|
77
|
-
const common = super.getNextStep(authClient);
|
|
78
|
-
const options = this.getMethodTypes();
|
|
79
|
-
return { ...common,
|
|
80
|
-
...(options && {
|
|
81
|
-
options
|
|
82
|
-
})
|
|
83
|
-
};
|
|
58
|
+
return this.values.authenticatorsData.some(data => (0, _util.compareAuthenticators)(this.authenticator, data));
|
|
84
59
|
}
|
|
85
60
|
|
|
86
61
|
mapAuthenticatorDataFromValues(authenticatorData) {
|
|
@@ -88,9 +63,9 @@ class AuthenticatorData extends _Remediator.Remediator {
|
|
|
88
63
|
let {
|
|
89
64
|
methodType,
|
|
90
65
|
authenticator
|
|
91
|
-
} =
|
|
66
|
+
} = this.values;
|
|
92
67
|
|
|
93
|
-
if (!methodType && (0,
|
|
68
|
+
if (!methodType && (0, _api.isAuthenticator)(authenticator)) {
|
|
94
69
|
methodType = authenticator === null || authenticator === void 0 ? void 0 : authenticator.methodType;
|
|
95
70
|
}
|
|
96
71
|
|
|
@@ -110,30 +85,17 @@ class AuthenticatorData extends _Remediator.Remediator {
|
|
|
110
85
|
}
|
|
111
86
|
|
|
112
87
|
getAuthenticatorFromRemediation() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const authenticator = (0, _find.default)(_context3 = this.remediation.value).call(_context3, ({
|
|
88
|
+
const authenticator = this.remediation.value.find(({
|
|
116
89
|
name
|
|
117
90
|
}) => name === 'authenticator');
|
|
118
91
|
return authenticator;
|
|
119
92
|
}
|
|
120
93
|
|
|
121
|
-
getMethodTypes() {
|
|
122
|
-
var _value$find, _context4;
|
|
123
|
-
|
|
124
|
-
const authenticator = this.getAuthenticatorFromRemediation();
|
|
125
|
-
return (_value$find = (0, _find.default)(_context4 = authenticator.form.value).call(_context4, ({
|
|
126
|
-
name
|
|
127
|
-
}) => name === 'methodType')) === null || _value$find === void 0 ? void 0 : _value$find.options;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
94
|
getValuesAfterProceed() {
|
|
131
|
-
var _context5;
|
|
132
|
-
|
|
133
95
|
this.values = super.getValuesAfterProceed(); // remove used authenticatorData
|
|
134
96
|
|
|
135
|
-
const authenticatorsData =
|
|
136
|
-
return { ...
|
|
97
|
+
const authenticatorsData = this.values.authenticatorsData.filter(data => (0, _util.compareAuthenticators)(this.authenticator, data) !== true);
|
|
98
|
+
return { ...this.values,
|
|
137
99
|
authenticatorsData
|
|
138
100
|
};
|
|
139
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticatorData.js","names":["AuthenticatorData","Remediator","constructor","remediation","values","authenticator","getAuthenticator","formatAuthenticatorData","authenticatorData","getAuthenticatorData","authenticatorsData","data","compareAuthenticators","mapAuthenticatorDataFromValues","push","
|
|
1
|
+
{"version":3,"file":"AuthenticatorData.js","names":["AuthenticatorData","Remediator","constructor","remediation","values","authenticator","getAuthenticator","formatAuthenticatorData","authenticatorData","getAuthenticatorData","authenticatorsData","map","data","compareAuthenticators","mapAuthenticatorDataFromValues","push","find","canRemediate","some","methodType","isAuthenticator","id","enrollmentId","getAuthenticatorFromRemediation","value","name","getValuesAfterProceed","filter"],"sources":["../../../../../lib/idx/remediators/Base/AuthenticatorData.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Remediator, RemediationValues } from './Remediator';\nimport { IdxRemediationValue, IdxRemediation, IdxAuthenticator } from '../../types/idx-js';\nimport { isAuthenticator } from '../../types/api';\nimport { compareAuthenticators } from '../../authenticator/util';\n\nexport type AuthenticatorDataValues = RemediationValues & {\n methodType?: string;\n};\n\n// Base class - DO NOT expose static remediationName\nexport class AuthenticatorData<T extends AuthenticatorDataValues = AuthenticatorDataValues> extends Remediator<T> {\n authenticator: IdxAuthenticator;\n\n constructor(remediation: IdxRemediation, values: T = {} as T) {\n super(remediation, values);\n\n // set before other data calculation\n this.authenticator = this.getAuthenticator()!;\n\n this.formatAuthenticatorData();\n }\n\n protected formatAuthenticatorData() {\n const authenticatorData = this.getAuthenticatorData();\n if (authenticatorData) {\n this.values.authenticatorsData = this.values.authenticatorsData!.map(data => {\n if (compareAuthenticators(this.authenticator, data)) {\n return this.mapAuthenticatorDataFromValues(data);\n }\n return data;\n });\n } else {\n const data = this.mapAuthenticatorDataFromValues();\n if (data) {\n this.values.authenticatorsData!.push(data);\n }\n }\n }\n\n protected getAuthenticatorData() {\n return this.values.authenticatorsData!\n .find((data) => compareAuthenticators(this.authenticator, data));\n }\n\n canRemediate() {\n return this.values.authenticatorsData!\n .some(data => compareAuthenticators(this.authenticator, data));\n }\n\n protected mapAuthenticatorDataFromValues(authenticatorData?) {\n // add methodType to authenticatorData if it exists in values\n let { methodType, authenticator } = this.values;\n if (!methodType && isAuthenticator(authenticator)) {\n methodType = authenticator?.methodType;\n }\n \n const { id, enrollmentId } = this.authenticator;\n const data = { \n id,\n enrollmentId,\n ...(authenticatorData && authenticatorData),\n ...(methodType && { methodType }) \n };\n\n return data.methodType ? data : null;\n }\n\n protected getAuthenticatorFromRemediation(): IdxRemediationValue {\n const authenticator = this.remediation.value!\n .find(({ name }) => name === 'authenticator') as IdxRemediationValue;\n return authenticator;\n }\n\n getValuesAfterProceed(): T {\n this.values = super.getValuesAfterProceed();\n // remove used authenticatorData\n const authenticatorsData = this.values.authenticatorsData!\n .filter(data => compareAuthenticators(this.authenticator, data) !== true);\n return { ...this.values, authenticatorsData };\n }\n}\n"],"mappings":";;;;AAaA;;AAEA;;AACA;;AAhBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWA;AACO,MAAMA,iBAAN,SAA6FC,sBAA7F,CAA2G;EAGhHC,WAAW,CAACC,WAAD,EAA8BC,MAAS,GAAG,EAA1C,EAAmD;IAC5D,MAAMD,WAAN,EAAmBC,MAAnB,EAD4D,CAG5D;;IACA,KAAKC,aAAL,GAAqB,KAAKC,gBAAL,EAArB;IAEA,KAAKC,uBAAL;EACD;;EAESA,uBAAuB,GAAG;I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