@okta/okta-auth-js 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +2 -0
- package/cjs/authn/AuthnTransactionImpl.js +6 -8
- package/cjs/authn/AuthnTransactionImpl.js.map +1 -1
- package/cjs/authn/api.js +3 -18
- package/cjs/authn/api.js.map +1 -1
- package/cjs/authn/factory.js +1 -7
- package/cjs/authn/factory.js.map +1 -1
- package/cjs/authn/index.js +0 -5
- package/cjs/authn/index.js.map +1 -1
- package/cjs/authn/mixin.js +14 -22
- package/cjs/authn/mixin.js.map +1 -1
- package/cjs/authn/util/flattenEmbedded.js +5 -12
- package/cjs/authn/util/flattenEmbedded.js.map +1 -1
- package/cjs/authn/util/link2fn.js +0 -22
- package/cjs/authn/util/link2fn.js.map +1 -1
- package/cjs/authn/util/links2fns.js +0 -12
- package/cjs/authn/util/links2fns.js.map +1 -1
- package/cjs/authn/util/poll.js +9 -27
- package/cjs/authn/util/poll.js.map +1 -1
- package/cjs/authn/util/stateToken.js +3 -4
- package/cjs/authn/util/stateToken.js.map +1 -1
- package/cjs/base/factory.js +6 -14
- package/cjs/base/factory.js.map +1 -1
- package/cjs/base/index.js +0 -5
- package/cjs/base/index.js.map +1 -1
- package/cjs/base/options.js +1 -2
- package/cjs/base/options.js.map +1 -1
- package/cjs/browser/browserStorage.js +15 -43
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +3 -15
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/clock.js +5 -7
- package/cjs/clock.js.map +1 -1
- package/cjs/constants.js +4 -3
- package/cjs/constants.js.map +1 -1
- package/cjs/core/AuthStateManager.js +24 -48
- package/cjs/core/AuthStateManager.js.map +1 -1
- package/cjs/core/ServiceManager/browser.js +13 -33
- package/cjs/core/ServiceManager/browser.js.map +1 -1
- package/cjs/core/ServiceManager/index.js +0 -1
- package/cjs/core/ServiceManager/index.js.map +1 -1
- package/cjs/core/ServiceManager/node.js +3 -9
- package/cjs/core/ServiceManager/node.js.map +1 -1
- package/cjs/core/factory.js +0 -7
- package/cjs/core/factory.js.map +1 -1
- package/cjs/core/index.js +0 -13
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/mixin.js +16 -20
- package/cjs/core/mixin.js.map +1 -1
- package/cjs/core/options.js +1 -3
- package/cjs/core/options.js.map +1 -1
- package/cjs/core/storage.js +0 -2
- package/cjs/core/storage.js.map +1 -1
- package/cjs/core/types/index.js +0 -5
- package/cjs/core/types/index.js.map +1 -1
- package/cjs/crypto/base64.js +9 -22
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/browser.js +0 -4
- package/cjs/crypto/browser.js.map +1 -1
- package/cjs/crypto/index.js +0 -9
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/node.js +0 -13
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/crypto/oidcHash.js +1 -4
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/verifyToken.js +6 -7
- package/cjs/crypto/verifyToken.js.map +1 -1
- package/cjs/crypto/webcrypto.js +0 -1
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +1 -7
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthPollStopError.js +1 -5
- package/cjs/errors/AuthPollStopError.js.map +1 -1
- package/cjs/errors/AuthSdkError.js +1 -6
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/errors/CustomError.js +1 -4
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js +4 -7
- package/cjs/errors/OAuthError.js.map +1 -1
- package/cjs/errors/index.js +1 -9
- package/cjs/errors/index.js.map +1 -1
- package/cjs/exports/authn.js +0 -9
- package/cjs/exports/authn.js.map +1 -1
- package/cjs/exports/cdn/authn.js +0 -2
- package/cjs/exports/cdn/authn.js.map +1 -1
- package/cjs/exports/cdn/core.js +0 -2
- package/cjs/exports/cdn/core.js.map +1 -1
- package/cjs/exports/cdn/default.js +0 -2
- package/cjs/exports/cdn/default.js.map +1 -1
- package/cjs/exports/cdn/idx.js +0 -2
- package/cjs/exports/cdn/idx.js.map +1 -1
- package/cjs/exports/cdn/myaccount.js +0 -2
- package/cjs/exports/cdn/myaccount.js.map +1 -1
- package/cjs/exports/common.js +0 -22
- package/cjs/exports/common.js.map +1 -1
- package/cjs/exports/core.js +0 -9
- package/cjs/exports/core.js.map +1 -1
- package/cjs/exports/default.js +2 -12
- package/cjs/exports/default.js.map +1 -1
- package/cjs/exports/idx.js +3 -7
- package/cjs/exports/idx.js.map +1 -1
- package/cjs/exports/myaccount.js +0 -9
- package/cjs/exports/myaccount.js.map +1 -1
- package/cjs/features.js +1 -18
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +6 -20
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/OktaUserAgent.js +3 -11
- package/cjs/http/OktaUserAgent.js.map +1 -1
- package/cjs/http/headers.js +1 -1
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js +0 -11
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/mixin.js +2 -10
- package/cjs/http/mixin.js.map +1 -1
- package/cjs/http/options.js +1 -5
- package/cjs/http/options.js.map +1 -1
- package/cjs/http/request.js +75 -57
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/IdxTransactionManager.js +2 -22
- package/cjs/idx/IdxTransactionManager.js.map +1 -1
- package/cjs/idx/authenticate.js +3 -5
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/Authenticator.js +2 -4
- package/cjs/idx/authenticator/Authenticator.js.map +1 -1
- package/cjs/idx/authenticator/OktaPassword.js +2 -10
- package/cjs/idx/authenticator/OktaPassword.js.map +1 -1
- package/cjs/idx/authenticator/OktaVerifyTotp.js +0 -6
- package/cjs/idx/authenticator/OktaVerifyTotp.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js +0 -10
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +1 -10
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js +2 -10
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnEnrollment.js +0 -8
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnVerification.js +0 -8
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/cjs/idx/authenticator/getAuthenticator.js +0 -15
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/index.js +0 -15
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/authenticator/util.js +8 -18
- package/cjs/idx/authenticator/util.js.map +1 -1
- package/cjs/idx/cancel.js +3 -4
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +5 -13
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/factory/OktaAuthIdx.js +0 -3
- package/cjs/idx/factory/OktaAuthIdx.js.map +1 -1
- package/cjs/idx/factory/api.js +1 -17
- package/cjs/idx/factory/api.js.map +1 -1
- package/cjs/idx/factory/index.js +0 -3
- package/cjs/idx/factory/index.js.map +1 -1
- package/cjs/idx/flow/AccountUnlockFlow.js +1 -2
- package/cjs/idx/flow/AccountUnlockFlow.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js +1 -2
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js +2 -13
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js +1 -2
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js +1 -2
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js +0 -11
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +7 -12
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/idxState/index.js +1 -11
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/actionParser.js +1 -12
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js +10 -15
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js +7 -23
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js +2 -10
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/parsers.js +0 -2
- package/cjs/idx/idxState/v1/parsers.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js +2 -4
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/index.js +0 -26
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +18 -18
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +5 -14
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/mixin.js +0 -9
- package/cjs/idx/mixin.js.map +1 -1
- package/cjs/idx/options.js +2 -3
- package/cjs/idx/options.js.map +1 -1
- package/cjs/idx/poll.js +1 -10
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js +3 -9
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js +3 -4
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +5 -11
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +24 -45
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +7 -16
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +7 -15
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +7 -22
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +38 -67
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +13 -30
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +5 -13
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js +1 -5
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js +1 -6
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js +1 -5
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +5 -12
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +8 -30
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +5 -13
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +13 -19
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/index.js +0 -1
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +19 -31
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +3 -12
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +3 -10
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js +1 -7
- package/cjs/idx/remediators/RedirectIdp.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.js +1 -5
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +3 -11
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +1 -5
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +6 -15
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js +1 -6
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +5 -16
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js +1 -6
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +0 -39
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +1 -7
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +39 -54
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +1 -2
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/storage.js +3 -22
- package/cjs/idx/storage.js.map +1 -1
- package/cjs/idx/transactionMeta.js +24 -42
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/api.js +1 -9
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/idx-js.js +3 -3
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +0 -7
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/meta.js.map +1 -1
- package/cjs/idx/types/options.js.map +1 -1
- package/cjs/idx/unlockAccount.js +7 -11
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +24 -76
- package/cjs/idx/util.js.map +1 -1
- package/cjs/idx/webauthn.js +13 -18
- package/cjs/idx/webauthn.js.map +1 -1
- package/cjs/myaccount/api.js +0 -5
- package/cjs/myaccount/api.js.map +1 -1
- package/cjs/myaccount/emailApi.js +6 -21
- package/cjs/myaccount/emailApi.js.map +1 -1
- package/cjs/myaccount/factory.js +0 -3
- package/cjs/myaccount/factory.js.map +1 -1
- package/cjs/myaccount/index.js +0 -7
- package/cjs/myaccount/index.js.map +1 -1
- package/cjs/myaccount/mixin.js +0 -5
- package/cjs/myaccount/mixin.js.map +1 -1
- package/cjs/myaccount/phoneApi.js +5 -18
- package/cjs/myaccount/phoneApi.js.map +1 -1
- package/cjs/myaccount/profileApi.js +2 -9
- package/cjs/myaccount/profileApi.js.map +1 -1
- package/cjs/myaccount/request.js +12 -78
- package/cjs/myaccount/request.js.map +1 -1
- package/cjs/myaccount/transactions/Base.js +5 -7
- package/cjs/myaccount/transactions/Base.js.map +1 -1
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js +5 -10
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/EmailStatusTransaction.js +2 -7
- package/cjs/myaccount/transactions/EmailStatusTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/EmailTransaction.js +5 -13
- package/cjs/myaccount/transactions/EmailTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/PhoneTransaction.js +5 -12
- package/cjs/myaccount/transactions/PhoneTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +0 -5
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/ProfileTransaction.js +0 -5
- package/cjs/myaccount/transactions/ProfileTransaction.js.map +1 -1
- package/cjs/myaccount/transactions/index.js +0 -8
- package/cjs/myaccount/transactions/index.js.map +1 -1
- package/cjs/myaccount/types.js +0 -5
- package/cjs/myaccount/types.js.map +1 -1
- package/cjs/oidc/TokenManager.js +39 -100
- package/cjs/oidc/TokenManager.js.map +1 -1
- package/cjs/oidc/TransactionManager.js +19 -26
- package/cjs/oidc/TransactionManager.js.map +1 -1
- package/cjs/oidc/decodeToken.js +1 -5
- package/cjs/oidc/decodeToken.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +9 -13
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js +0 -5
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +5 -17
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js +7 -14
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +7 -12
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/factory/OktaAuthOAuth.js +0 -6
- package/cjs/oidc/factory/OktaAuthOAuth.js.map +1 -1
- package/cjs/oidc/factory/api.js +6 -20
- package/cjs/oidc/factory/api.js.map +1 -1
- package/cjs/oidc/factory/index.js +0 -3
- package/cjs/oidc/factory/index.js.map +1 -1
- package/cjs/oidc/getToken.js +18 -30
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js +1 -15
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +4 -8
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +1 -8
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js +1 -5
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +23 -40
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js +0 -32
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/mixin/browser.js +6 -18
- package/cjs/oidc/mixin/browser.js.map +1 -1
- package/cjs/oidc/mixin/index.js +37 -89
- package/cjs/oidc/mixin/index.js.map +1 -1
- package/cjs/oidc/mixin/node.js +2 -9
- package/cjs/oidc/mixin/node.js.map +1 -1
- package/cjs/oidc/options/OAuthOptionsConstructor.js +17 -24
- package/cjs/oidc/options/OAuthOptionsConstructor.js.map +1 -1
- package/cjs/oidc/options/browser.js.map +1 -1
- package/cjs/oidc/options/index.js +0 -1
- package/cjs/oidc/options/index.js.map +1 -1
- package/cjs/oidc/options/node.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js +1 -32
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js +5 -16
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +3 -15
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +3 -13
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js +3 -14
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/storage.js +0 -8
- package/cjs/oidc/storage.js.map +1 -1
- package/cjs/oidc/types/Token.js +1 -5
- package/cjs/oidc/types/Token.js.map +1 -1
- package/cjs/oidc/types/TokenManager.js +1 -1
- package/cjs/oidc/types/TokenManager.js.map +1 -1
- package/cjs/oidc/types/Transaction.js +1 -12
- package/cjs/oidc/types/Transaction.js.map +1 -1
- package/cjs/oidc/types/UserClaims.js.map +1 -1
- package/cjs/oidc/types/api.js.map +1 -1
- package/cjs/oidc/types/index.js +0 -21
- package/cjs/oidc/types/index.js.map +1 -1
- package/cjs/oidc/types/meta.js.map +1 -1
- package/cjs/oidc/types/options.js.map +1 -1
- package/cjs/oidc/types/proto.js.map +1 -1
- package/cjs/oidc/util/browser.js +4 -13
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/defaultTokenParams.js +5 -5
- package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
- package/cjs/oidc/util/errors.js +3 -8
- package/cjs/oidc/util/errors.js.map +1 -1
- package/cjs/oidc/util/index.js +0 -24
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +11 -25
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js +3 -12
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js +5 -6
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/pkce.js +1 -12
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +13 -26
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/refreshToken.js +0 -7
- package/cjs/oidc/util/refreshToken.js.map +1 -1
- package/cjs/oidc/util/sharedStorage.js +0 -8
- package/cjs/oidc/util/sharedStorage.js.map +1 -1
- package/cjs/oidc/util/urlParams.js +9 -12
- package/cjs/oidc/util/urlParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js +9 -17
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/util/validateToken.js +1 -6
- package/cjs/oidc/util/validateToken.js.map +1 -1
- package/cjs/oidc/verifyToken.js +13 -23
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/server/serverStorage.js +9 -27
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +1 -17
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/services/LeaderElectionService.js +1 -23
- package/cjs/services/LeaderElectionService.js.map +1 -1
- package/cjs/services/SyncStorageService.js +3 -37
- package/cjs/services/SyncStorageService.js.map +1 -1
- package/cjs/services/index.js +0 -5
- package/cjs/services/index.js.map +1 -1
- package/cjs/session/api.js +1 -12
- package/cjs/session/api.js.map +1 -1
- package/cjs/session/factory.js +0 -2
- package/cjs/session/factory.js.map +1 -1
- package/cjs/session/index.js +0 -7
- package/cjs/session/index.js.map +1 -1
- package/cjs/session/mixin.js +2 -6
- package/cjs/session/mixin.js.map +1 -1
- package/cjs/storage/BaseStorageManager.js +13 -25
- package/cjs/storage/BaseStorageManager.js.map +1 -1
- package/cjs/storage/SavedObject.js +7 -19
- package/cjs/storage/SavedObject.js.map +1 -1
- package/cjs/storage/index.js +0 -9
- package/cjs/storage/index.js.map +1 -1
- package/cjs/storage/mixin.js +2 -4
- package/cjs/storage/mixin.js.map +1 -1
- package/cjs/storage/options/StorageOptionsConstructor.js +3 -6
- package/cjs/storage/options/StorageOptionsConstructor.js.map +1 -1
- package/cjs/storage/options/browser.js +7 -15
- package/cjs/storage/options/browser.js.map +1 -1
- package/cjs/storage/options/node.js +3 -6
- package/cjs/storage/options/node.js.map +1 -1
- package/cjs/util/PromiseQueue.js +7 -15
- package/cjs/util/PromiseQueue.js.map +1 -1
- package/cjs/util/console.js +3 -7
- package/cjs/util/console.js.map +1 -1
- package/cjs/util/index.js +0 -11
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +3 -8
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js +9 -23
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/types.js +1 -5
- package/cjs/util/types.js.map +1 -1
- package/cjs/util/url.js +5 -14
- package/cjs/util/url.js.map +1 -1
- package/dist/okta-auth-js.authn.min.analyzer.html +3 -3
- package/dist/okta-auth-js.authn.min.js +1 -1
- package/dist/okta-auth-js.authn.min.js.LICENSE.txt +2 -0
- package/dist/okta-auth-js.authn.min.js.map +1 -1
- package/dist/okta-auth-js.core.min.analyzer.html +3 -3
- package/dist/okta-auth-js.core.min.js +1 -1
- package/dist/okta-auth-js.core.min.js.LICENSE.txt +2 -0
- package/dist/okta-auth-js.core.min.js.map +1 -1
- package/dist/okta-auth-js.idx.min.analyzer.html +3 -3
- package/dist/okta-auth-js.idx.min.js +1 -1
- package/dist/okta-auth-js.idx.min.js.LICENSE.txt +2 -0
- package/dist/okta-auth-js.idx.min.js.map +1 -1
- package/dist/okta-auth-js.min.analyzer.html +3 -3
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.LICENSE.txt +2 -0
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.myaccount.min.analyzer.html +3 -3
- package/dist/okta-auth-js.myaccount.min.js +1 -1
- package/dist/okta-auth-js.myaccount.min.js.LICENSE.txt +2 -0
- package/dist/okta-auth-js.myaccount.min.js.map +1 -1
- package/dist/okta-auth-js.polyfill.js +1 -1
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/esm/browser/http/OktaUserAgent.js +2 -2
- package/esm/browser/http/request.js +56 -23
- package/esm/browser/http/request.js.map +1 -1
- package/esm/browser/idx/interact.js +2 -2
- package/esm/browser/idx/interact.js.map +1 -1
- package/esm/browser/idx/run.js +3 -2
- package/esm/browser/idx/run.js.map +1 -1
- package/esm/browser/idx/transactionMeta.js +3 -2
- package/esm/browser/idx/transactionMeta.js.map +1 -1
- package/esm/browser/myaccount/request.js +2 -43
- package/esm/browser/myaccount/request.js.map +1 -1
- package/esm/browser/oidc/endpoints/authorize.js +1 -0
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -1
- package/esm/browser/oidc/exchangeCodeForTokens.js +2 -1
- package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/browser/oidc/handleOAuthResponse.js +17 -16
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js +2 -0
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js.map +1 -1
- package/esm/browser/oidc/util/defaultTokenParams.js +3 -1
- package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/browser/oidc/util/oauthMeta.js +1 -0
- package/esm/browser/oidc/util/oauthMeta.js.map +1 -1
- package/esm/browser/oidc/util/validateClaims.js +9 -4
- package/esm/browser/oidc/util/validateClaims.js.map +1 -1
- package/esm/browser/oidc/verifyToken.js +2 -2
- package/esm/browser/oidc/verifyToken.js.map +1 -1
- package/esm/browser/package.json +1 -1
- package/esm/node/http/OktaUserAgent.js +2 -2
- package/esm/node/http/request.js +56 -23
- package/esm/node/http/request.js.map +1 -1
- package/esm/node/idx/interact.js +2 -2
- package/esm/node/idx/interact.js.map +1 -1
- package/esm/node/idx/run.js +3 -2
- package/esm/node/idx/run.js.map +1 -1
- package/esm/node/idx/transactionMeta.js +3 -2
- package/esm/node/idx/transactionMeta.js.map +1 -1
- package/esm/node/myaccount/request.js +2 -43
- package/esm/node/myaccount/request.js.map +1 -1
- package/esm/node/oidc/endpoints/authorize.js +1 -0
- package/esm/node/oidc/endpoints/authorize.js.map +1 -1
- package/esm/node/oidc/exchangeCodeForTokens.js +2 -1
- package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/node/oidc/handleOAuthResponse.js +17 -16
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/node/oidc/options/OAuthOptionsConstructor.js +2 -0
- package/esm/node/oidc/options/OAuthOptionsConstructor.js.map +1 -1
- package/esm/node/oidc/util/defaultTokenParams.js +3 -1
- package/esm/node/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/node/oidc/util/oauthMeta.js +1 -0
- package/esm/node/oidc/util/oauthMeta.js.map +1 -1
- package/esm/node/oidc/util/validateClaims.js +9 -4
- package/esm/node/oidc/util/validateClaims.js.map +1 -1
- package/esm/node/oidc/verifyToken.js +2 -2
- package/esm/node/oidc/verifyToken.js.map +1 -1
- package/esm/node/package.json +1 -1
- package/package.json +12 -13
- package/polyfill/index.js +8 -5
- package/types/lib/core/options.d.ts +2 -0
- package/types/lib/idx/interact.d.ts +1 -0
- package/types/lib/idx/options.d.ts +2 -0
- package/types/lib/idx/types/meta.d.ts +1 -0
- package/types/lib/idx/types/options.d.ts +1 -0
- package/types/lib/oidc/options/OAuthOptionsConstructor.d.ts +2 -0
- package/types/lib/oidc/types/UserClaims.d.ts +1 -0
- package/types/lib/oidc/types/api.d.ts +1 -0
- package/types/lib/oidc/types/meta.d.ts +1 -1
- package/types/lib/oidc/types/options.d.ts +2 -1
- package/types/lib/oidc/types/proto.d.ts +1 -0
- package/umd/authn.js +1 -1
- package/umd/authn.js.LICENSE.txt +2 -0
- package/umd/authn.js.map +1 -1
- package/umd/core.js +1 -1
- package/umd/core.js.LICENSE.txt +2 -0
- package/umd/core.js.map +1 -1
- package/umd/default.js +1 -1
- package/umd/default.js.LICENSE.txt +2 -0
- package/umd/default.js.map +1 -1
- package/umd/idx.js +1 -1
- package/umd/idx.js.LICENSE.txt +2 -0
- package/umd/idx.js.map +1 -1
- package/umd/myaccount.js +1 -1
- package/umd/myaccount.js.LICENSE.txt +2 -0
- package/umd/myaccount.js.map +1 -1
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.OktaVerifyTotp = void 0;
|
|
4
|
-
|
|
5
4
|
var _VerificationCodeAuthenticator = require("./VerificationCodeAuthenticator");
|
|
6
|
-
|
|
7
5
|
class OktaVerifyTotp extends _VerificationCodeAuthenticator.VerificationCodeAuthenticator {
|
|
8
6
|
mapCredentials(values) {
|
|
9
7
|
const {
|
|
10
8
|
verificationCode
|
|
11
9
|
} = values;
|
|
12
|
-
|
|
13
10
|
if (!verificationCode) {
|
|
14
11
|
return;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
return {
|
|
18
14
|
totp: verificationCode
|
|
19
15
|
};
|
|
20
16
|
}
|
|
21
|
-
|
|
22
17
|
}
|
|
23
|
-
|
|
24
18
|
exports.OktaVerifyTotp = OktaVerifyTotp;
|
|
25
19
|
//# sourceMappingURL=OktaVerifyTotp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OktaVerifyTotp.js","names":["OktaVerifyTotp","VerificationCodeAuthenticator","mapCredentials","values","verificationCode","totp"],"sources":["../../../../lib/idx/authenticator/OktaVerifyTotp.ts"],"sourcesContent":["import { Credentials } from './Authenticator';\nimport { VerificationCodeAuthenticator } from './VerificationCodeAuthenticator';\n\ninterface TotpCredentials extends Credentials {\n totp: string;\n}\n\nexport class OktaVerifyTotp extends VerificationCodeAuthenticator {\n mapCredentials(values): TotpCredentials | undefined {\n const { verificationCode } = values;\n if (!verificationCode) {\n return;\n }\n return { totp: verificationCode };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OktaVerifyTotp.js","names":["OktaVerifyTotp","VerificationCodeAuthenticator","mapCredentials","values","verificationCode","totp"],"sources":["../../../../lib/idx/authenticator/OktaVerifyTotp.ts"],"sourcesContent":["import { Credentials } from './Authenticator';\nimport { VerificationCodeAuthenticator } from './VerificationCodeAuthenticator';\n\ninterface TotpCredentials extends Credentials {\n totp: string;\n}\n\nexport class OktaVerifyTotp extends VerificationCodeAuthenticator {\n mapCredentials(values): TotpCredentials | undefined {\n const { verificationCode } = values;\n if (!verificationCode) {\n return;\n }\n return { totp: verificationCode };\n }\n}\n"],"mappings":";;;AACA;AAMO,MAAMA,cAAc,SAASC,4DAA6B,CAAC;EAChEC,cAAc,CAACC,MAAM,EAA+B;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM;IACnC,IAAI,CAACC,gBAAgB,EAAE;MACrB;IACF;IACA,OAAO;MAAEC,IAAI,EAAED;IAAiB,CAAC;EACnC;AACF;AAAC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.SecurityQuestionEnrollment = void 0;
|
|
4
|
-
|
|
5
4
|
var _Authenticator = require("./Authenticator");
|
|
6
|
-
|
|
7
5
|
class SecurityQuestionEnrollment extends _Authenticator.Authenticator {
|
|
8
6
|
canVerify(values) {
|
|
9
7
|
const {
|
|
10
8
|
credentials
|
|
11
9
|
} = values;
|
|
12
|
-
|
|
13
10
|
if (credentials && credentials.questionKey && credentials.answer) {
|
|
14
11
|
return true;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
const {
|
|
18
14
|
questionKey,
|
|
19
15
|
question,
|
|
@@ -21,25 +17,21 @@ class SecurityQuestionEnrollment extends _Authenticator.Authenticator {
|
|
|
21
17
|
} = values;
|
|
22
18
|
return !!(questionKey && answer) || !!(question && answer);
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
mapCredentials(values) {
|
|
26
21
|
const {
|
|
27
22
|
questionKey,
|
|
28
23
|
question,
|
|
29
24
|
answer
|
|
30
25
|
} = values;
|
|
31
|
-
|
|
32
26
|
if (!answer || !questionKey && !question) {
|
|
33
27
|
return;
|
|
34
28
|
}
|
|
35
|
-
|
|
36
29
|
return {
|
|
37
30
|
questionKey: question ? 'custom' : questionKey,
|
|
38
31
|
question,
|
|
39
32
|
answer
|
|
40
33
|
};
|
|
41
34
|
}
|
|
42
|
-
|
|
43
35
|
getInputs() {
|
|
44
36
|
return [{
|
|
45
37
|
name: 'questionKey',
|
|
@@ -56,8 +48,6 @@ class SecurityQuestionEnrollment extends _Authenticator.Authenticator {
|
|
|
56
48
|
required: true
|
|
57
49
|
}];
|
|
58
50
|
}
|
|
59
|
-
|
|
60
51
|
}
|
|
61
|
-
|
|
62
52
|
exports.SecurityQuestionEnrollment = SecurityQuestionEnrollment;
|
|
63
53
|
//# sourceMappingURL=SecurityQuestionEnrollment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityQuestionEnrollment.js","names":["SecurityQuestionEnrollment","Authenticator","canVerify","values","credentials","questionKey","answer","question","mapCredentials","getInputs","name","type","required","label"],"sources":["../../../../lib/idx/authenticator/SecurityQuestionEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface SecurityQuestionEnrollValues {\n questionKey?: string;\n question?: string;\n answer?: string;\n credentials?: Credentials;\n}\n\nexport class SecurityQuestionEnrollment extends Authenticator<SecurityQuestionEnrollValues> {\n canVerify(values: SecurityQuestionEnrollValues) {\n const { credentials } = values;\n if (credentials && credentials.questionKey && credentials.answer) {\n return true;\n }\n const { questionKey, question, answer } = values;\n return !!(questionKey && answer) || !!(question && answer);\n }\n\n mapCredentials(values: SecurityQuestionEnrollValues): Credentials | undefined {\n const { questionKey, question, answer } = values;\n if (!answer || (!questionKey && !question)) {\n return;\n }\n return {\n questionKey: question ? 'custom' : questionKey,\n question,\n answer\n };\n }\n\n getInputs() {\n return [\n { name: 'questionKey', type: 'string', required: true },\n { name: 'question', type: 'string', label: 'Create a security question' },\n { name: 'answer', type: 'string', label: 'Answer', required: true },\n ];\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecurityQuestionEnrollment.js","names":["SecurityQuestionEnrollment","Authenticator","canVerify","values","credentials","questionKey","answer","question","mapCredentials","getInputs","name","type","required","label"],"sources":["../../../../lib/idx/authenticator/SecurityQuestionEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface SecurityQuestionEnrollValues {\n questionKey?: string;\n question?: string;\n answer?: string;\n credentials?: Credentials;\n}\n\nexport class SecurityQuestionEnrollment extends Authenticator<SecurityQuestionEnrollValues> {\n canVerify(values: SecurityQuestionEnrollValues) {\n const { credentials } = values;\n if (credentials && credentials.questionKey && credentials.answer) {\n return true;\n }\n const { questionKey, question, answer } = values;\n return !!(questionKey && answer) || !!(question && answer);\n }\n\n mapCredentials(values: SecurityQuestionEnrollValues): Credentials | undefined {\n const { questionKey, question, answer } = values;\n if (!answer || (!questionKey && !question)) {\n return;\n }\n return {\n questionKey: question ? 'custom' : questionKey,\n question,\n answer\n };\n }\n\n getInputs() {\n return [\n { name: 'questionKey', type: 'string', required: true },\n { name: 'question', type: 'string', label: 'Create a security question' },\n { name: 'answer', type: 'string', label: 'Answer', required: true },\n ];\n }\n}\n"],"mappings":";;;AAAA;AASO,MAAMA,0BAA0B,SAASC,4BAAa,CAA+B;EAC1FC,SAAS,CAACC,MAAoC,EAAE;IAC9C,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM;IAC9B,IAAIC,WAAW,IAAIA,WAAW,CAACC,WAAW,IAAID,WAAW,CAACE,MAAM,EAAE;MAChE,OAAO,IAAI;IACb;IACA,MAAM;MAAED,WAAW;MAAEE,QAAQ;MAAED;IAAO,CAAC,GAAGH,MAAM;IAChD,OAAO,CAAC,EAAEE,WAAW,IAAIC,MAAM,CAAC,IAAI,CAAC,EAAEC,QAAQ,IAAID,MAAM,CAAC;EAC5D;EAEAE,cAAc,CAACL,MAAoC,EAA2B;IAC5E,MAAM;MAAEE,WAAW;MAAEE,QAAQ;MAAED;IAAO,CAAC,GAAGH,MAAM;IAChD,IAAI,CAACG,MAAM,IAAK,CAACD,WAAW,IAAI,CAACE,QAAS,EAAE;MAC1C;IACF;IACA,OAAO;MACLF,WAAW,EAAEE,QAAQ,GAAG,QAAQ,GAAGF,WAAW;MAC9CE,QAAQ;MACRD;IACF,CAAC;EACH;EAEAG,SAAS,GAAG;IACV,OAAO,CACL;MAAEC,IAAI,EAAE,aAAa;MAAEC,IAAI,EAAE,QAAQ;MAAEC,QAAQ,EAAE;IAAK,CAAC,EACvD;MAAEF,IAAI,EAAE,UAAU;MAAEC,IAAI,EAAE,QAAQ;MAAEE,KAAK,EAAE;IAA6B,CAAC,EACzE;MAAEH,IAAI,EAAE,QAAQ;MAAEC,IAAI,EAAE,QAAQ;MAAEE,KAAK,EAAE,QAAQ;MAAED,QAAQ,EAAE;IAAK,CAAC,CACpE;EACH;AACF;AAAC"}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.SecurityQuestionVerification = void 0;
|
|
4
|
-
|
|
5
4
|
var _Authenticator = require("./Authenticator");
|
|
6
|
-
|
|
7
5
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
6
|
+
|
|
8
7
|
class SecurityQuestionVerification extends _Authenticator.Authenticator {
|
|
9
8
|
canVerify(values) {
|
|
10
9
|
const {
|
|
11
10
|
credentials
|
|
12
11
|
} = values;
|
|
13
|
-
|
|
14
12
|
if (credentials && credentials.answer) {
|
|
15
13
|
return true;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
const {
|
|
19
16
|
answer
|
|
20
17
|
} = values;
|
|
21
18
|
return !!answer;
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
mapCredentials(values) {
|
|
25
21
|
const {
|
|
26
22
|
answer
|
|
27
23
|
} = values;
|
|
28
|
-
|
|
29
24
|
if (!answer) {
|
|
30
25
|
return;
|
|
31
26
|
}
|
|
32
|
-
|
|
33
27
|
return {
|
|
34
28
|
questionKey: this.meta.contextualData.enrolledQuestion.questionKey,
|
|
35
29
|
answer
|
|
36
30
|
};
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
getInputs() {
|
|
40
33
|
return [{
|
|
41
34
|
name: 'answer',
|
|
@@ -44,8 +37,6 @@ class SecurityQuestionVerification extends _Authenticator.Authenticator {
|
|
|
44
37
|
required: true
|
|
45
38
|
}];
|
|
46
39
|
}
|
|
47
|
-
|
|
48
40
|
}
|
|
49
|
-
|
|
50
41
|
exports.SecurityQuestionVerification = SecurityQuestionVerification;
|
|
51
42
|
//# sourceMappingURL=SecurityQuestionVerification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityQuestionVerification.js","names":["SecurityQuestionVerification","Authenticator","canVerify","values","credentials","answer","mapCredentials","questionKey","meta","contextualData","enrolledQuestion","getInputs","name","type","label","required"],"sources":["../../../../lib/idx/authenticator/SecurityQuestionVerification.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { Authenticator, Credentials } from './Authenticator';\n\nexport interface SecurityQuestionVerificationValues {\n answer?: string;\n credentials?: Credentials;\n}\n\nexport class SecurityQuestionVerification extends Authenticator<SecurityQuestionVerificationValues> {\n canVerify(values: SecurityQuestionVerificationValues) {\n const { credentials } = values;\n if (credentials && credentials.answer) {\n return true;\n }\n const { answer } = values;\n return !!answer;\n }\n\n mapCredentials(values: SecurityQuestionVerificationValues): Credentials | undefined {\n const { answer } = values;\n if (!answer) {\n return;\n }\n return {\n questionKey: this.meta.contextualData!.enrolledQuestion!.questionKey,\n answer\n };\n }\n\n getInputs() {\n return [\n { name: 'answer', type: 'string', label: 'Answer', required: true }\n ];\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SecurityQuestionVerification.js","names":["SecurityQuestionVerification","Authenticator","canVerify","values","credentials","answer","mapCredentials","questionKey","meta","contextualData","enrolledQuestion","getInputs","name","type","label","required"],"sources":["../../../../lib/idx/authenticator/SecurityQuestionVerification.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { Authenticator, Credentials } from './Authenticator';\n\nexport interface SecurityQuestionVerificationValues {\n answer?: string;\n credentials?: Credentials;\n}\n\nexport class SecurityQuestionVerification extends Authenticator<SecurityQuestionVerificationValues> {\n canVerify(values: SecurityQuestionVerificationValues) {\n const { credentials } = values;\n if (credentials && credentials.answer) {\n return true;\n }\n const { answer } = values;\n return !!answer;\n }\n\n mapCredentials(values: SecurityQuestionVerificationValues): Credentials | undefined {\n const { answer } = values;\n if (!answer) {\n return;\n }\n return {\n questionKey: this.meta.contextualData!.enrolledQuestion!.questionKey,\n answer\n };\n }\n\n getInputs() {\n return [\n { name: 'answer', type: 'string', label: 'Answer', required: true }\n ];\n }\n}\n"],"mappings":";;;AACA;AADA;;AAQO,MAAMA,4BAA4B,SAASC,4BAAa,CAAqC;EAClGC,SAAS,CAACC,MAA0C,EAAE;IACpD,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM;IAC9B,IAAIC,WAAW,IAAIA,WAAW,CAACC,MAAM,EAAE;MACrC,OAAO,IAAI;IACb;IACA,MAAM;MAAEA;IAAO,CAAC,GAAGF,MAAM;IACzB,OAAO,CAAC,CAACE,MAAM;EACjB;EAEAC,cAAc,CAACH,MAA0C,EAA2B;IAClF,MAAM;MAAEE;IAAO,CAAC,GAAGF,MAAM;IACzB,IAAI,CAACE,MAAM,EAAE;MACX;IACF;IACA,OAAO;MACLE,WAAW,EAAE,IAAI,CAACC,IAAI,CAACC,cAAc,CAAEC,gBAAgB,CAAEH,WAAW;MACpEF;IACF,CAAC;EACH;EAEAM,SAAS,GAAG;IACV,OAAO,CACL;MAAEC,IAAI,EAAE,QAAQ;MAAEC,IAAI,EAAE,QAAQ;MAAEC,KAAK,EAAE,QAAQ;MAAEC,QAAQ,EAAE;IAAK,CAAC,CACpE;EACH;AACF;AAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.VerificationCodeAuthenticator = void 0;
|
|
4
|
-
|
|
5
4
|
var _Authenticator = require("./Authenticator");
|
|
6
|
-
|
|
7
5
|
// general authenticator to handle "verificationCode" input
|
|
8
6
|
// it can be used for "email", "phone", "google authenticator"
|
|
9
7
|
// a new authenticator class should be created if special cases need to be handled
|
|
@@ -11,34 +9,28 @@ class VerificationCodeAuthenticator extends _Authenticator.Authenticator {
|
|
|
11
9
|
canVerify(values) {
|
|
12
10
|
return !!(values.credentials || values.verificationCode || values.otp);
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
mapCredentials(values) {
|
|
16
13
|
const {
|
|
17
14
|
credentials,
|
|
18
15
|
verificationCode,
|
|
19
16
|
otp
|
|
20
17
|
} = values;
|
|
21
|
-
|
|
22
18
|
if (!credentials && !verificationCode && !otp) {
|
|
23
19
|
return;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
return credentials || {
|
|
27
22
|
passcode: verificationCode || otp
|
|
28
23
|
};
|
|
29
24
|
}
|
|
30
|
-
|
|
31
25
|
getInputs(idxRemediationValue) {
|
|
32
26
|
var _idxRemediationValue$;
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
return {
|
|
28
|
+
...((_idxRemediationValue$ = idxRemediationValue.form) === null || _idxRemediationValue$ === void 0 ? void 0 : _idxRemediationValue$.value[0]),
|
|
35
29
|
name: 'verificationCode',
|
|
36
30
|
type: 'string',
|
|
37
31
|
required: idxRemediationValue.required
|
|
38
32
|
};
|
|
39
33
|
}
|
|
40
|
-
|
|
41
34
|
}
|
|
42
|
-
|
|
43
35
|
exports.VerificationCodeAuthenticator = VerificationCodeAuthenticator;
|
|
44
36
|
//# sourceMappingURL=VerificationCodeAuthenticator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerificationCodeAuthenticator.js","names":["VerificationCodeAuthenticator","Authenticator","canVerify","values","credentials","verificationCode","otp","mapCredentials","passcode","getInputs","idxRemediationValue","form","value","name","type","required"],"sources":["../../../../lib/idx/authenticator/VerificationCodeAuthenticator.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface VerificationCodeValues {\n verificationCode?: string;\n otp?: string;\n credentials?: Credentials;\n}\n\ninterface VerificationCodeCredentials extends Credentials {\n passcode: string;\n}\n\n// general authenticator to handle \"verificationCode\" input\n// it can be used for \"email\", \"phone\", \"google authenticator\"\n// a new authenticator class should be created if special cases need to be handled\nexport class VerificationCodeAuthenticator extends Authenticator<VerificationCodeValues> {\n canVerify(values: VerificationCodeValues) {\n return !!(values.credentials ||values.verificationCode || values.otp);\n }\n\n mapCredentials(values): VerificationCodeCredentials | Credentials | undefined {\n const { credentials, verificationCode, otp } = values;\n if (!credentials && !verificationCode && !otp) {\n return;\n }\n return credentials || { passcode: verificationCode || otp };\n }\n\n getInputs(idxRemediationValue) {\n return {\n ...idxRemediationValue.form?.value[0],\n name: 'verificationCode',\n type: 'string',\n required: idxRemediationValue.required\n };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerificationCodeAuthenticator.js","names":["VerificationCodeAuthenticator","Authenticator","canVerify","values","credentials","verificationCode","otp","mapCredentials","passcode","getInputs","idxRemediationValue","form","value","name","type","required"],"sources":["../../../../lib/idx/authenticator/VerificationCodeAuthenticator.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface VerificationCodeValues {\n verificationCode?: string;\n otp?: string;\n credentials?: Credentials;\n}\n\ninterface VerificationCodeCredentials extends Credentials {\n passcode: string;\n}\n\n// general authenticator to handle \"verificationCode\" input\n// it can be used for \"email\", \"phone\", \"google authenticator\"\n// a new authenticator class should be created if special cases need to be handled\nexport class VerificationCodeAuthenticator extends Authenticator<VerificationCodeValues> {\n canVerify(values: VerificationCodeValues) {\n return !!(values.credentials ||values.verificationCode || values.otp);\n }\n\n mapCredentials(values): VerificationCodeCredentials | Credentials | undefined {\n const { credentials, verificationCode, otp } = values;\n if (!credentials && !verificationCode && !otp) {\n return;\n }\n return credentials || { passcode: verificationCode || otp };\n }\n\n getInputs(idxRemediationValue) {\n return {\n ...idxRemediationValue.form?.value[0],\n name: 'verificationCode',\n type: 'string',\n required: idxRemediationValue.required\n };\n }\n}\n"],"mappings":";;;AAAA;AAYA;AACA;AACA;AACO,MAAMA,6BAA6B,SAASC,4BAAa,CAAyB;EACvFC,SAAS,CAACC,MAA8B,EAAE;IACxC,OAAO,CAAC,EAAEA,MAAM,CAACC,WAAW,IAAGD,MAAM,CAACE,gBAAgB,IAAIF,MAAM,CAACG,GAAG,CAAC;EACvE;EAEAC,cAAc,CAACJ,MAAM,EAAyD;IAC5E,MAAM;MAAEC,WAAW;MAAEC,gBAAgB;MAAEC;IAAI,CAAC,GAAGH,MAAM;IACrD,IAAI,CAACC,WAAW,IAAI,CAACC,gBAAgB,IAAI,CAACC,GAAG,EAAE;MAC7C;IACF;IACA,OAAOF,WAAW,IAAI;MAAEI,QAAQ,EAAEH,gBAAgB,IAAIC;IAAI,CAAC;EAC7D;EAEAG,SAAS,CAACC,mBAAmB,EAAE;IAAA;IAC7B,OAAO;MACL,6BAAGA,mBAAmB,CAACC,IAAI,0DAAxB,sBAA0BC,KAAK,CAAC,CAAC,CAAC;MACrCC,IAAI,EAAE,kBAAkB;MACxBC,IAAI,EAAE,QAAQ;MACdC,QAAQ,EAAEL,mBAAmB,CAACK;IAChC,CAAC;EACH;AACF;AAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.WebauthnEnrollment = void 0;
|
|
4
|
-
|
|
5
4
|
var _Authenticator = require("./Authenticator");
|
|
6
|
-
|
|
7
5
|
class WebauthnEnrollment extends _Authenticator.Authenticator {
|
|
8
6
|
canVerify(values) {
|
|
9
7
|
const {
|
|
@@ -16,24 +14,20 @@ class WebauthnEnrollment extends _Authenticator.Authenticator {
|
|
|
16
14
|
} = obj;
|
|
17
15
|
return !!(clientData && attestation);
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
mapCredentials(values) {
|
|
21
18
|
const {
|
|
22
19
|
credentials,
|
|
23
20
|
clientData,
|
|
24
21
|
attestation
|
|
25
22
|
} = values;
|
|
26
|
-
|
|
27
23
|
if (!credentials && !clientData && !attestation) {
|
|
28
24
|
return;
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
return credentials || {
|
|
32
27
|
clientData,
|
|
33
28
|
attestation
|
|
34
29
|
};
|
|
35
30
|
}
|
|
36
|
-
|
|
37
31
|
getInputs() {
|
|
38
32
|
return [{
|
|
39
33
|
name: 'clientData',
|
|
@@ -49,8 +43,6 @@ class WebauthnEnrollment extends _Authenticator.Authenticator {
|
|
|
49
43
|
label: 'Attestation'
|
|
50
44
|
}];
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
exports.WebauthnEnrollment = WebauthnEnrollment;
|
|
56
48
|
//# sourceMappingURL=WebauthnEnrollment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnEnrollment.js","names":["WebauthnEnrollment","Authenticator","canVerify","values","credentials","obj","clientData","attestation","mapCredentials","getInputs","name","type","required","visible","label"],"sources":["../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation\n });\n }\n\n getInputs() {\n return [\n { name: 'clientData', type: 'string', required: true, visible: false, label: 'Client Data' },\n { name: 'attestation', type: 'string', required: true, visible: false, label: 'Attestation' },\n ];\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebauthnEnrollment.js","names":["WebauthnEnrollment","Authenticator","canVerify","values","credentials","obj","clientData","attestation","mapCredentials","getInputs","name","type","required","visible","label"],"sources":["../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation\n });\n }\n\n getInputs() {\n return [\n { name: 'clientData', type: 'string', required: true, visible: false, label: 'Client Data' },\n { name: 'attestation', type: 'string', required: true, visible: false, label: 'Attestation' },\n ];\n }\n}\n"],"mappings":";;;AAAA;AAQO,MAAMA,kBAAkB,SAASC,4BAAa,CAAuB;EAC1EC,SAAS,CAACC,MAA4B,EAAE;IACtC,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM;IAC9B,MAAME,GAAG,GAAGD,WAAW,IAAID,MAAM;IACjC,MAAM;MAAEG,UAAU;MAAEC;IAAY,CAAC,GAAGF,GAAG;IACvC,OAAO,CAAC,EAAEC,UAAU,IAAIC,WAAW,CAAC;EACtC;EAEAC,cAAc,CAACL,MAA4B,EAA2B;IACpE,MAAM;MAAEC,WAAW;MAAEE,UAAU;MAAEC;IAAY,CAAC,GAAGJ,MAAM;IACvD,IAAI,CAACC,WAAW,IAAI,CAACE,UAAU,IAAI,CAACC,WAAW,EAAE;MAC/C;IACF;IACA,OAAOH,WAAW,IAAK;MACrBE,UAAU;MACVC;IACF,CAAE;EACJ;EAEAE,SAAS,GAAG;IACV,OAAO,CACL;MAAEC,IAAI,EAAE,YAAY;MAAEC,IAAI,EAAE,QAAQ;MAAEC,QAAQ,EAAE,IAAI;MAAEC,OAAO,EAAE,KAAK;MAAEC,KAAK,EAAE;IAAc,CAAC,EAC5F;MAAEJ,IAAI,EAAE,aAAa;MAAEC,IAAI,EAAE,QAAQ;MAAEC,QAAQ,EAAE,IAAI;MAAEC,OAAO,EAAE,KAAK;MAAEC,KAAK,EAAE;IAAc,CAAC,CAC9F;EACH;AACF;AAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.WebauthnVerification = void 0;
|
|
4
|
-
|
|
5
4
|
var _Authenticator = require("./Authenticator");
|
|
6
|
-
|
|
7
5
|
class WebauthnVerification extends _Authenticator.Authenticator {
|
|
8
6
|
canVerify(values) {
|
|
9
7
|
const {
|
|
@@ -17,7 +15,6 @@ class WebauthnVerification extends _Authenticator.Authenticator {
|
|
|
17
15
|
} = obj;
|
|
18
16
|
return !!(clientData && authenticatorData && signatureData);
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
mapCredentials(values) {
|
|
22
19
|
const {
|
|
23
20
|
credentials,
|
|
@@ -25,18 +22,15 @@ class WebauthnVerification extends _Authenticator.Authenticator {
|
|
|
25
22
|
clientData,
|
|
26
23
|
signatureData
|
|
27
24
|
} = values;
|
|
28
|
-
|
|
29
25
|
if (!credentials && !authenticatorData && !clientData && !signatureData) {
|
|
30
26
|
return;
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
return credentials || {
|
|
34
29
|
authenticatorData,
|
|
35
30
|
clientData,
|
|
36
31
|
signatureData
|
|
37
32
|
};
|
|
38
33
|
}
|
|
39
|
-
|
|
40
34
|
getInputs() {
|
|
41
35
|
return [{
|
|
42
36
|
name: 'authenticatorData',
|
|
@@ -58,8 +52,6 @@ class WebauthnVerification extends _Authenticator.Authenticator {
|
|
|
58
52
|
visible: false
|
|
59
53
|
}];
|
|
60
54
|
}
|
|
61
|
-
|
|
62
55
|
}
|
|
63
|
-
|
|
64
56
|
exports.WebauthnVerification = WebauthnVerification;
|
|
65
57
|
//# sourceMappingURL=WebauthnVerification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnVerification.js","names":["WebauthnVerification","Authenticator","canVerify","values","credentials","obj","clientData","authenticatorData","signatureData","mapCredentials","getInputs","name","type","label","required","visible"],"sources":["../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebauthnVerification.js","names":["WebauthnVerification","Authenticator","canVerify","values","credentials","obj","clientData","authenticatorData","signatureData","mapCredentials","getInputs","name","type","label","required","visible"],"sources":["../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"mappings":";;;AAAA;AASO,MAAMA,oBAAoB,SAASC,4BAAa,CAA6B;EAClFC,SAAS,CAACC,MAAkC,EAAE;IAC5C,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM;IAC9B,MAAME,GAAG,GAAGD,WAAW,IAAID,MAAM;IACjC,MAAM;MAAEG,UAAU;MAAEC,iBAAiB;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAC5D,OAAO,CAAC,EAAEC,UAAU,IAAIC,iBAAiB,IAAIC,aAAa,CAAC;EAC7D;EAEAC,cAAc,CAACN,MAAkC,EAA2B;IAC1E,MAAM;MAAEC,WAAW;MAAEG,iBAAiB;MAAED,UAAU;MAAEE;IAAc,CAAC,GAAGL,MAAM;IAC5E,IAAI,CAACC,WAAW,IAAI,CAACG,iBAAiB,IAAI,CAACD,UAAU,IAAI,CAACE,aAAa,EAAE;MACvE;IACF;IACA,OAAOJ,WAAW,IAAK;MACrBG,iBAAiB;MACjBD,UAAU;MACVE;IACF,CAAE;EACJ;EAEAE,SAAS,GAAG;IACV,OAAO,CACL;MAAEC,IAAI,EAAE,mBAAmB;MAAEC,IAAI,EAAE,QAAQ;MAAEC,KAAK,EAAE,oBAAoB;MAAEC,QAAQ,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAM,CAAC,EAC1G;MAAEJ,IAAI,EAAE,YAAY;MAAEC,IAAI,EAAE,QAAQ;MAAEC,KAAK,EAAE,aAAa;MAAEC,QAAQ,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAM,CAAC,EAC5F;MAAEJ,IAAI,EAAE,eAAe;MAAEC,IAAI,EAAE,QAAQ;MAAEC,KAAK,EAAE,gBAAgB;MAAEC,QAAQ,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAM,CAAC,CACnG;EACH;AACF;AAAC"}
|
|
@@ -1,51 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.getAuthenticator = getAuthenticator;
|
|
4
|
-
|
|
5
4
|
var _OktaVerifyTotp = require("./OktaVerifyTotp");
|
|
6
|
-
|
|
7
5
|
var _VerificationCodeAuthenticator = require("./VerificationCodeAuthenticator");
|
|
8
|
-
|
|
9
6
|
var _OktaPassword = require("./OktaPassword");
|
|
10
|
-
|
|
11
7
|
var _SecurityQuestionEnrollment = require("./SecurityQuestionEnrollment");
|
|
12
|
-
|
|
13
8
|
var _SecurityQuestionVerification = require("./SecurityQuestionVerification");
|
|
14
|
-
|
|
15
9
|
var _WebauthnEnrollment = require("./WebauthnEnrollment");
|
|
16
|
-
|
|
17
10
|
var _WebauthnVerification = require("./WebauthnVerification");
|
|
18
|
-
|
|
19
11
|
var _types = require("../types");
|
|
20
|
-
|
|
21
12
|
/* eslint complexity:[0,8] */
|
|
22
13
|
function getAuthenticator(remediation) {
|
|
23
14
|
var _value$contextualData, _value$contextualData2;
|
|
24
|
-
|
|
25
15
|
const relatesTo = remediation.relatesTo;
|
|
26
16
|
const value = (relatesTo === null || relatesTo === void 0 ? void 0 : relatesTo.value) || {};
|
|
27
|
-
|
|
28
17
|
switch (value.key) {
|
|
29
18
|
case _types.AuthenticatorKey.OKTA_PASSWORD:
|
|
30
19
|
return new _OktaPassword.OktaPassword(value);
|
|
31
|
-
|
|
32
20
|
case _types.AuthenticatorKey.SECURITY_QUESTION:
|
|
33
21
|
if ((_value$contextualData = value.contextualData) !== null && _value$contextualData !== void 0 && _value$contextualData.enrolledQuestion) {
|
|
34
22
|
return new _SecurityQuestionVerification.SecurityQuestionVerification(value);
|
|
35
23
|
} else {
|
|
36
24
|
return new _SecurityQuestionEnrollment.SecurityQuestionEnrollment(value);
|
|
37
25
|
}
|
|
38
|
-
|
|
39
26
|
case _types.AuthenticatorKey.OKTA_VERIFY:
|
|
40
27
|
return new _OktaVerifyTotp.OktaVerifyTotp(value);
|
|
41
|
-
|
|
42
28
|
case _types.AuthenticatorKey.WEBAUTHN:
|
|
43
29
|
if ((_value$contextualData2 = value.contextualData) !== null && _value$contextualData2 !== void 0 && _value$contextualData2.challengeData) {
|
|
44
30
|
return new _WebauthnVerification.WebauthnVerification(value);
|
|
45
31
|
} else {
|
|
46
32
|
return new _WebauthnEnrollment.WebauthnEnrollment(value);
|
|
47
33
|
}
|
|
48
|
-
|
|
49
34
|
default:
|
|
50
35
|
return new _VerificationCodeAuthenticator.VerificationCodeAuthenticator(value);
|
|
51
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAuthenticator.js","names":["getAuthenticator","remediation","relatesTo","value","key","AuthenticatorKey","OKTA_PASSWORD","OktaPassword","SECURITY_QUESTION","contextualData","enrolledQuestion","SecurityQuestionVerification","SecurityQuestionEnrollment","OKTA_VERIFY","OktaVerifyTotp","WEBAUTHN","challengeData","WebauthnVerification","WebauthnEnrollment","VerificationCodeAuthenticator"],"sources":["../../../../lib/idx/authenticator/getAuthenticator.ts"],"sourcesContent":["import { OktaVerifyTotp } from './OktaVerifyTotp';\nimport { Authenticator } from './Authenticator';\nimport { VerificationCodeAuthenticator } from './VerificationCodeAuthenticator';\nimport { OktaPassword } from './OktaPassword';\nimport { SecurityQuestionEnrollment } from './SecurityQuestionEnrollment';\nimport { SecurityQuestionVerification } from './SecurityQuestionVerification';\nimport { WebauthnEnrollment } from './WebauthnEnrollment';\nimport { WebauthnVerification } from './WebauthnVerification';\nimport { IdxAuthenticator, IdxRemediation } from '../types/idx-js';\nimport { AuthenticatorKey } from '../types';\n\n/* eslint complexity:[0,8] */\nexport function getAuthenticator(remediation: IdxRemediation): Authenticator<any> {\n const relatesTo = remediation.relatesTo;\n const value = relatesTo?.value || {} as IdxAuthenticator;\n switch (value.key) {\n case AuthenticatorKey.OKTA_PASSWORD:\n return new OktaPassword(value);\n case AuthenticatorKey.SECURITY_QUESTION:\n if (value.contextualData?.enrolledQuestion) {\n return new SecurityQuestionVerification(value);\n } else {\n return new SecurityQuestionEnrollment(value);\n }\n case AuthenticatorKey.OKTA_VERIFY:\n return new OktaVerifyTotp(value);\n case AuthenticatorKey.WEBAUTHN:\n if (value.contextualData?.challengeData) {\n return new WebauthnVerification(value);\n } else {\n return new WebauthnEnrollment(value);\n }\n default:\n return new VerificationCodeAuthenticator(value);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAuthenticator.js","names":["getAuthenticator","remediation","relatesTo","value","key","AuthenticatorKey","OKTA_PASSWORD","OktaPassword","SECURITY_QUESTION","contextualData","enrolledQuestion","SecurityQuestionVerification","SecurityQuestionEnrollment","OKTA_VERIFY","OktaVerifyTotp","WEBAUTHN","challengeData","WebauthnVerification","WebauthnEnrollment","VerificationCodeAuthenticator"],"sources":["../../../../lib/idx/authenticator/getAuthenticator.ts"],"sourcesContent":["import { OktaVerifyTotp } from './OktaVerifyTotp';\nimport { Authenticator } from './Authenticator';\nimport { VerificationCodeAuthenticator } from './VerificationCodeAuthenticator';\nimport { OktaPassword } from './OktaPassword';\nimport { SecurityQuestionEnrollment } from './SecurityQuestionEnrollment';\nimport { SecurityQuestionVerification } from './SecurityQuestionVerification';\nimport { WebauthnEnrollment } from './WebauthnEnrollment';\nimport { WebauthnVerification } from './WebauthnVerification';\nimport { IdxAuthenticator, IdxRemediation } from '../types/idx-js';\nimport { AuthenticatorKey } from '../types';\n\n/* eslint complexity:[0,8] */\nexport function getAuthenticator(remediation: IdxRemediation): Authenticator<any> {\n const relatesTo = remediation.relatesTo;\n const value = relatesTo?.value || {} as IdxAuthenticator;\n switch (value.key) {\n case AuthenticatorKey.OKTA_PASSWORD:\n return new OktaPassword(value);\n case AuthenticatorKey.SECURITY_QUESTION:\n if (value.contextualData?.enrolledQuestion) {\n return new SecurityQuestionVerification(value);\n } else {\n return new SecurityQuestionEnrollment(value);\n }\n case AuthenticatorKey.OKTA_VERIFY:\n return new OktaVerifyTotp(value);\n case AuthenticatorKey.WEBAUTHN:\n if (value.contextualData?.challengeData) {\n return new WebauthnVerification(value);\n } else {\n return new WebauthnEnrollment(value);\n }\n default:\n return new VerificationCodeAuthenticator(value);\n }\n}\n"],"mappings":";;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACO,SAASA,gBAAgB,CAACC,WAA2B,EAAsB;EAAA;EAChF,MAAMC,SAAS,GAAGD,WAAW,CAACC,SAAS;EACvC,MAAMC,KAAK,GAAG,CAAAD,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEC,KAAK,KAAI,CAAC,CAAqB;EACxD,QAAQA,KAAK,CAACC,GAAG;IACf,KAAKC,uBAAgB,CAACC,aAAa;MACjC,OAAO,IAAIC,0BAAY,CAACJ,KAAK,CAAC;IAChC,KAAKE,uBAAgB,CAACG,iBAAiB;MACrC,6BAAIL,KAAK,CAACM,cAAc,kDAApB,sBAAsBC,gBAAgB,EAAE;QAC1C,OAAO,IAAIC,0DAA4B,CAACR,KAAK,CAAC;MAChD,CAAC,MAAM;QACL,OAAO,IAAIS,sDAA0B,CAACT,KAAK,CAAC;MAC9C;IACF,KAAKE,uBAAgB,CAACQ,WAAW;MAC/B,OAAO,IAAIC,8BAAc,CAACX,KAAK,CAAC;IAClC,KAAKE,uBAAgB,CAACU,QAAQ;MAC5B,8BAAIZ,KAAK,CAACM,cAAc,mDAApB,uBAAsBO,aAAa,EAAE;QACvC,OAAO,IAAIC,0CAAoB,CAACd,KAAK,CAAC;MACxC,CAAC,MAAM;QACL,OAAO,IAAIe,sCAAkB,CAACf,KAAK,CAAC;MACtC;IACF;MACE,OAAO,IAAIgB,4DAA6B,CAAChB,KAAK,CAAC;EAAC;AAEtD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _getAuthenticator = require("./getAuthenticator");
|
|
4
|
-
|
|
5
4
|
Object.keys(_getAuthenticator).forEach(function (key) {
|
|
6
5
|
if (key === "default" || key === "__esModule") return;
|
|
7
6
|
if (key in exports && exports[key] === _getAuthenticator[key]) return;
|
|
@@ -12,9 +11,7 @@ Object.keys(_getAuthenticator).forEach(function (key) {
|
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
});
|
|
15
|
-
|
|
16
14
|
var _Authenticator = require("./Authenticator");
|
|
17
|
-
|
|
18
15
|
Object.keys(_Authenticator).forEach(function (key) {
|
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
|
20
17
|
if (key in exports && exports[key] === _Authenticator[key]) return;
|
|
@@ -25,9 +22,7 @@ Object.keys(_Authenticator).forEach(function (key) {
|
|
|
25
22
|
}
|
|
26
23
|
});
|
|
27
24
|
});
|
|
28
|
-
|
|
29
25
|
var _VerificationCodeAuthenticator = require("./VerificationCodeAuthenticator");
|
|
30
|
-
|
|
31
26
|
Object.keys(_VerificationCodeAuthenticator).forEach(function (key) {
|
|
32
27
|
if (key === "default" || key === "__esModule") return;
|
|
33
28
|
if (key in exports && exports[key] === _VerificationCodeAuthenticator[key]) return;
|
|
@@ -38,9 +33,7 @@ Object.keys(_VerificationCodeAuthenticator).forEach(function (key) {
|
|
|
38
33
|
}
|
|
39
34
|
});
|
|
40
35
|
});
|
|
41
|
-
|
|
42
36
|
var _OktaPassword = require("./OktaPassword");
|
|
43
|
-
|
|
44
37
|
Object.keys(_OktaPassword).forEach(function (key) {
|
|
45
38
|
if (key === "default" || key === "__esModule") return;
|
|
46
39
|
if (key in exports && exports[key] === _OktaPassword[key]) return;
|
|
@@ -51,9 +44,7 @@ Object.keys(_OktaPassword).forEach(function (key) {
|
|
|
51
44
|
}
|
|
52
45
|
});
|
|
53
46
|
});
|
|
54
|
-
|
|
55
47
|
var _SecurityQuestionEnrollment = require("./SecurityQuestionEnrollment");
|
|
56
|
-
|
|
57
48
|
Object.keys(_SecurityQuestionEnrollment).forEach(function (key) {
|
|
58
49
|
if (key === "default" || key === "__esModule") return;
|
|
59
50
|
if (key in exports && exports[key] === _SecurityQuestionEnrollment[key]) return;
|
|
@@ -64,9 +55,7 @@ Object.keys(_SecurityQuestionEnrollment).forEach(function (key) {
|
|
|
64
55
|
}
|
|
65
56
|
});
|
|
66
57
|
});
|
|
67
|
-
|
|
68
58
|
var _SecurityQuestionVerification = require("./SecurityQuestionVerification");
|
|
69
|
-
|
|
70
59
|
Object.keys(_SecurityQuestionVerification).forEach(function (key) {
|
|
71
60
|
if (key === "default" || key === "__esModule") return;
|
|
72
61
|
if (key in exports && exports[key] === _SecurityQuestionVerification[key]) return;
|
|
@@ -77,9 +66,7 @@ Object.keys(_SecurityQuestionVerification).forEach(function (key) {
|
|
|
77
66
|
}
|
|
78
67
|
});
|
|
79
68
|
});
|
|
80
|
-
|
|
81
69
|
var _WebauthnEnrollment = require("./WebauthnEnrollment");
|
|
82
|
-
|
|
83
70
|
Object.keys(_WebauthnEnrollment).forEach(function (key) {
|
|
84
71
|
if (key === "default" || key === "__esModule") return;
|
|
85
72
|
if (key in exports && exports[key] === _WebauthnEnrollment[key]) return;
|
|
@@ -90,9 +77,7 @@ Object.keys(_WebauthnEnrollment).forEach(function (key) {
|
|
|
90
77
|
}
|
|
91
78
|
});
|
|
92
79
|
});
|
|
93
|
-
|
|
94
80
|
var _WebauthnVerification = require("./WebauthnVerification");
|
|
95
|
-
|
|
96
81
|
Object.keys(_WebauthnVerification).forEach(function (key) {
|
|
97
82
|
if (key === "default" || key === "__esModule") return;
|
|
98
83
|
if (key in exports && exports[key] === _WebauthnVerification[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/idx/authenticator/index.ts"],"sourcesContent":["export * from './getAuthenticator';\nexport * from './Authenticator';\nexport * from './VerificationCodeAuthenticator';\nexport * from './OktaPassword';\nexport * from './SecurityQuestionEnrollment';\nexport * from './SecurityQuestionVerification';\nexport * from './WebauthnEnrollment';\nexport * from './WebauthnVerification';\n\nimport { OktaPasswordInputValues } from './OktaPassword';\nimport { SecurityQuestionEnrollValues } from './SecurityQuestionEnrollment';\nimport { SecurityQuestionVerificationValues } from './SecurityQuestionVerification';\nimport { VerificationCodeValues } from './VerificationCodeAuthenticator';\nimport { WebauthnEnrollValues } from './WebauthnEnrollment';\nimport { WebauthnVerificationValues } from './WebauthnVerification';\n\nexport type AuthenticatorValues = OktaPasswordInputValues\n & SecurityQuestionEnrollValues\n & SecurityQuestionVerificationValues\n & VerificationCodeValues\n & WebauthnEnrollValues\n & WebauthnVerificationValues;\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/idx/authenticator/index.ts"],"sourcesContent":["export * from './getAuthenticator';\nexport * from './Authenticator';\nexport * from './VerificationCodeAuthenticator';\nexport * from './OktaPassword';\nexport * from './SecurityQuestionEnrollment';\nexport * from './SecurityQuestionVerification';\nexport * from './WebauthnEnrollment';\nexport * from './WebauthnVerification';\n\nimport { OktaPasswordInputValues } from './OktaPassword';\nimport { SecurityQuestionEnrollValues } from './SecurityQuestionEnrollment';\nimport { SecurityQuestionVerificationValues } from './SecurityQuestionVerification';\nimport { VerificationCodeValues } from './VerificationCodeAuthenticator';\nimport { WebauthnEnrollValues } from './WebauthnEnrollment';\nimport { WebauthnVerificationValues } from './WebauthnVerification';\n\nexport type AuthenticatorValues = OktaPasswordInputValues\n & SecurityQuestionEnrollValues\n & SecurityQuestionVerificationValues\n & VerificationCodeValues\n & WebauthnEnrollValues\n & WebauthnVerificationValues;\n"],"mappings":";;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
exports.compareAuthenticators = compareAuthenticators;
|
|
4
4
|
exports.findMatchedOption = findMatchedOption;
|
|
5
5
|
exports.formatAuthenticator = formatAuthenticator;
|
|
6
|
-
|
|
7
6
|
var _types = require("../types");
|
|
8
|
-
|
|
9
7
|
function formatAuthenticator(incoming) {
|
|
10
8
|
let authenticator;
|
|
11
|
-
|
|
12
9
|
if ((0, _types.isAuthenticator)(incoming)) {
|
|
13
10
|
authenticator = incoming;
|
|
14
11
|
} else if (typeof incoming === 'string') {
|
|
@@ -18,43 +15,36 @@ function formatAuthenticator(incoming) {
|
|
|
18
15
|
} else {
|
|
19
16
|
throw new Error('Invalid format for authenticator');
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
return authenticator;
|
|
23
|
-
}
|
|
24
|
-
|
|
19
|
+
}
|
|
25
20
|
|
|
21
|
+
// Returns true if the authenticators are equivalent
|
|
26
22
|
function compareAuthenticators(auth1, auth2) {
|
|
27
23
|
if (!auth1 || !auth2) {
|
|
28
24
|
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
}
|
|
26
|
+
// by id
|
|
32
27
|
if (auth1.id && auth2.id) {
|
|
33
28
|
return auth1.id === auth2.id;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
}
|
|
30
|
+
// by key
|
|
37
31
|
if (auth1.key && auth2.key) {
|
|
38
32
|
return auth1.key === auth2.key;
|
|
39
33
|
}
|
|
40
|
-
|
|
41
34
|
return false;
|
|
42
|
-
}
|
|
43
|
-
|
|
35
|
+
}
|
|
44
36
|
|
|
37
|
+
// Find matched authenticator in provided order
|
|
45
38
|
function findMatchedOption(authenticators, options) {
|
|
46
39
|
let option;
|
|
47
|
-
|
|
48
40
|
for (let authenticator of authenticators) {
|
|
49
41
|
option = options.find(({
|
|
50
42
|
relatesTo
|
|
51
43
|
}) => relatesTo.key === authenticator.key);
|
|
52
|
-
|
|
53
44
|
if (option) {
|
|
54
45
|
break;
|
|
55
46
|
}
|
|
56
47
|
}
|
|
57
|
-
|
|
58
48
|
return option;
|
|
59
49
|
}
|
|
60
50
|
//# sourceMappingURL=util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":["formatAuthenticator","incoming","authenticator","isAuthenticator","key","Error","compareAuthenticators","auth1","auth2","id","findMatchedOption","authenticators","options","option","find","relatesTo"],"sources":["../../../../lib/idx/authenticator/util.ts"],"sourcesContent":["import { Authenticator, isAuthenticator } from '../types';\n\nexport function formatAuthenticator(incoming: unknown): Authenticator {\n let authenticator: Authenticator;\n if (isAuthenticator(incoming)) {\n authenticator = incoming;\n } else if (typeof incoming === 'string') {\n authenticator = {\n key: incoming\n };\n } else {\n throw new Error('Invalid format for authenticator');\n }\n return authenticator;\n}\n\n// Returns true if the authenticators are equivalent\nexport function compareAuthenticators(auth1, auth2) {\n if (!auth1 || !auth2) {\n return false;\n }\n // by id\n if (auth1.id && auth2.id) {\n return (auth1.id === auth2.id);\n }\n // by key\n if (auth1.key && auth2.key) {\n return (auth1.key === auth2.key);\n }\n return false;\n}\n\n// Find matched authenticator in provided order\nexport function findMatchedOption(authenticators, options) {\n let option;\n for (let authenticator of authenticators) {\n option = options\n .find(({ relatesTo }) => relatesTo.key === authenticator.key);\n if (option) {\n break;\n }\n }\n return option;\n}"],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","names":["formatAuthenticator","incoming","authenticator","isAuthenticator","key","Error","compareAuthenticators","auth1","auth2","id","findMatchedOption","authenticators","options","option","find","relatesTo"],"sources":["../../../../lib/idx/authenticator/util.ts"],"sourcesContent":["import { Authenticator, isAuthenticator } from '../types';\n\nexport function formatAuthenticator(incoming: unknown): Authenticator {\n let authenticator: Authenticator;\n if (isAuthenticator(incoming)) {\n authenticator = incoming;\n } else if (typeof incoming === 'string') {\n authenticator = {\n key: incoming\n };\n } else {\n throw new Error('Invalid format for authenticator');\n }\n return authenticator;\n}\n\n// Returns true if the authenticators are equivalent\nexport function compareAuthenticators(auth1, auth2) {\n if (!auth1 || !auth2) {\n return false;\n }\n // by id\n if (auth1.id && auth2.id) {\n return (auth1.id === auth2.id);\n }\n // by key\n if (auth1.key && auth2.key) {\n return (auth1.key === auth2.key);\n }\n return false;\n}\n\n// Find matched authenticator in provided order\nexport function findMatchedOption(authenticators, options) {\n let option;\n for (let authenticator of authenticators) {\n option = options\n .find(({ relatesTo }) => relatesTo.key === authenticator.key);\n if (option) {\n break;\n }\n }\n return option;\n}"],"mappings":";;;;;AAAA;AAEO,SAASA,mBAAmB,CAACC,QAAiB,EAAiB;EACpE,IAAIC,aAA4B;EAChC,IAAK,IAAAC,sBAAe,EAACF,QAAQ,CAAC,EAAE;IAC9BC,aAAa,GAAGD,QAAQ;EAC1B,CAAC,MAAM,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAE;IACvCC,aAAa,GAAG;MACdE,GAAG,EAAEH;IACP,CAAC;EACH,CAAC,MAAM;IACL,MAAM,IAAII,KAAK,CAAC,kCAAkC,CAAC;EACrD;EACA,OAAOH,aAAa;AACtB;;AAEA;AACO,SAASI,qBAAqB,CAACC,KAAK,EAAEC,KAAK,EAAE;EAClD,IAAI,CAACD,KAAK,IAAI,CAACC,KAAK,EAAE;IACpB,OAAO,KAAK;EACd;EACA;EACA,IAAID,KAAK,CAACE,EAAE,IAAID,KAAK,CAACC,EAAE,EAAE;IACxB,OAAQF,KAAK,CAACE,EAAE,KAAKD,KAAK,CAACC,EAAE;EAC/B;EACA;EACA,IAAIF,KAAK,CAACH,GAAG,IAAII,KAAK,CAACJ,GAAG,EAAE;IAC1B,OAAQG,KAAK,CAACH,GAAG,KAAKI,KAAK,CAACJ,GAAG;EACjC;EACA,OAAO,KAAK;AACd;;AAEA;AACO,SAASM,iBAAiB,CAACC,cAAc,EAAEC,OAAO,EAAE;EACzD,IAAIC,MAAM;EACV,KAAK,IAAIX,aAAa,IAAIS,cAAc,EAAE;IACxCE,MAAM,GAAGD,OAAO,CACbE,IAAI,CAAC,CAAC;MAAEC;IAAU,CAAC,KAAKA,SAAS,CAACX,GAAG,KAAKF,aAAa,CAACE,GAAG,CAAC;IAC/D,IAAIS,MAAM,EAAE;MACV;IACF;EACF;EACA,OAAOA,MAAM;AACf"}
|
package/cjs/idx/cancel.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.cancel = cancel;
|
|
4
|
-
|
|
5
4
|
var _run = require("./run");
|
|
6
|
-
|
|
7
5
|
var _flow = require("./flow");
|
|
8
|
-
|
|
9
6
|
/*!
|
|
10
7
|
* Copyright (c) 2021, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
11
8
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -17,10 +14,12 @@ var _flow = require("./flow");
|
|
|
17
14
|
*
|
|
18
15
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
19
16
|
*/
|
|
17
|
+
|
|
20
18
|
async function cancel(authClient, options) {
|
|
21
19
|
const meta = authClient.transactionManager.load();
|
|
22
20
|
const flowSpec = (0, _flow.getFlowSpecification)(authClient, meta.flow);
|
|
23
|
-
return (0, _run.run)(authClient, {
|
|
21
|
+
return (0, _run.run)(authClient, {
|
|
22
|
+
...options,
|
|
24
23
|
...flowSpec,
|
|
25
24
|
actions: ['cancel']
|
|
26
25
|
});
|