@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnrollPoll.js","names":["EnrollPoll","Remediator","canRemediate","startPolling","options","step","getNextStep","authClient","context","common","authenticator","getAuthenticator","currentAuthenticator","value","poll","required","refresh","remediation","getValuesAfterProceed","trimmedValues","valueKey","
|
|
1
|
+
{"version":3,"file":"EnrollPoll.js","names":["EnrollPoll","Remediator","canRemediate","values","startPolling","options","step","getNextStep","authClient","context","common","authenticator","getAuthenticator","currentAuthenticator","value","poll","required","refresh","remediation","getValuesAfterProceed","trimmedValues","Object","keys","filter","valueKey","reduce"],"sources":["../../../../lib/idx/remediators/EnrollPoll.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Remediator, RemediationValues } from './Base/Remediator';\nimport { NextStep, OktaAuthIdxInterface } from '../types';\nimport { IdxContext } from '../types/idx-js';\n\nexport interface EnrollPollValues extends RemediationValues {\n startPolling?: boolean;\n}\n\nexport class EnrollPoll extends Remediator<EnrollPollValues> {\n static remediationName = 'enroll-poll';\n\n canRemediate() {\n return !!this.values.startPolling || this.options.step === 'enroll-poll';\n }\n\n getNextStep(authClient: OktaAuthIdxInterface, context?: IdxContext): NextStep {\n const common = super.getNextStep(authClient, context);\n let authenticator = this.getAuthenticator();\n if (!authenticator && context?.currentAuthenticator) {\n authenticator = context.currentAuthenticator.value;\n }\n return {\n ...common,\n authenticator,\n poll: {\n required: true,\n refresh: this.remediation.refresh\n },\n };\n }\n\n getValuesAfterProceed(): EnrollPollValues {\n let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'startPolling');\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;AAWO,MAAMA,UAAN,SAAyBC,sBAAzB,CAAsD;EAG3DC,YAAY,GAAG;IACb,OAAO,CAAC,CAAC,KAAKC,MAAL,CAAYC,YAAd,IAA8B,KAAKC,OAAL,CAAaC,IAAb,KAAsB,aAA3D;EACD;;EAEDC,WAAW,CAACC,UAAD,EAAmCC,OAAnC,EAAmE;IAC5E,MAAMC,MAAM,GAAG,MAAMH,WAAN,CAAkBC,UAAlB,EAA8BC,OAA9B,CAAf;IACA,IAAIE,aAAa,GAAG,KAAKC,gBAAL,EAApB;;IACA,IAAI,CAACD,aAAD,IAAkBF,OAAlB,aAAkBA,OAAlB,eAAkBA,OAAO,CAAEI,oBAA/B,EAAqD;MACnDF,aAAa,GAAGF,OAAO,CAACI,oBAAR,CAA6BC,KAA7C;IACD;;IACD,OAAO,EACL,GAAGJ,MADE;MAELC,aAFK;MAGLI,IAAI,EAAE;QACJC,QAAQ,EAAE,IADN;QAEJC,OAAO,EAAE,KAAKC,WAAL,CAAiBD;MAFtB;IAHD,CAAP;EAQD;;EAEDE,qBAAqB,GAAqB;IACxC,IAAIC,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKnB,MAAjB,EAAyBoB,MAAzB,CAAgCC,QAAQ,IAAIA,QAAQ,KAAK,cAAzD,CAApB;IACA,OAAOJ,aAAa,CAACK,MAAd,CAAqB,CAACtB,MAAD,EAASqB,QAAT,MAAuB,EAAC,GAAGrB,MAAJ;MAAY,CAACqB,QAAD,GAAY,KAAKrB,MAAL,CAAYqB,QAAZ;IAAxB,CAAvB,CAArB,EAA6F,EAA7F,CAAP;EACD;;AA1B0D;;;8BAAhDxB,U,qBACc,a"}
|
|
@@ -1,20 +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.EnrollProfile = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
10
|
-
|
|
11
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
12
|
-
|
|
13
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
14
|
-
|
|
15
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
16
|
-
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
8
|
|
|
19
9
|
var _Remediator = require("./Base/Remediator");
|
|
20
10
|
|
|
@@ -48,10 +38,8 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
48
38
|
}
|
|
49
39
|
|
|
50
40
|
canRemediate() {
|
|
51
|
-
var _context, _context2;
|
|
52
|
-
|
|
53
41
|
// ensure credentials can be verified, if required
|
|
54
|
-
if (this.authenticator && !this.authenticator.canVerify(
|
|
42
|
+
if (this.authenticator && !this.authenticator.canVerify(this.values)) {
|
|
55
43
|
return false;
|
|
56
44
|
}
|
|
57
45
|
|
|
@@ -62,10 +50,10 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
62
50
|
} // eslint-disable-next-line max-len
|
|
63
51
|
|
|
64
52
|
|
|
65
|
-
const userProfileFromRemediation =
|
|
53
|
+
const userProfileFromRemediation = this.remediation.value.find(({
|
|
66
54
|
name
|
|
67
55
|
}) => name === 'userProfile');
|
|
68
|
-
return
|
|
56
|
+
return userProfileFromRemediation.form.value.reduce((canRemediate, curr) => {
|
|
69
57
|
if (curr.required) {
|
|
70
58
|
canRemediate = canRemediate && !!userProfileFromValues[curr.name];
|
|
71
59
|
}
|
|
@@ -75,9 +63,7 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
75
63
|
}
|
|
76
64
|
|
|
77
65
|
getCredentialsFromRemediation() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return (0, _find.default)(_context3 = this.remediation.value).call(_context3, ({
|
|
66
|
+
return this.remediation.value.find(({
|
|
81
67
|
name
|
|
82
68
|
}) => name === 'credentials');
|
|
83
69
|
}
|
|
@@ -87,14 +73,14 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
87
73
|
value: profileAttributes
|
|
88
74
|
}
|
|
89
75
|
}) {
|
|
90
|
-
const attributeNames =
|
|
76
|
+
const attributeNames = profileAttributes.map(({
|
|
91
77
|
name
|
|
92
78
|
}) => name);
|
|
93
|
-
const data =
|
|
94
|
-
[attributeName]:
|
|
79
|
+
const data = attributeNames.reduce((attributeValues, attributeName) => this.values[attributeName] ? { ...attributeValues,
|
|
80
|
+
[attributeName]: this.values[attributeName]
|
|
95
81
|
} : attributeValues, {});
|
|
96
82
|
|
|
97
|
-
if (
|
|
83
|
+
if (Object.keys(data).length === 0) {
|
|
98
84
|
return;
|
|
99
85
|
}
|
|
100
86
|
|
|
@@ -102,7 +88,7 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
102
88
|
}
|
|
103
89
|
|
|
104
90
|
mapCredentials() {
|
|
105
|
-
const val = this.authenticator && this.authenticator.mapCredentials(
|
|
91
|
+
const val = this.authenticator && this.authenticator.mapCredentials(this.values);
|
|
106
92
|
|
|
107
93
|
if (!val) {
|
|
108
94
|
return;
|
|
@@ -120,9 +106,7 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
120
106
|
}
|
|
121
107
|
|
|
122
108
|
getErrorMessages(errorRemediation) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return (0, _reduce.default)(_context4 = errorRemediation.value[0].form.value).call(_context4, (errors, field) => {
|
|
109
|
+
return errorRemediation.value[0].form.value.reduce((errors, field) => {
|
|
126
110
|
if (field.messages) {
|
|
127
111
|
errors.push(field.messages.value[0].message);
|
|
128
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnrollProfile.js","names":["EnrollProfile","Remediator","constructor","remediation","values","options","credentials","getCredentialsFromRemediation","authenticator","OktaPassword","canRemediate","canVerify","userProfileFromValues","getData","userProfile","userProfileFromRemediation","value","name","form","curr","required","mapUserProfile","profileAttributes","attributeNames","data","attributeValues","attributeName","length","mapCredentials","val","getInputUserProfile","input","getInputCredentials","getErrorMessages","errorRemediation","errors","field","messages","push","message"],"sources":["../../../../lib/idx/remediators/EnrollProfile.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 { IdxRemediation, IdxRemediationValue, IdxAuthenticator } from '../types/idx-js';\nimport { RemediateOptions } from '
|
|
1
|
+
{"version":3,"file":"EnrollProfile.js","names":["EnrollProfile","Remediator","constructor","remediation","values","options","credentials","getCredentialsFromRemediation","authenticator","OktaPassword","canRemediate","canVerify","userProfileFromValues","getData","userProfile","userProfileFromRemediation","value","find","name","form","reduce","curr","required","mapUserProfile","profileAttributes","attributeNames","map","data","attributeValues","attributeName","Object","keys","length","mapCredentials","val","getInputUserProfile","input","getInputCredentials","getErrorMessages","errorRemediation","errors","field","messages","push","message"],"sources":["../../../../lib/idx/remediators/EnrollProfile.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 { IdxRemediation, IdxRemediationValue, IdxAuthenticator } from '../types/idx-js';\nimport { RemediateOptions } from '../types';\nimport { Remediator, RemediationValues } from './Base/Remediator';\nimport { Authenticator, Credentials, OktaPassword } from '../authenticator';\n\nexport interface EnrollProfileValues extends RemediationValues {\n firstName?: string;\n lastName?: string;\n email?: string;\n credentials?: Credentials;\n password?: string;\n passcode?: string;\n}\n\nexport class EnrollProfile extends Remediator<EnrollProfileValues> {\n static remediationName = 'enroll-profile';\n\n authenticator: Authenticator<any> | null = null;\n\n constructor(\n remediation: IdxRemediation,\n values: EnrollProfileValues = {},\n options: RemediateOptions = {}\n ) {\n super(remediation, values, options);\n\n // credentials are only required when Profile Enrollment policy requires them\n // if credentials are included in the remediation, they are considered required\n // otherwise it will be omitted\n const credentials = this.getCredentialsFromRemediation();\n if (credentials) {\n this.authenticator = this.authenticator = new OktaPassword({} as IdxAuthenticator);\n }\n }\n\n canRemediate() {\n // ensure credentials can be verified, if required\n if (this.authenticator && !this.authenticator.canVerify(this.values)) {\n return false;\n }\n\n const userProfileFromValues = this.getData().userProfile;\n if (!userProfileFromValues) {\n return false;\n }\n // eslint-disable-next-line max-len\n const userProfileFromRemediation = this.remediation.value!.find(({ name }) => name === 'userProfile') as IdxRemediationValue;\n return userProfileFromRemediation.form!.value.reduce((canRemediate, curr) => {\n if (curr.required) {\n canRemediate = canRemediate && !!userProfileFromValues[curr.name];\n }\n return canRemediate;\n }, true);\n }\n\n getCredentialsFromRemediation () {\n return this.remediation.value!.find(({ name }) => name === 'credentials');\n }\n\n mapUserProfile({form: { value: profileAttributes }}) {\n const attributeNames = profileAttributes.map(({name}) => name);\n const data = attributeNames.reduce((attributeValues, attributeName) => (\n this.values[attributeName] ? {\n ...attributeValues,\n [attributeName]: this.values[attributeName]\n } : attributeValues), {});\n if (Object.keys(data).length === 0) {\n return;\n }\n return data;\n }\n\n mapCredentials() {\n const val = this.authenticator && this.authenticator.mapCredentials(this.values);\n if (!val) {\n return;\n }\n return val;\n }\n\n getInputUserProfile(input) {\n return [...input.form.value];\n }\n\n getInputCredentials(input) {\n return [...input.form.value];\n }\n\n getErrorMessages(errorRemediation) {\n return errorRemediation.value[0].form.value.reduce((errors, field) => {\n if (field.messages) {\n errors.push(field.messages.value[0].message);\n }\n return errors;\n }, []);\n }\n}"],"mappings":";;;;;;;;AAgBA;;AACA;;AAjBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAiBO,MAAMA,aAAN,SAA4BC,sBAA5B,CAA4D;EAKjEC,WAAW,CACTC,WADS,EAETC,MAA2B,GAAG,EAFrB,EAGTC,OAAyB,GAAG,EAHnB,EAIT;IACA,MAAMF,WAAN,EAAmBC,MAAnB,EAA2BC,OAA3B,EADA,CAGA;IACA;IACA;;IALA,qDANyC,IAMzC;IAMA,MAAMC,WAAW,GAAG,KAAKC,6BAAL,EAApB;;IACA,IAAID,WAAJ,EAAiB;MACf,KAAKE,aAAL,GAAqB,KAAKA,aAAL,GAAqB,IAAIC,2BAAJ,CAAiB,EAAjB,CAA1C;IACD;EACF;;EAEDC,YAAY,GAAG;IACb;IACA,IAAI,KAAKF,aAAL,IAAsB,CAAC,KAAKA,aAAL,CAAmBG,SAAnB,CAA6B,KAAKP,MAAlC,CAA3B,EAAsE;MACpE,OAAO,KAAP;IACD;;IAED,MAAMQ,qBAAqB,GAAG,KAAKC,OAAL,GAAeC,WAA7C;;IACA,IAAI,CAACF,qBAAL,EAA4B;MAC1B,OAAO,KAAP;IACD,CATY,CAUb;;;IACA,MAAMG,0BAA0B,GAAG,KAAKZ,WAAL,CAAiBa,KAAjB,CAAwBC,IAAxB,CAA6B,CAAC;MAAEC;IAAF,CAAD,KAAcA,IAAI,KAAK,aAApD,CAAnC;IACA,OAAOH,0BAA0B,CAACI,IAA3B,CAAiCH,KAAjC,CAAuCI,MAAvC,CAA8C,CAACV,YAAD,EAAeW,IAAf,KAAwB;MAC3E,IAAIA,IAAI,CAACC,QAAT,EAAmB;QACjBZ,YAAY,GAAGA,YAAY,IAAI,CAAC,CAACE,qBAAqB,CAACS,IAAI,CAACH,IAAN,CAAtD;MACD;;MACD,OAAOR,YAAP;IACD,CALM,EAKJ,IALI,CAAP;EAMD;;EAEDH,6BAA6B,GAAI;IAC/B,OAAO,KAAKJ,WAAL,CAAiBa,KAAjB,CAAwBC,IAAxB,CAA6B,CAAC;MAAEC;IAAF,CAAD,KAAcA,IAAI,KAAK,aAApD,CAAP;EACD;;EAEDK,cAAc,CAAC;IAACJ,IAAI,EAAE;MAAEH,KAAK,EAAEQ;IAAT;EAAP,CAAD,EAAuC;IACnD,MAAMC,cAAc,GAAGD,iBAAiB,CAACE,GAAlB,CAAsB,CAAC;MAACR;IAAD,CAAD,KAAYA,IAAlC,CAAvB;IACA,MAAMS,IAAI,GAAGF,cAAc,CAACL,MAAf,CAAsB,CAACQ,eAAD,EAAkBC,aAAlB,KACjC,KAAKzB,MAAL,CAAYyB,aAAZ,IAA6B,EAC7B,GAAGD,eAD0B;MAE7B,CAACC,aAAD,GAAiB,KAAKzB,MAAL,CAAYyB,aAAZ;IAFY,CAA7B,GAGED,eAJS,EAIS,EAJT,CAAb;;IAKA,IAAIE,MAAM,CAACC,IAAP,CAAYJ,IAAZ,EAAkBK,MAAlB,KAA6B,CAAjC,EAAoC;MAClC;IACD;;IACD,OAAOL,IAAP;EACD;;EAEDM,cAAc,GAAG;IACf,MAAMC,GAAG,GAAG,KAAK1B,aAAL,IAAsB,KAAKA,aAAL,CAAmByB,cAAnB,CAAkC,KAAK7B,MAAvC,CAAlC;;IACA,IAAI,CAAC8B,GAAL,EAAU;MACR;IACD;;IACD,OAAOA,GAAP;EACD;;EAEDC,mBAAmB,CAACC,KAAD,EAAQ;IACzB,OAAO,CAAC,GAAGA,KAAK,CAACjB,IAAN,CAAWH,KAAf,CAAP;EACD;;EAEDqB,mBAAmB,CAACD,KAAD,EAAQ;IACzB,OAAO,CAAC,GAAGA,KAAK,CAACjB,IAAN,CAAWH,KAAf,CAAP;EACD;;EAEDsB,gBAAgB,CAACC,gBAAD,EAAmB;IACjC,OAAOA,gBAAgB,CAACvB,KAAjB,CAAuB,CAAvB,EAA0BG,IAA1B,CAA+BH,KAA/B,CAAqCI,MAArC,CAA4C,CAACoB,MAAD,EAASC,KAAT,KAAmB;MACpE,IAAIA,KAAK,CAACC,QAAV,EAAoB;QAClBF,MAAM,CAACG,IAAP,CAAYF,KAAK,CAACC,QAAN,CAAe1B,KAAf,CAAqB,CAArB,EAAwB4B,OAApC;MACD;;MACD,OAAOJ,MAAP;IACD,CALM,EAKJ,EALI,CAAP;EAMD;;AAjFgE;;;8BAAtDxC,a,qBACc,gB"}
|
|
@@ -1,20 +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.EnrollmentChannelData = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
10
|
-
|
|
11
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
12
|
-
|
|
13
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
14
|
-
|
|
15
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
16
|
-
|
|
17
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
8
|
|
|
19
9
|
var _Remediator = require("./Base/Remediator");
|
|
20
10
|
|
|
@@ -49,7 +39,7 @@ class EnrollmentChannelData extends _Remediator.Remediator {
|
|
|
49
39
|
}
|
|
50
40
|
|
|
51
41
|
canRemediate() {
|
|
52
|
-
return Boolean(
|
|
42
|
+
return Boolean(this.values.email || this.values.phoneNumber);
|
|
53
43
|
}
|
|
54
44
|
|
|
55
45
|
getNextStep(authClient, context) {
|
|
@@ -62,22 +52,16 @@ class EnrollmentChannelData extends _Remediator.Remediator {
|
|
|
62
52
|
|
|
63
53
|
getData() {
|
|
64
54
|
return {
|
|
65
|
-
stateHandle:
|
|
66
|
-
email:
|
|
67
|
-
phoneNumber:
|
|
55
|
+
stateHandle: this.values.stateHandle,
|
|
56
|
+
email: this.values.email,
|
|
57
|
+
phoneNumber: this.values.phoneNumber
|
|
68
58
|
};
|
|
69
59
|
}
|
|
70
60
|
|
|
71
61
|
getValuesAfterProceed() {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var _context2;
|
|
76
|
-
|
|
77
|
-
return !(0, _includes.default)(_context2 = ['email', 'phoneNumber']).call(_context2, valueKey);
|
|
78
|
-
});
|
|
79
|
-
return (0, _reduce.default)(trimmedValues).call(trimmedValues, (values, valueKey) => ({ ...values,
|
|
80
|
-
[valueKey]: (0, _values.default)(this)[valueKey]
|
|
62
|
+
let trimmedValues = Object.keys(this.values).filter(valueKey => !['email', 'phoneNumber'].includes(valueKey));
|
|
63
|
+
return trimmedValues.reduce((values, valueKey) => ({ ...values,
|
|
64
|
+
[valueKey]: this.values[valueKey]
|
|
81
65
|
}), {});
|
|
82
66
|
}
|
|
83
67
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnrollmentChannelData.js","names":["EnrollmentChannelData","Remediator","getInputEmail","name","type","required","label","getInputPhoneNumber","canRemediate","Boolean","email","phoneNumber","getNextStep","authClient","context","common","authenticator","currentAuthenticator","value","getData","stateHandle","getValuesAfterProceed","trimmedValues","valueKey","
|
|
1
|
+
{"version":3,"file":"EnrollmentChannelData.js","names":["EnrollmentChannelData","Remediator","getInputEmail","name","type","required","label","getInputPhoneNumber","canRemediate","Boolean","values","email","phoneNumber","getNextStep","authClient","context","common","authenticator","currentAuthenticator","value","getData","stateHandle","getValuesAfterProceed","trimmedValues","Object","keys","filter","valueKey","includes","reduce"],"sources":["../../../../lib/idx/remediators/EnrollmentChannelData.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Remediator, RemediationValues } from './Base/Remediator';\nimport { IdxContext } from '../types/idx-js';\nimport { OktaAuthIdxInterface } from '../types';\n\n\nexport type EnrollmentChannelDataValues = RemediationValues & {\n email?: string;\n phoneNumber?: string;\n};\n\nexport class EnrollmentChannelData extends Remediator<EnrollmentChannelDataValues> {\n static remediationName = 'enrollment-channel-data';\n\n getInputEmail() {\n return [\n { name: 'email', type: 'string', required: true, label: 'Email' },\n ];\n }\n\n getInputPhoneNumber() {\n return [\n { name: 'phoneNumber', type: 'string', required: true, label: 'Phone Number' },\n ];\n }\n\n canRemediate() {\n return Boolean(this.values.email || this.values.phoneNumber);\n }\n\n getNextStep(authClient: OktaAuthIdxInterface, context: IdxContext) {\n const common = super.getNextStep(authClient, context);\n const authenticator = context.currentAuthenticator.value;\n return {\n ...common,\n authenticator,\n };\n }\n\n getData() {\n return {\n stateHandle: this.values.stateHandle,\n email: this.values.email,\n phoneNumber: this.values.phoneNumber\n };\n }\n\n getValuesAfterProceed(): EnrollmentChannelDataValues {\n let trimmedValues = Object.keys(this.values).filter(valueKey => !['email', 'phoneNumber'].includes(valueKey));\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;AAaO,MAAMA,qBAAN,SAAoCC,sBAApC,CAA4E;EAGjFC,aAAa,GAAG;IACd,OAAO,CACL;MAAEC,IAAI,EAAE,OAAR;MAAiBC,IAAI,EAAE,QAAvB;MAAiCC,QAAQ,EAAE,IAA3C;MAAiDC,KAAK,EAAE;IAAxD,CADK,CAAP;EAGD;;EAEDC,mBAAmB,GAAG;IACpB,OAAO,CACL;MAAEJ,IAAI,EAAE,aAAR;MAAuBC,IAAI,EAAE,QAA7B;MAAuCC,QAAQ,EAAE,IAAjD;MAAuDC,KAAK,EAAE;IAA9D,CADK,CAAP;EAGD;;EAEDE,YAAY,GAAG;IACb,OAAOC,OAAO,CAAC,KAAKC,MAAL,CAAYC,KAAZ,IAAqB,KAAKD,MAAL,CAAYE,WAAlC,CAAd;EACD;;EAEDC,WAAW,CAACC,UAAD,EAAmCC,OAAnC,EAAwD;IACjE,MAAMC,MAAM,GAAG,MAAMH,WAAN,CAAkBC,UAAlB,EAA8BC,OAA9B,CAAf;IACA,MAAME,aAAa,GAAGF,OAAO,CAACG,oBAAR,CAA6BC,KAAnD;IACA,OAAO,EACL,GAAGH,MADE;MAELC;IAFK,CAAP;EAID;;EAEDG,OAAO,GAAG;IACR,OAAO;MACLC,WAAW,EAAE,KAAKX,MAAL,CAAYW,WADpB;MAELV,KAAK,EAAE,KAAKD,MAAL,CAAYC,KAFd;MAGLC,WAAW,EAAE,KAAKF,MAAL,CAAYE;IAHpB,CAAP;EAKD;;EAEDU,qBAAqB,GAAgC;IACnD,IAAIC,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKf,MAAjB,EAAyBgB,MAAzB,CAAgCC,QAAQ,IAAI,CAAC,CAAC,OAAD,EAAU,aAAV,EAAyBC,QAAzB,CAAkCD,QAAlC,CAA7C,CAApB;IACA,OAAOJ,aAAa,CAACM,MAAd,CAAqB,CAACnB,MAAD,EAASiB,QAAT,MAAuB,EAAC,GAAGjB,MAAJ;MAAY,CAACiB,QAAD,GAAY,KAAKjB,MAAL,CAAYiB,QAAZ;IAAxB,CAAvB,CAArB,EAA6F,EAA7F,CAAP;EACD;;AAvCgF;;;8BAAtE3B,qB,qBACc,yB"}
|
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.GenericRemediator = void 0;
|
|
6
4
|
|
|
7
|
-
var _endsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/ends-with"));
|
|
8
|
-
|
|
9
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
10
|
-
|
|
11
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/values"));
|
|
12
|
-
|
|
13
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
14
|
-
|
|
15
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
16
|
-
|
|
17
5
|
var _Remediator = require("../Base/Remediator");
|
|
18
6
|
|
|
19
7
|
var _util = require("./util");
|
|
20
8
|
|
|
21
9
|
class GenericRemediator extends _Remediator.Remediator {
|
|
22
10
|
canRemediate() {
|
|
23
|
-
var _context2;
|
|
24
|
-
|
|
25
11
|
// only handle remediations that are able to submit form (xhr)
|
|
26
12
|
if (typeof this.remediation.action !== 'function') {
|
|
27
13
|
return false;
|
|
@@ -33,7 +19,7 @@ class GenericRemediator extends _Remediator.Remediator {
|
|
|
33
19
|
// return res;
|
|
34
20
|
|
|
35
21
|
|
|
36
|
-
if (this.remediation.name === 'poll' ||
|
|
22
|
+
if (this.remediation.name === 'poll' || this.remediation.name.endsWith('-poll')) {
|
|
37
23
|
return true;
|
|
38
24
|
}
|
|
39
25
|
|
|
@@ -46,12 +32,10 @@ class GenericRemediator extends _Remediator.Remediator {
|
|
|
46
32
|
}
|
|
47
33
|
|
|
48
34
|
getData() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const data = (0, _reduce.default)(_context3 = this.getInputs()).call(_context3, (acc, {
|
|
35
|
+
const data = this.getInputs().reduce((acc, {
|
|
52
36
|
name
|
|
53
37
|
}) => {
|
|
54
|
-
acc[name] =
|
|
38
|
+
acc[name] = this.values[name];
|
|
55
39
|
return acc;
|
|
56
40
|
}, {});
|
|
57
41
|
return data;
|
|
@@ -99,11 +83,9 @@ class GenericRemediator extends _Remediator.Remediator {
|
|
|
99
83
|
}
|
|
100
84
|
|
|
101
85
|
getInputs() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return (0, _map.default)(_context4 = (0, _map.default)(_context5 = (0, _filter.default)(_context6 = this.remediation.value || []).call(_context6, ({
|
|
86
|
+
return (this.remediation.value || []).filter(({
|
|
105
87
|
name
|
|
106
|
-
}) => name !== 'stateHandle')
|
|
88
|
+
}) => name !== 'stateHandle').map(_util.unwrapFormValue).map(input => {
|
|
107
89
|
// use string as default input type
|
|
108
90
|
input.type = input.type || 'string';
|
|
109
91
|
return input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericRemediator.js","names":["GenericRemediator","Remediator","canRemediate","remediation","action","name","options","step","getData","data","getInputs","acc","getNextStep","authClient","_context","getName","inputs","href","method","rel","accepts","produces","value","rest","length","params","idx","proceed","unwrapFormValue","input","type"],"sources":["../../../../../lib/idx/remediators/GenericRemediator/GenericRemediator.ts"],"sourcesContent":["import { IdxContext, NextStep, Input } from '../../types';\nimport { Remediator } from '../Base/Remediator';\nimport { unwrapFormValue } from './util';\
|
|
1
|
+
{"version":3,"file":"GenericRemediator.js","names":["GenericRemediator","Remediator","canRemediate","remediation","action","name","endsWith","options","step","getData","data","getInputs","reduce","acc","values","getNextStep","authClient","_context","getName","inputs","href","method","rel","accepts","produces","value","rest","length","params","idx","proceed","filter","map","unwrapFormValue","input","type"],"sources":["../../../../../lib/idx/remediators/GenericRemediator/GenericRemediator.ts"],"sourcesContent":["import { OktaAuthIdxInterface, IdxContext, NextStep, Input } from '../../types';\nimport { Remediator } from '../Base/Remediator';\nimport { unwrapFormValue } from './util';\n\nexport class GenericRemediator extends Remediator {\n canRemediate(): boolean {\n // only handle remediations that are able to submit form (xhr)\n if (typeof this.remediation.action !== 'function') {\n return false;\n }\n\n // DO NOT REMOVE - bring it back when enable client side validation for GenericRemediator - OKTA-512003\n // const inputs = this.getInputs();\n // const res = inputs.reduce((acc, input) => {\n // return acc && hasValidInputValue(input, this.values);\n // }, true);\n // return res;\n\n if (this.remediation.name === 'poll' || this.remediation.name.endsWith('-poll')) {\n return true;\n }\n\n if (this.options.step) {\n return true;\n }\n \n // disable auto proceed for unknown remediations\n return false;\n }\n\n getData() {\n const data = this.getInputs().reduce((acc, { name }) => {\n acc[name] = this.values[name];\n return acc;\n }, {});\n return data;\n }\n\n getNextStep(authClient: OktaAuthIdxInterface, _context?: IdxContext): NextStep {\n const name = this.getName();\n const inputs = this.getInputs();\n \n /* eslint-disable no-unused-vars, @typescript-eslint/no-unused-vars */\n // excludes transformed fields\n const { \n // http metas have been transformed to action\n href, \n method, \n rel, \n accepts, \n produces, \n // value has been transform to inputs\n value,\n // will be transformed to a function that resolves IdxTransaction\n action,\n ...rest \n } = this.remediation;\n /* eslint-enable no-unused-vars, @typescript-eslint/no-unused-vars */\n\n // step to handle form submission\n if (action) {\n return { \n ...rest,\n ...(!!inputs.length && { inputs }),\n action: async (params?) => {\n return authClient.idx.proceed({\n step: name,\n ...params\n });\n }\n };\n }\n\n // return whole remediation data for other steps, eg \"redirect-idp\"\n return { ...this.remediation } as NextStep;\n \n }\n\n getInputs(): Input[] {\n return (this.remediation.value || [])\n .filter(({ name }) => name !== 'stateHandle')\n .map(unwrapFormValue)\n .map(input => {\n // use string as default input type\n input.type = input.type || 'string';\n return input;\n });\n }\n\n}\n"],"mappings":";;;;AACA;;AACA;;AAEO,MAAMA,iBAAN,SAAgCC,sBAAhC,CAA2C;EAChDC,YAAY,GAAY;IACtB;IACA,IAAI,OAAO,KAAKC,WAAL,CAAiBC,MAAxB,KAAmC,UAAvC,EAAmD;MACjD,OAAO,KAAP;IACD,CAJqB,CAMtB;IACA;IACA;IACA;IACA;IACA;;;IAEA,IAAI,KAAKD,WAAL,CAAiBE,IAAjB,KAA0B,MAA1B,IAAoC,KAAKF,WAAL,CAAiBE,IAAjB,CAAsBC,QAAtB,CAA+B,OAA/B,CAAxC,EAAiF;MAC/E,OAAO,IAAP;IACD;;IAED,IAAI,KAAKC,OAAL,CAAaC,IAAjB,EAAuB;MACrB,OAAO,IAAP;IACD,CAnBqB,CAqBtB;;;IACA,OAAO,KAAP;EACD;;EAEDC,OAAO,GAAG;IACR,MAAMC,IAAI,GAAG,KAAKC,SAAL,GAAiBC,MAAjB,CAAwB,CAACC,GAAD,EAAM;MAAER;IAAF,CAAN,KAAmB;MACtDQ,GAAG,CAACR,IAAD,CAAH,GAAY,KAAKS,MAAL,CAAYT,IAAZ,CAAZ;MACA,OAAOQ,GAAP;IACD,CAHY,EAGV,EAHU,CAAb;IAIA,OAAOH,IAAP;EACD;;EAEDK,WAAW,CAACC,UAAD,EAAmCC,QAAnC,EAAoE;IAC7E,MAAMZ,IAAI,GAAG,KAAKa,OAAL,EAAb;IACA,MAAMC,MAAM,GAAG,KAAKR,SAAL,EAAf;IAEA;IACA;;IACA,MAAM;MACJ;MACAS,IAFI;MAGJC,MAHI;MAIJC,GAJI;MAKJC,OALI;MAMJC,QANI;MAOJ;MACAC,KARI;MASJ;MACArB,MAVI;MAWJ,GAAGsB;IAXC,IAYF,KAAKvB,WAZT;IAaA;IAEA;;IACA,IAAIC,MAAJ,EAAY;MACV,OAAO,EACL,GAAGsB,IADE;QAEL,IAAI,CAAC,CAACP,MAAM,CAACQ,MAAT,IAAmB;UAAER;QAAF,CAAvB,CAFK;QAGLf,MAAM,EAAE,MAAOwB,MAAP,IAAmB;UACzB,OAAOZ,UAAU,CAACa,GAAX,CAAeC,OAAf,CAAuB;YAC5BtB,IAAI,EAAEH,IADsB;YAE5B,GAAGuB;UAFyB,CAAvB,CAAP;QAID;MARI,CAAP;IAUD,CAjC4E,CAmC7E;;;IACA,OAAO,EAAE,GAAG,KAAKzB;IAAV,CAAP;EAED;;EAEDQ,SAAS,GAAY;IACnB,OAAO,CAAC,KAAKR,WAAL,CAAiBsB,KAAjB,IAA0B,EAA3B,EACJM,MADI,CACG,CAAC;MAAE1B;IAAF,CAAD,KAAcA,IAAI,KAAK,aAD1B,EAEJ2B,GAFI,CAEAC,qBAFA,EAGJD,GAHI,CAGAE,KAAK,IAAI;MACZ;MACAA,KAAK,CAACC,IAAN,GAAaD,KAAK,CAACC,IAAN,IAAc,QAA3B;MACA,OAAOD,KAAP;IACD,CAPI,CAAP;EAQD;;AAnF+C"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
-
|
|
5
3
|
var _GenericRemediator = require("./GenericRemediator");
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Object.keys(_GenericRemediator).forEach(function (key) {
|
|
8
6
|
if (key === "default" || key === "__esModule") return;
|
|
9
7
|
if (key in exports && exports[key] === _GenericRemediator[key]) return;
|
|
10
8
|
Object.defineProperty(exports, key, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../lib/idx/remediators/GenericRemediator/index.ts"],"sourcesContent":["export * from './GenericRemediator';"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../lib/idx/remediators/GenericRemediator/index.ts"],"sourcesContent":["export * from './GenericRemediator';"],"mappings":";;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,32 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.hasValidInputValue = hasValidInputValue;
|
|
6
4
|
exports.unwrapFormValue = unwrapFormValue;
|
|
7
5
|
|
|
8
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
9
|
-
|
|
10
|
-
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
|
11
|
-
|
|
12
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
13
|
-
|
|
14
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
15
|
-
|
|
16
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
17
|
-
|
|
18
|
-
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
19
|
-
|
|
20
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
21
|
-
|
|
22
|
-
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
23
|
-
|
|
24
6
|
var _errors = require("../../../errors");
|
|
25
7
|
|
|
26
8
|
/* eslint-disable complexity */
|
|
27
9
|
function unwrapFormValue(remediation) {
|
|
28
10
|
if (Array.isArray(remediation)) {
|
|
29
|
-
return
|
|
11
|
+
return remediation.map(item => {
|
|
30
12
|
if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
|
|
31
13
|
return item;
|
|
32
14
|
}
|
|
@@ -37,21 +19,19 @@ function unwrapFormValue(remediation) {
|
|
|
37
19
|
|
|
38
20
|
const res = {};
|
|
39
21
|
|
|
40
|
-
for (const [key, value] of
|
|
22
|
+
for (const [key, value] of Object.entries(remediation)) {
|
|
41
23
|
if (value === null || typeof value === 'undefined') {
|
|
42
24
|
continue;
|
|
43
25
|
}
|
|
44
26
|
|
|
45
27
|
if (typeof value === 'object') {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const formKeys = (0, _keys.default)(value); // detect patterns like:
|
|
28
|
+
const formKeys = Object.keys(value); // detect patterns like:
|
|
49
29
|
// value -> form -> value | form -> value
|
|
50
30
|
|
|
51
|
-
if (
|
|
31
|
+
if (['value', 'form'].includes(key) && formKeys.length === 1 && ['value', 'form'].includes(formKeys[0])) {
|
|
52
32
|
// unwrap nested form
|
|
53
33
|
const unwrappedForm = unwrapFormValue(value);
|
|
54
|
-
|
|
34
|
+
Object.entries(unwrappedForm).forEach(([key, value]) => {
|
|
55
35
|
res[key] = value;
|
|
56
36
|
});
|
|
57
37
|
} else {
|
|
@@ -81,7 +61,7 @@ function hasValidInputValue(input, values) {
|
|
|
81
61
|
const isRequired = required || requiredTracker; // handle nested value - all required fields should be avaiable in values
|
|
82
62
|
|
|
83
63
|
if (Array.isArray(value)) {
|
|
84
|
-
return
|
|
64
|
+
return value.reduce((acc, item) => {
|
|
85
65
|
return acc && fn(item, values[name], isRequired); // recursive call
|
|
86
66
|
}, true);
|
|
87
67
|
} // handle options field
|
|
@@ -93,8 +73,6 @@ function hasValidInputValue(input, values) {
|
|
|
93
73
|
if (options) {
|
|
94
74
|
// object type options
|
|
95
75
|
if (type === 'object') {
|
|
96
|
-
var _context4, _context5;
|
|
97
|
-
|
|
98
76
|
const selectedOption = values[name];
|
|
99
77
|
|
|
100
78
|
if (!selectedOption) {
|
|
@@ -106,10 +84,8 @@ function hasValidInputValue(input, values) {
|
|
|
106
84
|
return true;
|
|
107
85
|
}
|
|
108
86
|
|
|
109
|
-
const optionSchema =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const idSchema = (0, _find.default)(_context3 = option.value).call(_context3, ({
|
|
87
|
+
const optionSchema = options.find(option => {
|
|
88
|
+
const idSchema = option.value.find(({
|
|
113
89
|
name
|
|
114
90
|
}) => name === 'id');
|
|
115
91
|
return idSchema.value === selectedOption.id;
|
|
@@ -119,9 +95,9 @@ function hasValidInputValue(input, values) {
|
|
|
119
95
|
return false;
|
|
120
96
|
}
|
|
121
97
|
|
|
122
|
-
return
|
|
98
|
+
return optionSchema.value.filter(({
|
|
123
99
|
required
|
|
124
|
-
}) => !!required)
|
|
100
|
+
}) => !!required).reduce((acc, {
|
|
125
101
|
name
|
|
126
102
|
}) => {
|
|
127
103
|
return acc && !!selectedOption[name];
|
|
@@ -139,7 +115,7 @@ function hasValidInputValue(input, values) {
|
|
|
139
115
|
} // unknown options, throw
|
|
140
116
|
|
|
141
117
|
|
|
142
|
-
throw new _errors.AuthSdkError(`Unknown options type, ${
|
|
118
|
+
throw new _errors.AuthSdkError(`Unknown options type, ${JSON.stringify(input)}`);
|
|
143
119
|
} // base case
|
|
144
120
|
|
|
145
121
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":["unwrapFormValue","remediation","Array","isArray","item","res","key","value","formKeys","length","unwrappedForm","forEach","hasValidInputValue","input","values","fn","requiredTracker","name","type","options","required","isRequired","acc","selectedOption","id","optionSchema","option","idSchema","AuthSdkError"],"sources":["../../../../../lib/idx/remediators/GenericRemediator/util.ts"],"sourcesContent":["/* eslint-disable complexity */\nimport { AuthSdkError } from '../../../errors';\nimport { Input } from '../../types';\n\nexport function unwrapFormValue(remediation): Input { \n if (Array.isArray(remediation)) {\n return remediation\n .map(item => {\n if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {\n return item;\n }\n return unwrapFormValue(item);\n }) as any;\n }\n\n const res = {};\n for (const [key, value] of Object.entries(remediation)) {\n if (value === null || typeof value === 'undefined') {\n continue;\n }\n\n if (typeof value === 'object') {\n const formKeys = Object.keys(value as object);\n // detect patterns like:\n // value -> form -> value | form -> value\n if (['value', 'form'].includes(key) \n && formKeys.length === 1 \n && ['value', 'form'].includes(formKeys[0])\n ) {\n // unwrap nested form\n const unwrappedForm = unwrapFormValue(value);\n Object.entries(unwrappedForm).forEach(([key, value]) => {\n res[key] = value;\n });\n } else {\n // dfs\n res[key] = unwrapFormValue(value);\n }\n } else {\n // handle primitive value\n res[key] = value;\n }\n }\n\n return res as Input;\n}\n\n// only check if value is required for now\n// TODO: support SDK layer type based input validation\nexport function hasValidInputValue(input, values) {\n const fn = (input, values, requiredTracker) => {\n const { name, value, type, options, required } = input;\n const isRequired = required || requiredTracker;\n\n // handle nested value - all required fields should be avaiable in values \n if (Array.isArray(value)) {\n return value.reduce((acc, item) => {\n return acc && fn(item, values[name], isRequired); // recursive call\n }, true);\n }\n\n // handle options field\n // 1. object type options - check if each object field is required and value can be found from the selectedOption\n // 2. primitive options - required field is avaiable from top level\n // 3. unknown format - pass to backend for validation\n if (options) {\n // object type options\n if (type === 'object') {\n const selectedOption = values[name];\n if (!selectedOption) {\n return false;\n }\n if (!selectedOption.id) {\n // unknown option format, pass to backend for validation\n return true;\n }\n const optionSchema = options.find((option) => {\n const idSchema = option.value.find(({ name }) => name === 'id' );\n return idSchema.value === selectedOption.id;\n });\n if (!optionSchema) {\n return false;\n }\n return optionSchema.value\n .filter(({ required }) => !!required)\n .reduce((acc, { name }) => {\n return acc && !!selectedOption[name];\n }, true);\n }\n\n // primitive options, not required - always valid\n if (required === false) {\n return true;\n }\n\n // primitive options, required - check if value is available\n if (required === true) {\n return !!values[name];\n }\n\n // unknown options, throw\n throw new AuthSdkError(`Unknown options type, ${JSON.stringify(input)}`);\n }\n\n // base case\n if (!isRequired) {\n return true;\n }\n \n return !!(values && values[name]);\n };\n\n return fn(input, values, false);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","names":["unwrapFormValue","remediation","Array","isArray","map","item","res","key","value","Object","entries","formKeys","keys","includes","length","unwrappedForm","forEach","hasValidInputValue","input","values","fn","requiredTracker","name","type","options","required","isRequired","reduce","acc","selectedOption","id","optionSchema","find","option","idSchema","filter","AuthSdkError","JSON","stringify"],"sources":["../../../../../lib/idx/remediators/GenericRemediator/util.ts"],"sourcesContent":["/* eslint-disable complexity */\nimport { AuthSdkError } from '../../../errors';\nimport { Input } from '../../types';\n\nexport function unwrapFormValue(remediation): Input { \n if (Array.isArray(remediation)) {\n return remediation\n .map(item => {\n if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {\n return item;\n }\n return unwrapFormValue(item);\n }) as any;\n }\n\n const res = {};\n for (const [key, value] of Object.entries(remediation)) {\n if (value === null || typeof value === 'undefined') {\n continue;\n }\n\n if (typeof value === 'object') {\n const formKeys = Object.keys(value as object);\n // detect patterns like:\n // value -> form -> value | form -> value\n if (['value', 'form'].includes(key) \n && formKeys.length === 1 \n && ['value', 'form'].includes(formKeys[0])\n ) {\n // unwrap nested form\n const unwrappedForm = unwrapFormValue(value);\n Object.entries(unwrappedForm).forEach(([key, value]) => {\n res[key] = value;\n });\n } else {\n // dfs\n res[key] = unwrapFormValue(value);\n }\n } else {\n // handle primitive value\n res[key] = value;\n }\n }\n\n return res as Input;\n}\n\n// only check if value is required for now\n// TODO: support SDK layer type based input validation\nexport function hasValidInputValue(input, values) {\n const fn = (input, values, requiredTracker) => {\n const { name, value, type, options, required } = input;\n const isRequired = required || requiredTracker;\n\n // handle nested value - all required fields should be avaiable in values \n if (Array.isArray(value)) {\n return value.reduce((acc, item) => {\n return acc && fn(item, values[name], isRequired); // recursive call\n }, true);\n }\n\n // handle options field\n // 1. object type options - check if each object field is required and value can be found from the selectedOption\n // 2. primitive options - required field is avaiable from top level\n // 3. unknown format - pass to backend for validation\n if (options) {\n // object type options\n if (type === 'object') {\n const selectedOption = values[name];\n if (!selectedOption) {\n return false;\n }\n if (!selectedOption.id) {\n // unknown option format, pass to backend for validation\n return true;\n }\n const optionSchema = options.find((option) => {\n const idSchema = option.value.find(({ name }) => name === 'id' );\n return idSchema.value === selectedOption.id;\n });\n if (!optionSchema) {\n return false;\n }\n return optionSchema.value\n .filter(({ required }) => !!required)\n .reduce((acc, { name }) => {\n return acc && !!selectedOption[name];\n }, true);\n }\n\n // primitive options, not required - always valid\n if (required === false) {\n return true;\n }\n\n // primitive options, required - check if value is available\n if (required === true) {\n return !!values[name];\n }\n\n // unknown options, throw\n throw new AuthSdkError(`Unknown options type, ${JSON.stringify(input)}`);\n }\n\n // base case\n if (!isRequired) {\n return true;\n }\n \n return !!(values && values[name]);\n };\n\n return fn(input, values, false);\n}\n"],"mappings":";;;;;AACA;;AADA;AAIO,SAASA,eAAT,CAAyBC,WAAzB,EAA6C;EAClD,IAAIC,KAAK,CAACC,OAAN,CAAcF,WAAd,CAAJ,EAAgC;IAC9B,OAAOA,WAAW,CACfG,GADI,CACAC,IAAI,IAAI;MACX,IAAI,OAAOA,IAAP,KAAgB,QAAhB,IAA4B,OAAOA,IAAP,KAAgB,QAA5C,IAAwD,OAAOA,IAAP,KAAgB,SAA5E,EAAuF;QACrF,OAAOA,IAAP;MACD;;MACD,OAAOL,eAAe,CAACK,IAAD,CAAtB;IACD,CANI,CAAP;EAOD;;EAED,MAAMC,GAAG,GAAG,EAAZ;;EACA,KAAK,MAAM,CAACC,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeT,WAAf,CAA3B,EAAwD;IACtD,IAAIO,KAAK,KAAK,IAAV,IAAkB,OAAOA,KAAP,KAAiB,WAAvC,EAAoD;MAClD;IACD;;IAED,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;MAC7B,MAAMG,QAAQ,GAAGF,MAAM,CAACG,IAAP,CAAYJ,KAAZ,CAAjB,CAD6B,CAE7B;MACA;;MACA,IAAI,CAAC,OAAD,EAAU,MAAV,EAAkBK,QAAlB,CAA2BN,GAA3B,KACCI,QAAQ,CAACG,MAAT,KAAoB,CADrB,IAEC,CAAC,OAAD,EAAU,MAAV,EAAkBD,QAAlB,CAA2BF,QAAQ,CAAC,CAAD,CAAnC,CAFL,EAGE;QACA;QACA,MAAMI,aAAa,GAAGf,eAAe,CAACQ,KAAD,CAArC;QACAC,MAAM,CAACC,OAAP,CAAeK,aAAf,EAA8BC,OAA9B,CAAsC,CAAC,CAACT,GAAD,EAAMC,KAAN,CAAD,KAAkB;UACtDF,GAAG,CAACC,GAAD,CAAH,GAAWC,KAAX;QACD,CAFD;MAGD,CATD,MASO;QACL;QACAF,GAAG,CAACC,GAAD,CAAH,GAAWP,eAAe,CAACQ,KAAD,CAA1B;MACD;IACF,CAjBD,MAiBO;MACL;MACAF,GAAG,CAACC,GAAD,CAAH,GAAWC,KAAX;IACD;EACF;;EAED,OAAOF,GAAP;AACD,C,CAED;AACA;;;AACO,SAASW,kBAAT,CAA4BC,KAA5B,EAAmCC,MAAnC,EAA2C;EAChD,MAAMC,EAAE,GAAG,CAACF,KAAD,EAAQC,MAAR,EAAgBE,eAAhB,KAAoC;IAC7C,MAAM;MAAEC,IAAF;MAAQd,KAAR;MAAee,IAAf;MAAqBC,OAArB;MAA8BC;IAA9B,IAA2CP,KAAjD;IACA,MAAMQ,UAAU,GAAGD,QAAQ,IAAIJ,eAA/B,CAF6C,CAI7C;;IACA,IAAInB,KAAK,CAACC,OAAN,CAAcK,KAAd,CAAJ,EAA0B;MACxB,OAAOA,KAAK,CAACmB,MAAN,CAAa,CAACC,GAAD,EAAMvB,IAAN,KAAe;QACjC,OAAOuB,GAAG,IAAIR,EAAE,CAACf,IAAD,EAAOc,MAAM,CAACG,IAAD,CAAb,EAAqBI,UAArB,CAAhB,CADiC,CACiB;MACnD,CAFM,EAEJ,IAFI,CAAP;IAGD,CAT4C,CAW7C;IACA;IACA;IACA;;;IACA,IAAIF,OAAJ,EAAa;MACX;MACA,IAAID,IAAI,KAAK,QAAb,EAAuB;QACrB,MAAMM,cAAc,GAAGV,MAAM,CAACG,IAAD,CAA7B;;QACA,IAAI,CAACO,cAAL,EAAqB;UACnB,OAAO,KAAP;QACD;;QACD,IAAI,CAACA,cAAc,CAACC,EAApB,EAAwB;UACtB;UACA,OAAO,IAAP;QACD;;QACD,MAAMC,YAAY,GAAGP,OAAO,CAACQ,IAAR,CAAcC,MAAD,IAAY;UAC5C,MAAMC,QAAQ,GAAGD,MAAM,CAACzB,KAAP,CAAawB,IAAb,CAAkB,CAAC;YAAEV;UAAF,CAAD,KAAcA,IAAI,KAAK,IAAzC,CAAjB;UACA,OAAOY,QAAQ,CAAC1B,KAAT,KAAmBqB,cAAc,CAACC,EAAzC;QACD,CAHoB,CAArB;;QAIA,IAAI,CAACC,YAAL,EAAmB;UACjB,OAAO,KAAP;QACD;;QACD,OAAOA,YAAY,CAACvB,KAAb,CACJ2B,MADI,CACG,CAAC;UAAEV;QAAF,CAAD,KAAkB,CAAC,CAACA,QADvB,EAEJE,MAFI,CAEG,CAACC,GAAD,EAAM;UAAEN;QAAF,CAAN,KAAmB;UACzB,OAAOM,GAAG,IAAI,CAAC,CAACC,cAAc,CAACP,IAAD,CAA9B;QACD,CAJI,EAIF,IAJE,CAAP;MAKD,CAvBU,CAyBX;;;MACA,IAAIG,QAAQ,KAAK,KAAjB,EAAwB;QACtB,OAAO,IAAP;MACD,CA5BU,CA8BX;;;MACA,IAAIA,QAAQ,KAAK,IAAjB,EAAuB;QACrB,OAAO,CAAC,CAACN,MAAM,CAACG,IAAD,CAAf;MACD,CAjCU,CAmCX;;;MACA,MAAM,IAAIc,oBAAJ,CAAkB,yBAAwBC,IAAI,CAACC,SAAL,CAAepB,KAAf,CAAsB,EAAhE,CAAN;IACD,CApD4C,CAsD7C;;;IACA,IAAI,CAACQ,UAAL,EAAiB;MACf,OAAO,IAAP;IACD;;IAED,OAAO,CAAC,EAAEP,MAAM,IAAIA,MAAM,CAACG,IAAD,CAAlB,CAAR;EACD,CA5DD;;EA8DA,OAAOF,EAAE,CAACF,KAAD,EAAQC,MAAR,EAAgB,KAAhB,CAAT;AACD"}
|
|
@@ -1,12 +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.Identify = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
8
|
|
|
11
9
|
var _Remediator = require("./Base/Remediator");
|
|
12
10
|
|
|
@@ -40,7 +38,7 @@ class Identify extends _Remediator.Remediator {
|
|
|
40
38
|
const {
|
|
41
39
|
credentials,
|
|
42
40
|
password
|
|
43
|
-
} =
|
|
41
|
+
} = this.values;
|
|
44
42
|
|
|
45
43
|
if (!credentials && !password) {
|
|
46
44
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Identify.js","names":["Identify","Remediator","canRemediate","identifier","getData","mapCredentials","credentials","password","passcode","getInputCredentials","input","form","value","name","required"],"sources":["../../../../lib/idx/remediators/Identify.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Credentials } from '../authenticator';\nimport { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface IdentifyValues extends RemediationValues {\n username?: string;\n password?: string;\n credentials?: Credentials;\n}\n\nexport class Identify extends Remediator<IdentifyValues> {\n static remediationName = 'identify';\n\n map = {\n 'identifier': ['username']\n };\n\n canRemediate(): boolean {\n const { identifier } = this.getData();\n return !!identifier;\n }\n\n mapCredentials() {\n const { credentials, password } = this.values;\n if (!credentials && !password) {\n return;\n }\n return credentials || { passcode: password };\n }\n\n getInputCredentials(input) {\n return {\n ...input.form.value[0],\n name: 'password',\n required: input.required\n };\n }\n\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Identify.js","names":["Identify","Remediator","canRemediate","identifier","getData","mapCredentials","credentials","password","values","passcode","getInputCredentials","input","form","value","name","required"],"sources":["../../../../lib/idx/remediators/Identify.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Credentials } from '../authenticator';\nimport { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface IdentifyValues extends RemediationValues {\n username?: string;\n password?: string;\n credentials?: Credentials;\n}\n\nexport class Identify extends Remediator<IdentifyValues> {\n static remediationName = 'identify';\n\n map = {\n 'identifier': ['username']\n };\n\n canRemediate(): boolean {\n const { identifier } = this.getData();\n return !!identifier;\n }\n\n mapCredentials() {\n const { credentials, password } = this.values;\n if (!credentials && !password) {\n return;\n }\n return credentials || { passcode: password };\n }\n\n getInputCredentials(input) {\n return {\n ...input.form.value[0],\n name: 'password',\n required: input.required\n };\n }\n\n}\n"],"mappings":";;;;;;;;AAcA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,MAAMA,QAAN,SAAuBC,sBAAvB,CAAkD;EAAA;IAAA;IAAA,2CAGjD;MACJ,cAAc,CAAC,UAAD;IADV,CAHiD;EAAA;;EAOvDC,YAAY,GAAY;IACtB,MAAM;MAAEC;IAAF,IAAiB,KAAKC,OAAL,EAAvB;IACA,OAAO,CAAC,CAACD,UAAT;EACD;;EAEDE,cAAc,GAAG;IACf,MAAM;MAAEC,WAAF;MAAeC;IAAf,IAA4B,KAAKC,MAAvC;;IACA,IAAI,CAACF,WAAD,IAAgB,CAACC,QAArB,EAA+B;MAC7B;IACD;;IACD,OAAOD,WAAW,IAAI;MAAEG,QAAQ,EAAEF;IAAZ,CAAtB;EACD;;EAEDG,mBAAmB,CAACC,KAAD,EAAQ;IACzB,OAAO,EACL,GAAGA,KAAK,CAACC,IAAN,CAAWC,KAAX,CAAiB,CAAjB,CADE;MAELC,IAAI,EAAE,UAFD;MAGLC,QAAQ,EAAEJ,KAAK,CAACI;IAHX,CAAP;EAKD;;AA1BsD;;;8BAA5Cf,Q,qBACc,U"}
|
|
@@ -1,12 +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.ReEnrollAuthenticator = void 0;
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
8
|
|
|
11
9
|
var _Remediator = require("./Base/Remediator");
|
|
12
10
|
|
|
@@ -25,7 +23,7 @@ class ReEnrollAuthenticator extends _Remediator.Remediator {
|
|
|
25
23
|
mapCredentials() {
|
|
26
24
|
const {
|
|
27
25
|
newPassword
|
|
28
|
-
} =
|
|
26
|
+
} = this.values;
|
|
29
27
|
|
|
30
28
|
if (!newPassword) {
|
|
31
29
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReEnrollAuthenticator.js","names":["ReEnrollAuthenticator","Remediator","mapCredentials","newPassword","passcode","getInputCredentials","input","challengeType","getAuthenticator","type","name","form","value"],"sources":["../../../../lib/idx/remediators/ReEnrollAuthenticator.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface ReEnrollAuthenticatorValues extends RemediationValues {\n newPassword?: string;\n}\n\nexport class ReEnrollAuthenticator extends Remediator<ReEnrollAuthenticatorValues> {\n static remediationName = 'reenroll-authenticator';\n\n mapCredentials() {\n const { newPassword } = this.values;\n if (!newPassword) {\n return;\n }\n return { \n passcode: newPassword,\n };\n }\n\n getInputCredentials(input) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const challengeType = this.getAuthenticator()!.type;\n const name = challengeType === 'password' ? 'newPassword' : 'verificationCode';\n return {\n ...input.form.value[0],\n name\n };\n }\n\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReEnrollAuthenticator.js","names":["ReEnrollAuthenticator","Remediator","mapCredentials","newPassword","values","passcode","getInputCredentials","input","challengeType","getAuthenticator","type","name","form","value"],"sources":["../../../../lib/idx/remediators/ReEnrollAuthenticator.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface ReEnrollAuthenticatorValues extends RemediationValues {\n newPassword?: string;\n}\n\nexport class ReEnrollAuthenticator extends Remediator<ReEnrollAuthenticatorValues> {\n static remediationName = 'reenroll-authenticator';\n\n mapCredentials() {\n const { newPassword } = this.values;\n if (!newPassword) {\n return;\n }\n return { \n passcode: newPassword,\n };\n }\n\n getInputCredentials(input) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const challengeType = this.getAuthenticator()!.type;\n const name = challengeType === 'password' ? 'newPassword' : 'verificationCode';\n return {\n ...input.form.value[0],\n name\n };\n }\n\n}\n"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASO,MAAMA,qBAAN,SAAoCC,sBAApC,CAA4E;EAGjFC,cAAc,GAAG;IACf,MAAM;MAAEC;IAAF,IAAkB,KAAKC,MAA7B;;IACA,IAAI,CAACD,WAAL,EAAkB;MAChB;IACD;;IACD,OAAO;MACLE,QAAQ,EAAEF;IADL,CAAP;EAGD;;EAEDG,mBAAmB,CAACC,KAAD,EAAQ;IACzB;IACA,MAAMC,aAAa,GAAG,KAAKC,gBAAL,GAAyBC,IAA/C;IACA,MAAMC,IAAI,GAAGH,aAAa,KAAK,UAAlB,GAA+B,aAA/B,GAA+C,kBAA5D;IACA,OAAO,EACL,GAAGD,KAAK,CAACK,IAAN,CAAWC,KAAX,CAAiB,CAAjB,CADE;MAELF;IAFK,CAAP;EAID;;AArBgF;;;8BAAtEX,qB,qBACc,wB"}
|
|
@@ -1,10 +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.RedirectIdp = void 0;
|
|
6
6
|
|
|
7
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
8
|
|
|
9
9
|
var _Remediator = require("./Base/Remediator");
|
|
10
10
|
|
|
@@ -1,10 +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.ResetAuthenticator = void 0;
|
|
6
6
|
|
|
7
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
8
|
|
|
9
9
|
var _VerifyAuthenticator = require("./Base/VerifyAuthenticator");
|
|
10
10
|
|