@okta/okta-auth-js 6.8.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +76 -41
- package/cjs/authn/AuthnTransactionImpl.js +44 -0
- package/cjs/authn/AuthnTransactionImpl.js.map +1 -0
- package/cjs/authn/api.js +105 -0
- package/cjs/authn/api.js.map +1 -0
- package/cjs/authn/factory.js +45 -0
- package/cjs/authn/factory.js.map +1 -0
- package/cjs/authn/index.js +41 -0
- package/cjs/authn/index.js.map +1 -0
- package/cjs/authn/mixin.js +82 -0
- package/cjs/authn/mixin.js.map +1 -0
- package/cjs/authn/types.js +2 -0
- package/cjs/authn/types.js.map +1 -0
- package/cjs/authn/util/flattenEmbedded.js +44 -0
- package/cjs/authn/util/flattenEmbedded.js.map +1 -0
- package/cjs/authn/util/link2fn.js +108 -0
- package/cjs/authn/util/link2fn.js.map +1 -0
- package/cjs/authn/util/links2fns.js +47 -0
- package/cjs/authn/util/links2fns.js.map +1 -0
- package/cjs/authn/util/poll.js +136 -0
- package/cjs/authn/util/poll.js.map +1 -0
- package/cjs/authn/util/stateToken.js +32 -0
- package/cjs/authn/util/stateToken.js.map +1 -0
- package/cjs/base/factory.js +47 -0
- package/cjs/base/factory.js.map +1 -0
- package/cjs/base/index.js +41 -0
- package/cjs/base/index.js.map +1 -0
- package/cjs/base/options.js +24 -0
- package/cjs/base/options.js.map +1 -0
- package/cjs/base/types.js +2 -0
- package/cjs/base/types.js.map +1 -0
- package/cjs/browser/browserStorage.js +12 -35
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +3 -9
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/clock.js +1 -5
- package/cjs/clock.js.map +1 -1
- package/cjs/constants.js +1 -7
- package/cjs/constants.js.map +1 -1
- package/cjs/core/AuthStateManager.js +225 -0
- package/cjs/core/AuthStateManager.js.map +1 -0
- package/cjs/core/ServiceManager/browser.js +157 -0
- package/cjs/core/ServiceManager/browser.js.map +1 -0
- package/cjs/core/ServiceManager/index.js +15 -0
- package/cjs/core/ServiceManager/index.js.map +1 -0
- package/cjs/core/ServiceManager/node.js +42 -0
- package/cjs/core/ServiceManager/node.js.map +1 -0
- package/cjs/core/factory.js +26 -0
- package/cjs/core/factory.js.map +1 -0
- package/cjs/core/index.js +93 -0
- package/cjs/core/index.js.map +1 -0
- package/cjs/core/mixin.js +78 -0
- package/cjs/core/mixin.js.map +1 -0
- package/cjs/core/options.js +29 -0
- package/cjs/core/options.js.map +1 -0
- package/cjs/core/storage.js +10 -0
- package/cjs/core/storage.js.map +1 -0
- package/cjs/{types → core/types}/AuthState.js +0 -0
- package/cjs/core/types/AuthState.js.map +1 -0
- package/cjs/{types → core/types}/Service.js +0 -0
- package/cjs/core/types/Service.js.map +1 -0
- package/cjs/{types → core/types}/api.js +0 -0
- package/cjs/core/types/api.js.map +1 -0
- package/cjs/core/types/index.js +41 -0
- package/cjs/core/types/index.js.map +1 -0
- package/cjs/crypto/base64.js +1 -7
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/index.js +17 -6
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/node.js +4 -10
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/crypto/oidcHash.js +1 -5
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/types.js +2 -0
- package/cjs/crypto/types.js.map +1 -0
- package/cjs/crypto/webcrypto.js +1 -3
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +1 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthPollStopError.js +1 -1
- package/cjs/errors/AuthSdkError.js +1 -1
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/errors/CustomError.js +1 -5
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js +1 -1
- package/cjs/errors/index.js +23 -1
- package/cjs/errors/index.js.map +1 -1
- package/cjs/errors/types.js +2 -0
- package/cjs/errors/types.js.map +1 -0
- package/cjs/exports/authn.js +55 -0
- package/cjs/exports/authn.js.map +1 -0
- package/cjs/exports/cdn/authn.js +11 -0
- package/cjs/exports/cdn/authn.js.map +1 -0
- package/cjs/exports/cdn/core.js +11 -0
- package/cjs/exports/cdn/core.js.map +1 -0
- package/cjs/exports/cdn/default.js +11 -0
- package/cjs/exports/cdn/default.js.map +1 -0
- package/cjs/exports/cdn/idx.js +11 -0
- package/cjs/exports/cdn/idx.js.map +1 -0
- package/cjs/exports/cdn/myaccount.js +11 -0
- package/cjs/exports/cdn/myaccount.js.map +1 -0
- package/cjs/exports/common.js +141 -0
- package/cjs/exports/common.js.map +1 -0
- package/cjs/exports/core.js +42 -0
- package/cjs/exports/core.js.map +1 -0
- package/cjs/exports/default.js +81 -0
- package/cjs/exports/default.js.map +1 -0
- package/cjs/exports/idx.js +50 -0
- package/cjs/exports/idx.js.map +1 -0
- package/cjs/exports/myaccount.js +54 -0
- package/cjs/exports/myaccount.js.map +1 -0
- package/cjs/fetch/fetchRequest.js +7 -25
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/OktaUserAgent.js +56 -0
- package/cjs/http/OktaUserAgent.js.map +1 -0
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js +54 -4
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/mixin.js +46 -0
- package/cjs/http/mixin.js.map +1 -0
- package/cjs/http/options.js +36 -0
- package/cjs/http/options.js.map +1 -0
- package/cjs/http/request.js +4 -10
- package/cjs/http/request.js.map +1 -1
- package/cjs/http/types.js +2 -0
- package/cjs/http/types.js.map +1 -0
- package/cjs/idx/IdxTransactionManager.js +85 -0
- package/cjs/idx/IdxTransactionManager.js.map +1 -0
- package/cjs/idx/authenticate.js +1 -1
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/index.js +8 -10
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/authenticator/util.js +1 -5
- package/cjs/idx/authenticator/util.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +1 -1
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/factory/OktaAuthIdx.js +14 -0
- package/cjs/idx/factory/OktaAuthIdx.js.map +1 -0
- package/cjs/idx/factory/api.js +91 -0
- package/cjs/idx/factory/api.js.map +1 -0
- package/cjs/idx/factory/index.js +28 -0
- package/cjs/idx/factory/index.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/index.js +6 -8
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +1 -5
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/idxState/index.js +3 -5
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/actionParser.js +2 -6
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js +5 -10
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js +23 -21
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js +4 -10
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js +2 -6
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/index.js +85 -3
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +7 -3
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +1 -3
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/mixin.js +28 -0
- package/cjs/idx/mixin.js.map +1 -0
- package/cjs/idx/options.js +32 -0
- package/cjs/idx/options.js.map +1 -0
- package/cjs/idx/poll.js +3 -13
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +4 -10
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +46 -69
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +7 -19
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +6 -56
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +10 -48
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +25 -51
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +10 -48
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +5 -17
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js +2 -2
- package/cjs/idx/remediators/ChallengePoll.js +3 -5
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js +2 -2
- package/cjs/idx/remediators/EnrollPoll.js +6 -16
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +12 -28
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +9 -25
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +5 -23
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/index.js +1 -3
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +11 -35
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +3 -5
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +3 -5
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +4 -6
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +5 -9
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js +2 -2
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +12 -41
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js +3 -5
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +20 -22
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +3 -13
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +10 -49
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/storage.js +89 -0
- package/cjs/idx/storage.js.map +1 -0
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/api.js +12 -0
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/index.js +28 -4
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/meta.js +2 -0
- package/cjs/idx/types/meta.js.map +1 -0
- package/cjs/idx/types/options.js.map +1 -1
- package/cjs/idx/types/storage.js +2 -0
- package/cjs/idx/types/storage.js.map +1 -0
- package/cjs/idx/unlockAccount.js +2 -6
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +17 -60
- package/cjs/idx/util.js.map +1 -1
- package/cjs/idx/webauthn.js +101 -0
- package/cjs/idx/webauthn.js.map +1 -0
- package/cjs/myaccount/api.js +3 -5
- package/cjs/myaccount/api.js.map +1 -1
- package/cjs/myaccount/factory.js +14 -0
- package/cjs/myaccount/factory.js.map +1 -0
- package/cjs/myaccount/index.js +28 -4
- package/cjs/myaccount/index.js.map +1 -1
- package/cjs/myaccount/mixin.js +23 -0
- package/cjs/myaccount/mixin.js.map +1 -0
- package/cjs/myaccount/request.js +3 -15
- package/cjs/myaccount/request.js.map +1 -1
- package/cjs/myaccount/transactions/Base.js +1 -5
- package/cjs/myaccount/transactions/Base.js.map +1 -1
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js +1 -1
- package/cjs/myaccount/transactions/EmailStatusTransaction.js +1 -1
- package/cjs/myaccount/transactions/EmailTransaction.js +1 -1
- package/cjs/myaccount/transactions/PhoneTransaction.js +1 -1
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +1 -1
- package/cjs/myaccount/transactions/ProfileTransaction.js +1 -1
- package/cjs/myaccount/transactions/index.js +1 -1
- package/cjs/myaccount/types.js.map +1 -1
- package/cjs/oidc/TokenManager.js +479 -0
- package/cjs/oidc/TokenManager.js.map +1 -0
- package/cjs/oidc/TransactionManager.js +107 -0
- package/cjs/oidc/TransactionManager.js.map +1 -0
- package/cjs/oidc/decodeToken.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +2 -8
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js +3 -5
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +3 -15
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js +3 -7
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +2 -10
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/factory/OktaAuthOAuth.js +23 -0
- package/cjs/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/cjs/oidc/factory/api.js +104 -0
- package/cjs/oidc/factory/api.js.map +1 -0
- package/cjs/oidc/factory/index.js +28 -0
- package/cjs/oidc/factory/index.js.map +1 -0
- package/cjs/oidc/getToken.js +5 -9
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js +4 -8
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +2 -8
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +2 -8
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js +2 -8
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +3 -9
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js +100 -4
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/mixin/browser.js +62 -0
- package/cjs/oidc/mixin/browser.js.map +1 -0
- package/cjs/oidc/mixin/index.js +342 -0
- package/cjs/oidc/mixin/index.js.map +1 -0
- package/cjs/oidc/mixin/node.js +44 -0
- package/cjs/oidc/mixin/node.js.map +1 -0
- package/cjs/oidc/options/OAuthOptionsConstructor.js +120 -0
- package/cjs/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/cjs/oidc/options/browser.js +6 -0
- package/cjs/oidc/options/browser.js.map +1 -0
- package/cjs/oidc/options/index.js +15 -0
- package/cjs/oidc/options/index.js.map +1 -0
- package/cjs/oidc/options/node.js +6 -0
- package/cjs/oidc/options/node.js.map +1 -0
- package/cjs/oidc/parseFromUrl.js +8 -11
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +1 -5
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +1 -5
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js +3 -7
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/storage.js +43 -0
- package/cjs/oidc/storage.js.map +1 -0
- package/cjs/{types → oidc/types}/JWT.js +0 -0
- package/cjs/oidc/types/JWT.js.map +1 -0
- package/cjs/{types → oidc/types}/Token.js +0 -0
- package/cjs/oidc/types/Token.js.map +1 -0
- package/cjs/{types → oidc/types}/TokenManager.js +0 -0
- package/cjs/oidc/types/TokenManager.js.map +1 -0
- package/cjs/oidc/types/Transaction.js +68 -0
- package/cjs/oidc/types/Transaction.js.map +1 -0
- package/cjs/oidc/types/TransactionManager.js +2 -0
- package/cjs/oidc/types/TransactionManager.js.map +1 -0
- package/cjs/{types → oidc/types}/UserClaims.js +0 -0
- package/cjs/oidc/types/UserClaims.js.map +1 -0
- package/cjs/oidc/types/api.js +2 -0
- package/cjs/oidc/types/api.js.map +1 -0
- package/cjs/oidc/types/index.js +145 -0
- package/cjs/oidc/types/index.js.map +1 -0
- package/cjs/oidc/types/meta.js +2 -0
- package/cjs/oidc/types/meta.js.map +1 -0
- package/cjs/oidc/types/options.js +2 -0
- package/cjs/oidc/types/options.js.map +1 -0
- package/cjs/oidc/types/proto.js +2 -0
- package/cjs/oidc/types/proto.js.map +1 -0
- package/cjs/oidc/types/storage.js +2 -0
- package/cjs/oidc/types/storage.js.map +1 -0
- package/cjs/oidc/util/browser.js +1 -5
- package/cjs/oidc/util/browser.js.map +1 -1
- package/cjs/oidc/util/defaultTokenParams.js.map +1 -1
- package/cjs/oidc/util/errors.js.map +1 -1
- package/cjs/oidc/util/index.js +12 -14
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +1 -5
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js +2 -4
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/pkce.js +3 -11
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +2 -4
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/refreshToken.js.map +1 -1
- package/cjs/oidc/util/sharedStorage.js +54 -0
- package/cjs/oidc/util/sharedStorage.js.map +1 -0
- package/cjs/oidc/util/validateClaims.js +1 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/util/validateToken.js +1 -1
- package/cjs/oidc/util/validateToken.js.map +1 -1
- package/cjs/oidc/verifyToken.js +3 -11
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -9
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +3 -3
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/services/LeaderElectionService.js +3 -5
- package/cjs/services/LeaderElectionService.js.map +1 -1
- package/cjs/services/SyncStorageService.js +26 -18
- package/cjs/services/SyncStorageService.js.map +1 -1
- package/cjs/services/index.js +3 -5
- package/cjs/services/index.js.map +1 -1
- package/cjs/session/api.js +88 -0
- package/cjs/session/api.js.map +1 -0
- package/cjs/session/factory.js +17 -0
- package/cjs/session/factory.js.map +1 -0
- package/cjs/session/index.js +54 -0
- package/cjs/session/index.js.map +1 -0
- package/cjs/session/mixin.js +32 -0
- package/cjs/session/mixin.js.map +1 -0
- package/cjs/session/types.js +2 -0
- package/cjs/session/types.js.map +1 -0
- package/cjs/storage/BaseStorageManager.js +102 -0
- package/cjs/storage/BaseStorageManager.js.map +1 -0
- package/cjs/storage/SavedObject.js +100 -0
- package/cjs/storage/SavedObject.js.map +1 -0
- package/cjs/storage/index.js +67 -0
- package/cjs/storage/index.js.map +1 -0
- package/cjs/storage/mixin.js +22 -0
- package/cjs/storage/mixin.js.map +1 -0
- package/cjs/storage/options/StorageOptionsConstructor.js +36 -0
- package/cjs/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/cjs/storage/options/browser.js +82 -0
- package/cjs/storage/options/browser.js.map +1 -0
- package/cjs/storage/options/node.js +43 -0
- package/cjs/storage/options/node.js.map +1 -0
- package/cjs/storage/types.js +2 -0
- package/cjs/storage/types.js.map +1 -0
- package/cjs/types/global.d.js +2 -0
- package/cjs/types/global.d.js.map +1 -0
- package/cjs/util/PromiseQueue.js +85 -0
- package/cjs/util/PromiseQueue.js.map +1 -0
- package/cjs/util/index.js +15 -17
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +2 -8
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js +6 -16
- package/cjs/util/object.js.map +1 -1
- package/dist/okta-auth-js.authn.min.analyzer.html +38 -0
- package/dist/okta-auth-js.authn.min.js +3 -0
- package/dist/{myaccount.umd.js.LICENSE.txt → okta-auth-js.authn.min.js.LICENSE.txt} +0 -0
- package/dist/okta-auth-js.authn.min.js.map +1 -0
- package/dist/okta-auth-js.core.min.analyzer.html +38 -0
- package/dist/okta-auth-js.core.min.js +3 -0
- package/dist/okta-auth-js.core.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.core.min.js.map +1 -0
- package/dist/okta-auth-js.idx.min.analyzer.html +38 -0
- package/dist/okta-auth-js.idx.min.js +3 -0
- package/dist/okta-auth-js.idx.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.idx.min.js.map +1 -0
- package/dist/okta-auth-js.min.analyzer.html +38 -0
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.myaccount.min.analyzer.html +38 -0
- package/dist/okta-auth-js.myaccount.min.js +3 -0
- package/dist/okta-auth-js.myaccount.min.js.LICENSE.txt +12 -0
- package/dist/okta-auth-js.myaccount.min.js.map +1 -0
- package/dist/okta-auth-js.polyfill.js +1 -1
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/esm/browser/authn/AuthnTransactionImpl.js +33 -0
- package/esm/browser/authn/AuthnTransactionImpl.js.map +1 -0
- package/esm/browser/authn/api.js +79 -0
- package/esm/browser/authn/api.js.map +1 -0
- package/esm/browser/authn/factory.js +37 -0
- package/esm/browser/authn/factory.js.map +1 -0
- package/esm/browser/authn/mixin.js +58 -0
- package/esm/browser/authn/mixin.js.map +1 -0
- package/esm/browser/authn/util/flattenEmbedded.js +44 -0
- package/esm/browser/authn/util/flattenEmbedded.js.map +1 -0
- package/esm/browser/authn/util/link2fn.js +103 -0
- package/esm/browser/authn/util/link2fn.js.map +1 -0
- package/esm/browser/authn/util/links2fns.js +45 -0
- package/esm/browser/authn/util/links2fns.js.map +1 -0
- package/esm/browser/authn/util/poll.js +120 -0
- package/esm/browser/authn/util/poll.js.map +1 -0
- package/esm/browser/authn/util/stateToken.js +26 -0
- package/esm/browser/authn/util/stateToken.js.map +1 -0
- package/esm/browser/base/factory.js +37 -0
- package/esm/browser/base/factory.js.map +1 -0
- package/esm/browser/base/options.js +22 -0
- package/esm/browser/base/options.js.map +1 -0
- package/esm/browser/browser/browserStorage.js +0 -9
- package/esm/browser/browser/browserStorage.js.map +1 -1
- package/esm/browser/browser/fingerprint.js +3 -2
- package/esm/browser/browser/fingerprint.js.map +1 -1
- package/esm/browser/constants.js +1 -4
- package/esm/browser/constants.js.map +1 -1
- package/esm/browser/core/AuthStateManager.js +162 -0
- package/esm/browser/core/AuthStateManager.js.map +1 -0
- package/esm/browser/core/ServiceManager/browser.js +115 -0
- package/esm/browser/core/ServiceManager/browser.js.map +1 -0
- package/esm/browser/core/factory.js +31 -0
- package/esm/browser/core/factory.js.map +1 -0
- package/esm/browser/core/mixin.js +70 -0
- package/esm/browser/core/mixin.js.map +1 -0
- package/esm/browser/core/options.js +30 -0
- package/esm/browser/core/options.js.map +1 -0
- package/esm/browser/core/storage.js +20 -0
- package/esm/browser/core/storage.js.map +1 -0
- package/esm/browser/errors/AuthApiError.js.map +1 -1
- package/esm/browser/errors/AuthSdkError.js.map +1 -1
- package/esm/browser/errors/index.js.map +1 -1
- package/esm/browser/exports/exports/authn.js +106 -0
- package/esm/browser/exports/exports/authn.js.map +1 -0
- package/esm/browser/exports/exports/core.js +102 -0
- package/esm/browser/exports/exports/core.js.map +1 -0
- package/esm/browser/exports/exports/default.js +141 -0
- package/esm/browser/exports/exports/default.js.map +1 -0
- package/esm/browser/exports/exports/idx.js +122 -0
- package/esm/browser/exports/exports/idx.js.map +1 -0
- package/esm/browser/exports/exports/myaccount.js +115 -0
- package/esm/browser/exports/exports/myaccount.js.map +1 -0
- package/esm/browser/fetch/fetchRequest.js.map +1 -1
- package/esm/browser/http/OktaUserAgent.js +39 -0
- package/esm/browser/http/OktaUserAgent.js.map +1 -0
- package/esm/browser/http/headers.js.map +1 -1
- package/esm/browser/http/mixin.js +46 -0
- package/esm/browser/http/mixin.js.map +1 -0
- package/esm/browser/http/options.js +31 -0
- package/esm/browser/http/options.js.map +1 -0
- package/esm/browser/http/request.js.map +1 -1
- package/esm/browser/idx/IdxTransactionManager.js +72 -0
- package/esm/browser/idx/IdxTransactionManager.js.map +1 -0
- package/esm/browser/idx/authenticate.js +0 -1
- package/esm/browser/idx/authenticate.js.map +1 -1
- package/esm/browser/idx/cancel.js.map +1 -1
- package/esm/browser/idx/emailVerify.js.map +1 -1
- package/esm/browser/idx/factory/OktaAuthIdx.js +23 -0
- package/esm/browser/idx/factory/OktaAuthIdx.js.map +1 -0
- package/esm/browser/idx/factory/api.js +73 -0
- package/esm/browser/idx/factory/api.js.map +1 -0
- package/esm/browser/idx/flow/FlowSpecification.js.map +1 -1
- package/esm/browser/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/esm/browser/idx/idxState/index.js.map +1 -1
- package/esm/browser/idx/idxState/v1/generateIdxAction.js +5 -2
- package/esm/browser/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/browser/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/esm/browser/idx/idxState/v1/remediationParser.js.map +1 -1
- package/esm/browser/idx/interact.js +6 -5
- package/esm/browser/idx/interact.js.map +1 -1
- package/esm/browser/idx/introspect.js +4 -3
- package/esm/browser/idx/introspect.js.map +1 -1
- package/esm/browser/idx/mixin.js +29 -0
- package/esm/browser/idx/mixin.js.map +1 -0
- package/esm/browser/idx/options.js +29 -0
- package/esm/browser/idx/options.js.map +1 -0
- package/esm/browser/idx/poll.js.map +1 -1
- package/esm/browser/idx/proceed.js.map +1 -1
- package/esm/browser/idx/recoverPassword.js.map +1 -1
- package/esm/browser/idx/register.js +2 -5
- package/esm/browser/idx/register.js.map +1 -1
- package/esm/browser/idx/remediate.js +24 -36
- package/esm/browser/idx/remediate.js.map +1 -1
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js +0 -29
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js +0 -10
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/esm/browser/idx/remediators/Base/Remediator.js.map +1 -1
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js +0 -10
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollPoll.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollProfile.js.map +1 -1
- package/esm/browser/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js +1 -9
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/esm/browser/idx/run.js +5 -26
- package/esm/browser/idx/run.js.map +1 -1
- package/esm/browser/idx/startTransaction.js.map +1 -1
- package/esm/browser/idx/storage.js +77 -0
- package/esm/browser/idx/storage.js.map +1 -0
- package/esm/browser/idx/transactionMeta.js +3 -2
- package/esm/browser/idx/transactionMeta.js.map +1 -1
- package/esm/browser/idx/types/api.js.map +1 -1
- package/esm/browser/idx/types/idx-js.js +1 -4
- package/esm/browser/idx/types/idx-js.js.map +1 -1
- package/esm/browser/idx/unlockAccount.js +0 -1
- package/esm/browser/idx/unlockAccount.js.map +1 -1
- package/esm/browser/idx/util.js +2 -8
- package/esm/browser/idx/util.js.map +1 -1
- package/esm/browser/idx/webauthn.js +79 -0
- package/esm/browser/idx/webauthn.js.map +1 -0
- package/esm/browser/myaccount/api.js +16 -0
- package/esm/browser/myaccount/api.js.map +1 -0
- package/esm/browser/myaccount/factory.js +23 -0
- package/esm/browser/myaccount/factory.js.map +1 -0
- package/esm/browser/myaccount/mixin.js +30 -0
- package/esm/browser/myaccount/mixin.js.map +1 -0
- package/esm/browser/myaccount/request.js +4 -1
- package/esm/browser/myaccount/request.js.map +1 -1
- package/esm/browser/myaccount/transactions/Base.js.map +1 -1
- package/esm/browser/myaccount/types.js +4 -0
- package/esm/browser/myaccount/types.js.map +1 -1
- package/esm/browser/oidc/TokenManager.js +384 -0
- package/esm/browser/oidc/TokenManager.js.map +1 -0
- package/esm/browser/oidc/TransactionManager.js +76 -0
- package/esm/browser/oidc/TransactionManager.js.map +1 -0
- package/esm/browser/oidc/decodeToken.js.map +1 -1
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -1
- package/esm/browser/oidc/endpoints/token.js +3 -0
- package/esm/browser/oidc/endpoints/token.js.map +1 -1
- package/esm/browser/oidc/endpoints/well-known.js +5 -2
- package/esm/browser/oidc/endpoints/well-known.js.map +1 -1
- package/esm/browser/oidc/exchangeCodeForTokens.js +3 -2
- package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/browser/oidc/factory/OktaAuthOAuth.js +29 -0
- package/esm/browser/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/esm/browser/oidc/factory/api.js +89 -0
- package/esm/browser/oidc/factory/api.js.map +1 -0
- package/esm/browser/oidc/getToken.js +0 -2
- package/esm/browser/oidc/getToken.js.map +1 -1
- package/esm/browser/oidc/getUserInfo.js +4 -3
- package/esm/browser/oidc/getUserInfo.js.map +1 -1
- package/esm/browser/oidc/getWithPopup.js +3 -2
- package/esm/browser/oidc/getWithPopup.js.map +1 -1
- package/esm/browser/oidc/getWithRedirect.js +1 -3
- package/esm/browser/oidc/getWithRedirect.js.map +1 -1
- package/esm/browser/oidc/getWithoutPrompt.js.map +1 -1
- package/esm/browser/oidc/handleOAuthResponse.js +3 -2
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/browser/oidc/mixin/browser.js +52 -0
- package/esm/browser/oidc/mixin/browser.js.map +1 -0
- package/esm/browser/oidc/mixin/index.js +247 -0
- package/esm/browser/oidc/mixin/index.js.map +1 -0
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js +85 -0
- package/esm/browser/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/esm/browser/oidc/options/browser.js +16 -0
- package/esm/browser/oidc/options/browser.js.map +1 -0
- package/esm/browser/oidc/parseFromUrl.js +7 -5
- package/esm/browser/oidc/parseFromUrl.js.map +1 -1
- package/esm/browser/oidc/renewToken.js +1 -3
- package/esm/browser/oidc/renewToken.js.map +1 -1
- package/esm/browser/oidc/renewTokens.js +3 -2
- package/esm/browser/oidc/renewTokens.js.map +1 -1
- package/esm/browser/oidc/renewTokensWithRefresh.js.map +1 -1
- package/esm/browser/oidc/revokeToken.js +6 -3
- package/esm/browser/oidc/revokeToken.js.map +1 -1
- package/esm/browser/oidc/storage.js +49 -0
- package/esm/browser/oidc/storage.js.map +1 -0
- package/esm/browser/{types → oidc/types}/Token.js +0 -0
- package/esm/browser/oidc/types/Token.js.map +1 -0
- package/esm/browser/{types → oidc/types}/TokenManager.js +0 -0
- package/esm/browser/oidc/types/TokenManager.js.map +1 -0
- package/esm/browser/{types → oidc/types}/Transaction.js +0 -0
- package/esm/browser/oidc/types/Transaction.js.map +1 -0
- package/esm/browser/oidc/util/browser.js.map +1 -1
- package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/browser/oidc/util/errors.js.map +1 -1
- package/esm/browser/oidc/util/loginRedirect.js.map +1 -1
- package/esm/browser/oidc/util/oauth.js.map +1 -1
- package/esm/browser/oidc/util/oauthMeta.js.map +1 -1
- package/esm/browser/oidc/util/prepareTokenParams.js.map +1 -1
- package/esm/browser/oidc/util/refreshToken.js.map +1 -1
- package/esm/browser/oidc/util/sharedStorage.js +54 -0
- package/esm/browser/oidc/util/sharedStorage.js.map +1 -0
- package/esm/browser/oidc/util/validateClaims.js.map +1 -1
- package/esm/browser/oidc/util/validateToken.js +1 -3
- package/esm/browser/oidc/util/validateToken.js.map +1 -1
- package/esm/browser/oidc/verifyToken.js +0 -2
- package/esm/browser/oidc/verifyToken.js.map +1 -1
- package/esm/browser/package.json +5 -0
- package/esm/browser/services/AutoRenewService.js +1 -3
- package/esm/browser/services/AutoRenewService.js.map +1 -1
- package/esm/browser/services/LeaderElectionService.js.map +1 -1
- package/esm/browser/services/SyncStorageService.js +18 -13
- package/esm/browser/services/SyncStorageService.js.map +1 -1
- package/esm/browser/session/api.js +69 -0
- package/esm/browser/session/api.js.map +1 -0
- package/esm/browser/session/factory.js +27 -0
- package/esm/browser/session/factory.js.map +1 -0
- package/esm/browser/session/mixin.js +37 -0
- package/esm/browser/session/mixin.js.map +1 -0
- package/esm/browser/storage/BaseStorageManager.js +69 -0
- package/esm/browser/storage/BaseStorageManager.js.map +1 -0
- package/esm/browser/storage/SavedObject.js +76 -0
- package/esm/browser/storage/SavedObject.js.map +1 -0
- package/esm/browser/storage/mixin.js +26 -0
- package/esm/browser/storage/mixin.js.map +1 -0
- package/esm/browser/storage/options/StorageOptionsConstructor.js +31 -0
- package/esm/browser/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/esm/browser/storage/options/browser.js +76 -0
- package/esm/browser/storage/options/browser.js.map +1 -0
- package/esm/browser/util/PromiseQueue.js +65 -0
- package/esm/browser/util/PromiseQueue.js.map +1 -0
- package/esm/node/authn/AuthnTransactionImpl.js +33 -0
- package/esm/node/authn/AuthnTransactionImpl.js.map +1 -0
- package/esm/node/authn/api.js +80 -0
- package/esm/node/authn/api.js.map +1 -0
- package/esm/node/authn/factory.js +37 -0
- package/esm/node/authn/factory.js.map +1 -0
- package/esm/node/authn/mixin.js +58 -0
- package/esm/node/authn/mixin.js.map +1 -0
- package/esm/node/authn/util/flattenEmbedded.js +44 -0
- package/esm/node/authn/util/flattenEmbedded.js.map +1 -0
- package/esm/node/authn/util/link2fn.js +104 -0
- package/esm/node/authn/util/link2fn.js.map +1 -0
- package/esm/node/authn/util/links2fns.js +45 -0
- package/esm/node/authn/util/links2fns.js.map +1 -0
- package/esm/node/authn/util/poll.js +121 -0
- package/esm/node/authn/util/poll.js.map +1 -0
- package/esm/node/authn/util/stateToken.js +26 -0
- package/esm/node/authn/util/stateToken.js.map +1 -0
- package/esm/node/base/factory.js +37 -0
- package/esm/node/base/factory.js.map +1 -0
- package/esm/node/base/options.js +22 -0
- package/esm/node/base/options.js.map +1 -0
- package/esm/node/browser/fingerprint.js +4 -3
- package/esm/node/browser/fingerprint.js.map +1 -1
- package/esm/node/constants.js +1 -4
- package/esm/node/constants.js.map +1 -1
- package/esm/node/core/AuthStateManager.js +163 -0
- package/esm/node/core/AuthStateManager.js.map +1 -0
- package/esm/node/core/ServiceManager/node.js +34 -0
- package/esm/node/core/ServiceManager/node.js.map +1 -0
- package/esm/node/core/factory.js +31 -0
- package/esm/node/core/factory.js.map +1 -0
- package/esm/node/core/mixin.js +70 -0
- package/esm/node/core/mixin.js.map +1 -0
- package/esm/node/core/options.js +31 -0
- package/esm/node/core/options.js.map +1 -0
- package/esm/node/core/storage.js +20 -0
- package/esm/node/core/storage.js.map +1 -0
- package/esm/node/errors/AuthApiError.js.map +1 -1
- package/esm/node/errors/AuthSdkError.js.map +1 -1
- package/esm/node/errors/index.js.map +1 -1
- package/esm/node/exports/exports/authn.js +106 -0
- package/esm/node/exports/exports/authn.js.map +1 -0
- package/esm/node/exports/exports/core.js +102 -0
- package/esm/node/exports/exports/core.js.map +1 -0
- package/esm/node/exports/exports/default.js +141 -0
- package/esm/node/exports/exports/default.js.map +1 -0
- package/esm/node/exports/exports/idx.js +122 -0
- package/esm/node/exports/exports/idx.js.map +1 -0
- package/esm/node/exports/exports/myaccount.js +115 -0
- package/esm/node/exports/exports/myaccount.js.map +1 -0
- package/esm/node/fetch/fetchRequest.js.map +1 -1
- package/esm/node/http/OktaUserAgent.js +39 -0
- package/esm/node/http/OktaUserAgent.js.map +1 -0
- package/esm/node/http/headers.js.map +1 -1
- package/esm/node/http/mixin.js +46 -0
- package/esm/node/http/mixin.js.map +1 -0
- package/esm/node/http/options.js +32 -0
- package/esm/node/http/options.js.map +1 -0
- package/esm/node/http/request.js.map +1 -1
- package/esm/node/idx/IdxTransactionManager.js +72 -0
- package/esm/node/idx/IdxTransactionManager.js.map +1 -0
- package/esm/node/idx/authenticate.js +0 -1
- package/esm/node/idx/authenticate.js.map +1 -1
- package/esm/node/idx/cancel.js.map +1 -1
- package/esm/node/idx/emailVerify.js.map +1 -1
- package/esm/node/idx/factory/OktaAuthIdx.js +23 -0
- package/esm/node/idx/factory/OktaAuthIdx.js.map +1 -0
- package/esm/node/idx/factory/api.js +74 -0
- package/esm/node/idx/factory/api.js.map +1 -0
- package/esm/node/idx/flow/FlowSpecification.js.map +1 -1
- package/esm/node/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/esm/node/idx/idxState/index.js.map +1 -1
- package/esm/node/idx/idxState/v1/generateIdxAction.js +6 -2
- package/esm/node/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/esm/node/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/esm/node/idx/idxState/v1/remediationParser.js.map +1 -1
- package/esm/node/idx/interact.js +7 -6
- package/esm/node/idx/interact.js.map +1 -1
- package/esm/node/idx/introspect.js +5 -4
- package/esm/node/idx/introspect.js.map +1 -1
- package/esm/node/idx/mixin.js +29 -0
- package/esm/node/idx/mixin.js.map +1 -0
- package/esm/node/idx/options.js +29 -0
- package/esm/node/idx/options.js.map +1 -0
- package/esm/node/idx/poll.js.map +1 -1
- package/esm/node/idx/proceed.js.map +1 -1
- package/esm/node/idx/recoverPassword.js.map +1 -1
- package/esm/node/idx/register.js +2 -5
- package/esm/node/idx/register.js.map +1 -1
- package/esm/node/idx/remediate.js +24 -36
- package/esm/node/idx/remediate.js.map +1 -1
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js +0 -29
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/esm/node/idx/remediators/Base/AuthenticatorData.js +0 -10
- package/esm/node/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/esm/node/idx/remediators/Base/Remediator.js.map +1 -1
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js +0 -10
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/esm/node/idx/remediators/EnrollPoll.js.map +1 -1
- package/esm/node/idx/remediators/EnrollProfile.js.map +1 -1
- package/esm/node/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js +1 -9
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/esm/node/idx/run.js +5 -26
- package/esm/node/idx/run.js.map +1 -1
- package/esm/node/idx/startTransaction.js.map +1 -1
- package/esm/node/idx/storage.js +77 -0
- package/esm/node/idx/storage.js.map +1 -0
- package/esm/node/idx/transactionMeta.js +3 -2
- package/esm/node/idx/transactionMeta.js.map +1 -1
- package/esm/node/idx/types/api.js.map +1 -1
- package/esm/node/idx/types/idx-js.js +1 -4
- package/esm/node/idx/types/idx-js.js.map +1 -1
- package/esm/node/idx/unlockAccount.js +0 -1
- package/esm/node/idx/unlockAccount.js.map +1 -1
- package/esm/node/idx/util.js +2 -8
- package/esm/node/idx/util.js.map +1 -1
- package/esm/node/idx/webauthn.js +79 -0
- package/esm/node/idx/webauthn.js.map +1 -0
- package/esm/node/myaccount/api.js +16 -0
- package/esm/node/myaccount/api.js.map +1 -0
- package/esm/node/myaccount/factory.js +23 -0
- package/esm/node/myaccount/factory.js.map +1 -0
- package/esm/node/myaccount/mixin.js +30 -0
- package/esm/node/myaccount/mixin.js.map +1 -0
- package/esm/node/myaccount/request.js +5 -1
- package/esm/node/myaccount/request.js.map +1 -1
- package/esm/node/myaccount/transactions/Base.js.map +1 -1
- package/esm/node/myaccount/types.js +5 -0
- package/esm/node/myaccount/types.js.map +1 -1
- package/esm/node/oidc/TokenManager.js +385 -0
- package/esm/node/oidc/TokenManager.js.map +1 -0
- package/esm/node/oidc/TransactionManager.js +76 -0
- package/esm/node/oidc/TransactionManager.js.map +1 -0
- package/esm/node/oidc/decodeToken.js.map +1 -1
- package/esm/node/oidc/endpoints/authorize.js.map +1 -1
- package/esm/node/oidc/endpoints/token.js +4 -0
- package/esm/node/oidc/endpoints/token.js.map +1 -1
- package/esm/node/oidc/endpoints/well-known.js +6 -2
- package/esm/node/oidc/endpoints/well-known.js.map +1 -1
- package/esm/node/oidc/exchangeCodeForTokens.js +3 -2
- package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -1
- package/esm/node/oidc/factory/OktaAuthOAuth.js +29 -0
- package/esm/node/oidc/factory/OktaAuthOAuth.js.map +1 -0
- package/esm/node/oidc/factory/api.js +90 -0
- package/esm/node/oidc/factory/api.js.map +1 -0
- package/esm/node/oidc/getToken.js +0 -2
- package/esm/node/oidc/getToken.js.map +1 -1
- package/esm/node/oidc/getUserInfo.js +5 -3
- package/esm/node/oidc/getUserInfo.js.map +1 -1
- package/esm/node/oidc/getWithPopup.js +3 -2
- package/esm/node/oidc/getWithPopup.js.map +1 -1
- package/esm/node/oidc/getWithRedirect.js +1 -3
- package/esm/node/oidc/getWithRedirect.js.map +1 -1
- package/esm/node/oidc/getWithoutPrompt.js.map +1 -1
- package/esm/node/oidc/handleOAuthResponse.js +3 -2
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -1
- package/esm/node/oidc/mixin/index.js +247 -0
- package/esm/node/oidc/mixin/index.js.map +1 -0
- package/esm/node/oidc/mixin/node.js +43 -0
- package/esm/node/oidc/mixin/node.js.map +1 -0
- package/esm/node/oidc/options/OAuthOptionsConstructor.js +85 -0
- package/esm/node/oidc/options/OAuthOptionsConstructor.js.map +1 -0
- package/esm/node/oidc/options/node.js +16 -0
- package/esm/node/oidc/options/node.js.map +1 -0
- package/esm/node/oidc/parseFromUrl.js +7 -5
- package/esm/node/oidc/parseFromUrl.js.map +1 -1
- package/esm/node/oidc/renewToken.js +1 -3
- package/esm/node/oidc/renewToken.js.map +1 -1
- package/esm/node/oidc/renewTokens.js +3 -2
- package/esm/node/oidc/renewTokens.js.map +1 -1
- package/esm/node/oidc/renewTokensWithRefresh.js.map +1 -1
- package/esm/node/oidc/revokeToken.js +6 -3
- package/esm/node/oidc/revokeToken.js.map +1 -1
- package/esm/node/oidc/storage.js +50 -0
- package/esm/node/oidc/storage.js.map +1 -0
- package/esm/node/{types → oidc/types}/Token.js +0 -0
- package/esm/node/oidc/types/Token.js.map +1 -0
- package/esm/node/{types → oidc/types}/TokenManager.js +0 -0
- package/esm/node/oidc/types/TokenManager.js.map +1 -0
- package/esm/node/{types → oidc/types}/Transaction.js +0 -0
- package/esm/node/oidc/types/Transaction.js.map +1 -0
- package/esm/node/oidc/util/browser.js.map +1 -1
- package/esm/node/oidc/util/defaultTokenParams.js.map +1 -1
- package/esm/node/oidc/util/errors.js.map +1 -1
- package/esm/node/oidc/util/loginRedirect.js.map +1 -1
- package/esm/node/oidc/util/oauth.js.map +1 -1
- package/esm/node/oidc/util/oauthMeta.js.map +1 -1
- package/esm/node/oidc/util/prepareTokenParams.js.map +1 -1
- package/esm/node/oidc/util/refreshToken.js.map +1 -1
- package/esm/node/oidc/util/sharedStorage.js +54 -0
- package/esm/node/oidc/util/sharedStorage.js.map +1 -0
- package/esm/node/oidc/util/validateClaims.js.map +1 -1
- package/esm/node/oidc/util/validateToken.js +1 -3
- package/esm/node/oidc/util/validateToken.js.map +1 -1
- package/esm/node/oidc/verifyToken.js +0 -2
- package/esm/node/oidc/verifyToken.js.map +1 -1
- package/esm/node/package.json +5 -0
- package/esm/node/server/serverStorage.js +0 -4
- package/esm/node/server/serverStorage.js.map +1 -1
- package/esm/node/session/api.js +70 -0
- package/esm/node/session/api.js.map +1 -0
- package/esm/node/session/factory.js +27 -0
- package/esm/node/session/factory.js.map +1 -0
- package/esm/node/session/mixin.js +37 -0
- package/esm/node/session/mixin.js.map +1 -0
- package/esm/node/storage/BaseStorageManager.js +69 -0
- package/esm/node/storage/BaseStorageManager.js.map +1 -0
- package/esm/node/storage/SavedObject.js +76 -0
- package/esm/node/storage/SavedObject.js.map +1 -0
- package/esm/node/storage/mixin.js +26 -0
- package/esm/node/storage/mixin.js.map +1 -0
- package/esm/node/storage/options/StorageOptionsConstructor.js +31 -0
- package/esm/node/storage/options/StorageOptionsConstructor.js.map +1 -0
- package/esm/node/storage/options/node.js +40 -0
- package/esm/node/storage/options/node.js.map +1 -0
- package/esm/node/util/PromiseQueue.js +65 -0
- package/esm/node/util/PromiseQueue.js.map +1 -0
- package/package.json +71 -28
- package/types/lib/authn/AuthnTransactionImpl.d.ts +41 -0
- package/types/lib/authn/api.d.ts +23 -0
- package/types/lib/authn/factory.d.ts +15 -0
- package/types/lib/authn/index.d.ts +3 -0
- package/types/lib/authn/mixin.d.ts +16 -0
- package/types/lib/authn/types.d.ts +101 -0
- package/types/lib/authn/util/flattenEmbedded.d.ts +3 -0
- package/types/lib/authn/util/link2fn.d.ts +3 -0
- package/types/lib/authn/util/links2fns.d.ts +3 -0
- package/types/lib/authn/util/poll.d.ts +21 -0
- package/types/lib/authn/util/stateToken.d.ts +15 -0
- package/types/lib/base/factory.d.ts +2 -0
- package/types/lib/base/index.d.ts +3 -0
- package/types/lib/base/options.d.ts +16 -0
- package/types/lib/base/types.d.ts +43 -0
- package/types/lib/browser/browserStorage.d.ts +33 -0
- package/types/lib/browser/fingerprint.d.ts +14 -0
- package/{lib → types/lib}/clock.d.ts +0 -0
- package/types/lib/constants.d.ts +30 -0
- package/types/lib/core/AuthStateManager.d.ts +33 -0
- package/types/lib/core/ServiceManager/browser.d.ts +32 -0
- package/{lib/crypto/webcrypto.d.ts → types/lib/core/ServiceManager/index.d.ts} +0 -0
- package/types/lib/core/ServiceManager/node.d.ts +23 -0
- package/types/lib/core/factory.d.ts +5 -0
- package/types/lib/core/index.d.ts +7 -0
- package/types/lib/core/mixin.d.ts +4 -0
- package/types/lib/core/options.d.ts +50 -0
- package/types/lib/core/storage.d.ts +15 -0
- package/types/lib/core/types/AuthState.d.ts +33 -0
- package/types/lib/core/types/Service.d.ts +27 -0
- package/types/lib/core/types/api.d.ts +15 -0
- package/types/lib/core/types/index.d.ts +3 -0
- package/{lib → types/lib}/crypto/base64.d.ts +0 -0
- package/{lib → types/lib}/crypto/browser.d.ts +0 -0
- package/types/lib/crypto/index.d.ts +16 -0
- package/{lib → types/lib}/crypto/node.d.ts +0 -0
- package/{lib → types/lib}/crypto/oidcHash.d.ts +0 -0
- package/types/lib/crypto/types.d.ts +4 -0
- package/{lib → types/lib}/crypto/verifyToken.d.ts +0 -0
- package/types/lib/crypto/webcrypto.d.ts +12 -0
- package/types/lib/errors/AuthApiError.d.ts +24 -0
- package/{lib → types/lib}/errors/AuthPollStopError.d.ts +0 -0
- package/types/lib/errors/AuthSdkError.d.ts +22 -0
- package/{lib → types/lib}/errors/CustomError.d.ts +0 -0
- package/{lib → types/lib}/errors/OAuthError.d.ts +0 -0
- package/types/lib/errors/index.d.ts +19 -0
- package/types/lib/errors/types.d.ts +14 -0
- package/types/lib/exports/authn.d.ts +11 -0
- package/types/lib/exports/cdn/authn.d.ts +2 -0
- package/types/lib/exports/cdn/core.d.ts +2 -0
- package/types/lib/exports/cdn/default.d.ts +2 -0
- package/types/lib/exports/cdn/idx.d.ts +2 -0
- package/types/lib/exports/cdn/myaccount.d.ts +2 -0
- package/types/lib/exports/common.d.ts +11 -0
- package/types/lib/exports/core.d.ts +10 -0
- package/types/lib/exports/default.d.ts +13 -0
- package/types/lib/exports/idx.d.ts +11 -0
- package/types/lib/exports/myaccount.d.ts +11 -0
- package/{lib → types/lib}/features.d.ts +0 -0
- package/types/lib/fetch/fetchRequest.d.ts +14 -0
- package/types/lib/http/OktaUserAgent.d.ts +22 -0
- package/types/lib/http/headers.d.ts +14 -0
- package/types/lib/http/index.d.ts +6 -0
- package/types/lib/http/mixin.d.ts +4 -0
- package/types/lib/http/options.d.ts +25 -0
- package/types/lib/http/request.d.ts +16 -0
- package/types/lib/http/types.d.ts +65 -0
- package/types/lib/idx/IdxTransactionManager.d.ts +18 -0
- package/types/lib/idx/authenticate.d.ts +13 -0
- package/{lib → types/lib}/idx/authenticator/Authenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/OktaPassword.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/OktaVerifyTotp.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/SecurityQuestionEnrollment.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/SecurityQuestionVerification.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/VerificationCodeAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/WebauthnEnrollment.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/WebauthnVerification.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/getAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/index.d.ts +0 -0
- package/{lib → types/lib}/idx/authenticator/util.d.ts +0 -0
- package/types/lib/idx/cancel.d.ts +13 -0
- package/types/lib/idx/emailVerify.d.ts +23 -0
- package/types/lib/idx/factory/OktaAuthIdx.d.ts +9 -0
- package/types/lib/idx/factory/api.d.ts +14 -0
- package/types/lib/idx/factory/index.d.ts +2 -0
- package/{lib → types/lib}/idx/flow/AccountUnlockFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/AuthenticationFlow.d.ts +0 -0
- package/types/lib/idx/flow/FlowSpecification.d.ts +9 -0
- package/{lib → types/lib}/idx/flow/PasswordRecoveryFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/RegistrationFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/RemediationFlow.d.ts +0 -0
- package/{lib → types/lib}/idx/flow/index.d.ts +0 -0
- package/types/lib/idx/handleInteractionCodeRedirect.d.ts +13 -0
- package/types/lib/idx/idxState/index.d.ts +7 -0
- package/{lib → types/lib}/idx/idxState/v1/actionParser.d.ts +0 -0
- package/types/lib/idx/idxState/v1/generateIdxAction.d.ts +15 -0
- package/types/lib/idx/idxState/v1/idxResponseParser.d.ts +21 -0
- package/types/lib/idx/idxState/v1/makeIdxState.d.ts +14 -0
- package/{lib → types/lib}/idx/idxState/v1/parsers.d.ts +0 -0
- package/types/lib/idx/idxState/v1/remediationParser.d.ts +13 -0
- package/types/lib/idx/index.d.ts +30 -0
- package/types/lib/idx/interact.d.ts +26 -0
- package/types/lib/idx/introspect.d.ts +14 -0
- package/types/lib/idx/mixin.d.ts +6 -0
- package/types/lib/idx/options.d.ts +57 -0
- package/types/lib/idx/poll.d.ts +13 -0
- package/types/lib/idx/proceed.d.ts +14 -0
- package/types/lib/idx/recoverPassword.d.ts +13 -0
- package/types/lib/idx/register.d.ts +13 -0
- package/types/lib/idx/remediate.d.ts +20 -0
- package/{lib → types/lib}/idx/remediators/AuthenticatorEnrollmentData.d.ts +0 -0
- package/types/lib/idx/remediators/AuthenticatorVerificationData.d.ts +24 -0
- package/types/lib/idx/remediators/Base/AuthenticatorData.d.ts +26 -0
- package/types/lib/idx/remediators/Base/Remediator.d.ts +42 -0
- package/types/lib/idx/remediators/Base/SelectAuthenticator.d.ts +32 -0
- package/types/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +25 -0
- package/{lib → types/lib}/idx/remediators/ChallengeAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ChallengePoll.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/EnrollAuthenticator.d.ts +0 -0
- package/types/lib/idx/remediators/EnrollPoll.d.ts +23 -0
- package/types/lib/idx/remediators/EnrollProfile.d.ts +39 -0
- package/types/lib/idx/remediators/EnrollmentChannelData.d.ts +57 -0
- package/types/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +8 -0
- package/{lib → types/lib}/idx/remediators/GenericRemediator/index.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/GenericRemediator/util.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/Identify.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ReEnrollAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/RedirectIdp.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/ResetAuthenticator.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/SelectAuthenticatorEnroll.d.ts +0 -0
- package/types/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +36 -0
- package/{lib → types/lib}/idx/remediators/SelectEnrollProfile.d.ts +0 -0
- package/types/lib/idx/remediators/SelectEnrollmentChannel.d.ts +46 -0
- package/{lib → types/lib}/idx/remediators/Skip.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/index.d.ts +0 -0
- package/{lib → types/lib}/idx/remediators/util.d.ts +0 -0
- package/types/lib/idx/run.d.ts +13 -0
- package/types/lib/idx/startTransaction.d.ts +13 -0
- package/types/lib/idx/storage.d.ts +18 -0
- package/types/lib/idx/transactionMeta.d.ts +21 -0
- package/{lib → types/lib}/idx/types/FlowIdentifier.d.ts +0 -0
- package/types/lib/idx/types/api.d.ts +158 -0
- package/{lib → types/lib}/idx/types/idx-js.d.ts +0 -0
- package/types/lib/idx/types/index.d.ts +19 -0
- package/types/lib/idx/types/meta.d.ts +22 -0
- package/types/lib/idx/types/options.d.ts +67 -0
- package/types/lib/idx/types/storage.d.ts +28 -0
- package/types/lib/idx/unlockAccount.d.ts +13 -0
- package/types/lib/idx/util.d.ts +14 -0
- package/types/lib/idx/webauthn.d.ts +31 -0
- package/{lib → types/lib}/myaccount/api.d.ts +0 -0
- package/{lib → types/lib}/myaccount/emailApi.d.ts +0 -0
- package/types/lib/myaccount/factory.d.ts +6 -0
- package/types/lib/myaccount/index.d.ts +15 -0
- package/types/lib/myaccount/mixin.d.ts +4 -0
- package/{lib → types/lib}/myaccount/phoneApi.d.ts +0 -0
- package/{lib → types/lib}/myaccount/profileApi.d.ts +0 -0
- package/types/lib/myaccount/request.d.ts +29 -0
- package/types/lib/myaccount/transactions/Base.d.ts +15 -0
- package/{lib → types/lib}/myaccount/transactions/EmailChallengeTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/EmailStatusTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/EmailTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/PhoneTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/ProfileSchemaTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/ProfileTransaction.d.ts +0 -0
- package/{lib → types/lib}/myaccount/transactions/index.d.ts +0 -0
- package/types/lib/myaccount/types.d.ts +58 -0
- package/types/lib/oidc/TokenManager.d.ts +53 -0
- package/types/lib/oidc/TransactionManager.d.ts +24 -0
- package/types/lib/oidc/decodeToken.d.ts +2 -0
- package/types/lib/oidc/endpoints/authorize.d.ts +14 -0
- package/{lib → types/lib}/oidc/endpoints/index.d.ts +0 -0
- package/types/lib/oidc/endpoints/token.d.ts +15 -0
- package/types/lib/oidc/endpoints/well-known.d.ts +3 -0
- package/types/lib/oidc/exchangeCodeForTokens.d.ts +14 -0
- package/types/lib/oidc/factory/OktaAuthOAuth.d.ts +4 -0
- package/types/lib/oidc/factory/api.d.ts +15 -0
- package/types/lib/oidc/factory/index.d.ts +2 -0
- package/types/lib/oidc/getToken.d.ts +2 -0
- package/types/lib/oidc/getUserInfo.d.ts +2 -0
- package/types/lib/oidc/getWithPopup.d.ts +2 -0
- package/types/lib/oidc/getWithRedirect.d.ts +2 -0
- package/types/lib/oidc/getWithoutPrompt.d.ts +2 -0
- package/types/lib/oidc/handleOAuthResponse.d.ts +2 -0
- package/types/lib/oidc/index.d.ts +35 -0
- package/types/lib/oidc/mixin/browser.d.ts +17 -0
- package/types/lib/oidc/mixin/index.d.ts +4 -0
- package/types/lib/oidc/mixin/node.d.ts +17 -0
- package/types/lib/oidc/options/OAuthOptionsConstructor.d.ts +48 -0
- package/types/lib/oidc/options/browser.d.ts +1 -0
- package/types/lib/oidc/options/index.d.ts +1 -0
- package/types/lib/oidc/options/node.d.ts +1 -0
- package/types/lib/oidc/parseFromUrl.d.ts +5 -0
- package/types/lib/oidc/renewToken.d.ts +2 -0
- package/types/lib/oidc/renewTokens.d.ts +2 -0
- package/types/lib/oidc/renewTokensWithRefresh.d.ts +2 -0
- package/types/lib/oidc/revokeToken.d.ts +14 -0
- package/types/lib/oidc/storage.d.ts +16 -0
- package/{lib → types/lib/oidc}/types/JWT.d.ts +0 -0
- package/{lib → types/lib/oidc}/types/Token.d.ts +0 -0
- package/types/lib/oidc/types/TokenManager.d.ts +61 -0
- package/types/lib/oidc/types/Transaction.d.ts +29 -0
- package/types/lib/oidc/types/TransactionManager.d.ts +15 -0
- package/{lib → types/lib/oidc}/types/UserClaims.d.ts +0 -0
- package/types/lib/oidc/types/api.d.ts +117 -0
- package/types/lib/oidc/types/index.d.ts +22 -0
- package/types/lib/oidc/types/meta.d.ts +21 -0
- package/types/lib/oidc/types/options.d.ts +77 -0
- package/{lib/types/OAuth.d.ts → types/lib/oidc/types/proto.d.ts} +0 -0
- package/types/lib/oidc/types/storage.d.ts +13 -0
- package/types/lib/oidc/util/browser.d.ts +6 -0
- package/types/lib/oidc/util/defaultTokenParams.d.ts +2 -0
- package/types/lib/oidc/util/errors.d.ts +15 -0
- package/{lib → types/lib}/oidc/util/index.d.ts +0 -0
- package/types/lib/oidc/util/loginRedirect.d.ts +30 -0
- package/types/lib/oidc/util/oauth.d.ts +6 -0
- package/types/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/{lib → types/lib}/oidc/util/pkce.d.ts +0 -0
- package/types/lib/oidc/util/prepareTokenParams.d.ts +6 -0
- package/types/lib/oidc/util/refreshToken.d.ts +3 -0
- package/types/lib/oidc/util/sharedStorage.d.ts +5 -0
- package/{lib → types/lib}/oidc/util/urlParams.d.ts +0 -0
- package/types/lib/oidc/util/validateClaims.d.ts +14 -0
- package/types/lib/oidc/util/validateToken.d.ts +2 -0
- package/types/lib/oidc/verifyToken.d.ts +2 -0
- package/types/lib/server/serverStorage.d.ts +24 -0
- package/types/lib/services/AutoRenewService.d.ts +27 -0
- package/types/lib/services/LeaderElectionService.d.ts +33 -0
- package/types/lib/services/SyncStorageService.d.ts +38 -0
- package/{lib → types/lib}/services/index.d.ts +0 -0
- package/{lib/session.d.ts → types/lib/session/api.d.ts} +0 -0
- package/types/lib/session/factory.d.ts +3 -0
- package/types/lib/session/index.d.ts +4 -0
- package/types/lib/session/mixin.d.ts +5 -0
- package/types/lib/session/types.d.ts +18 -0
- package/types/lib/storage/BaseStorageManager.d.ts +23 -0
- package/types/lib/storage/SavedObject.d.ts +25 -0
- package/types/lib/storage/index.d.ts +5 -0
- package/types/lib/storage/mixin.d.ts +3 -0
- package/types/lib/storage/options/StorageOptionsConstructor.d.ts +20 -0
- package/types/lib/storage/options/browser.d.ts +15 -0
- package/types/lib/storage/options/node.d.ts +15 -0
- package/types/lib/storage/types.d.ts +78 -0
- package/types/lib/util/PromiseQueue.d.ts +30 -0
- package/{lib → types/lib}/util/console.d.ts +0 -0
- package/types/lib/util/index.d.ts +17 -0
- package/{lib → types/lib}/util/misc.d.ts +0 -0
- package/{lib → types/lib}/util/object.d.ts +0 -0
- package/{lib → types/lib}/util/types.d.ts +0 -0
- package/{lib → types/lib}/util/url.d.ts +0 -0
- package/umd/authn.js +3 -0
- package/{dist/okta-auth-js.umd.js.LICENSE.txt → umd/authn.js.LICENSE.txt} +0 -0
- package/umd/authn.js.map +1 -0
- package/umd/core.js +3 -0
- package/umd/core.js.LICENSE.txt +14 -0
- package/umd/core.js.map +1 -0
- package/umd/default.js +3 -0
- package/umd/default.js.LICENSE.txt +14 -0
- package/umd/default.js.map +1 -0
- package/umd/idx.js +3 -0
- package/umd/idx.js.LICENSE.txt +14 -0
- package/umd/idx.js.map +1 -0
- package/umd/myaccount.js +3 -0
- package/umd/myaccount.js.LICENSE.txt +14 -0
- package/umd/myaccount.js.map +1 -0
- package/cjs/AuthStateManager.js +0 -231
- package/cjs/AuthStateManager.js.map +0 -1
- package/cjs/OktaAuth.js +0 -760
- package/cjs/OktaAuth.js.map +0 -1
- package/cjs/OktaUserAgent.js +0 -56
- package/cjs/OktaUserAgent.js.map +0 -1
- package/cjs/PromiseQueue.js +0 -89
- package/cjs/PromiseQueue.js.map +0 -1
- package/cjs/SavedObject.js +0 -112
- package/cjs/SavedObject.js.map +0 -1
- package/cjs/ServiceManager.js +0 -171
- package/cjs/ServiceManager.js.map +0 -1
- package/cjs/StorageManager.js +0 -210
- package/cjs/StorageManager.js.map +0 -1
- package/cjs/TokenManager.js +0 -496
- package/cjs/TokenManager.js.map +0 -1
- package/cjs/TransactionManager.js +0 -373
- package/cjs/TransactionManager.js.map +0 -1
- package/cjs/builderUtil.js +0 -49
- package/cjs/builderUtil.js.map +0 -1
- package/cjs/cdnEntry.js +0 -52
- package/cjs/cdnEntry.js.map +0 -1
- package/cjs/crypto/webauthn.js +0 -101
- package/cjs/crypto/webauthn.js.map +0 -1
- package/cjs/index.js +0 -186
- package/cjs/index.js.map +0 -1
- package/cjs/options/browser.js +0 -86
- package/cjs/options/browser.js.map +0 -1
- package/cjs/options/index.js +0 -105
- package/cjs/options/index.js.map +0 -1
- package/cjs/options/node.js +0 -45
- package/cjs/options/node.js.map +0 -1
- package/cjs/session.js +0 -88
- package/cjs/session.js.map +0 -1
- package/cjs/tx/AuthTransaction.js +0 -234
- package/cjs/tx/AuthTransaction.js.map +0 -1
- package/cjs/tx/TransactionState.js +0 -2
- package/cjs/tx/TransactionState.js.map +0 -1
- package/cjs/tx/api.js +0 -102
- package/cjs/tx/api.js.map +0 -1
- package/cjs/tx/index.js +0 -69
- package/cjs/tx/index.js.map +0 -1
- package/cjs/tx/poll.js +0 -138
- package/cjs/tx/poll.js.map +0 -1
- package/cjs/tx/util.js +0 -36
- package/cjs/tx/util.js.map +0 -1
- package/cjs/types/AuthState.js.map +0 -1
- package/cjs/types/Cookies.js +0 -2
- package/cjs/types/Cookies.js.map +0 -1
- package/cjs/types/EventEmitter.js +0 -2
- package/cjs/types/EventEmitter.js.map +0 -1
- package/cjs/types/JWT.js.map +0 -1
- package/cjs/types/OAuth.js +0 -2
- package/cjs/types/OAuth.js.map +0 -1
- package/cjs/types/OktaAuthOptions.js +0 -2
- package/cjs/types/OktaAuthOptions.js.map +0 -1
- package/cjs/types/Service.js.map +0 -1
- package/cjs/types/Storage.js +0 -2
- package/cjs/types/Storage.js.map +0 -1
- package/cjs/types/Token.js.map +0 -1
- package/cjs/types/TokenManager.js.map +0 -1
- package/cjs/types/Transaction.js +0 -77
- package/cjs/types/Transaction.js.map +0 -1
- package/cjs/types/UserClaims.js.map +0 -1
- package/cjs/types/api.js.map +0 -1
- package/cjs/types/http.js +0 -2
- package/cjs/types/http.js.map +0 -1
- package/cjs/types/index.js +0 -212
- package/cjs/types/index.js.map +0 -1
- package/cjs/util/sharedStorage.js +0 -58
- package/cjs/util/sharedStorage.js.map +0 -1
- package/cjs/util/storage.js +0 -29
- package/cjs/util/storage.js.map +0 -1
- package/dist/myaccount.umd.js +0 -3
- package/dist/myaccount.umd.js.map +0 -1
- package/dist/okta-auth-js.umd.js +0 -3
- package/dist/okta-auth-js.umd.js.map +0 -1
- package/esm/browser/AuthStateManager.js +0 -161
- package/esm/browser/AuthStateManager.js.map +0 -1
- package/esm/browser/OktaAuth.js +0 -557
- package/esm/browser/OktaAuth.js.map +0 -1
- package/esm/browser/OktaUserAgent.js +0 -39
- package/esm/browser/OktaUserAgent.js.map +0 -1
- package/esm/browser/PromiseQueue.js +0 -65
- package/esm/browser/PromiseQueue.js.map +0 -1
- package/esm/browser/SavedObject.js +0 -82
- package/esm/browser/SavedObject.js.map +0 -1
- package/esm/browser/ServiceManager.js +0 -115
- package/esm/browser/ServiceManager.js.map +0 -1
- package/esm/browser/StorageManager.js +0 -148
- package/esm/browser/StorageManager.js.map +0 -1
- package/esm/browser/TokenManager.js +0 -386
- package/esm/browser/TokenManager.js.map +0 -1
- package/esm/browser/TransactionManager.js +0 -244
- package/esm/browser/TransactionManager.js.map +0 -1
- package/esm/browser/builderUtil.js +0 -39
- package/esm/browser/builderUtil.js.map +0 -1
- package/esm/browser/crypto/webauthn.js +0 -79
- package/esm/browser/crypto/webauthn.js.map +0 -1
- package/esm/browser/index.js +0 -92
- package/esm/browser/index.js.map +0 -1
- package/esm/browser/myaccount/myaccount/index.js +0 -24
- package/esm/browser/myaccount/myaccount/index.js.map +0 -1
- package/esm/browser/options/browser.js +0 -77
- package/esm/browser/options/browser.js.map +0 -1
- package/esm/browser/options/index.js +0 -85
- package/esm/browser/options/index.js.map +0 -1
- package/esm/browser/session.js +0 -66
- package/esm/browser/session.js.map +0 -1
- package/esm/browser/tx/AuthTransaction.js +0 -174
- package/esm/browser/tx/AuthTransaction.js.map +0 -1
- package/esm/browser/tx/api.js +0 -72
- package/esm/browser/tx/api.js.map +0 -1
- package/esm/browser/tx/poll.js +0 -117
- package/esm/browser/tx/poll.js.map +0 -1
- package/esm/browser/tx/util.js +0 -26
- package/esm/browser/tx/util.js.map +0 -1
- package/esm/browser/types/Token.js.map +0 -1
- package/esm/browser/types/TokenManager.js.map +0 -1
- package/esm/browser/types/Transaction.js.map +0 -1
- package/esm/browser/util/sharedStorage.js +0 -56
- package/esm/browser/util/sharedStorage.js.map +0 -1
- package/esm/browser/util/storage.js +0 -26
- package/esm/browser/util/storage.js.map +0 -1
- package/esm/node/AuthStateManager.js +0 -161
- package/esm/node/AuthStateManager.js.map +0 -1
- package/esm/node/OktaAuth.js +0 -557
- package/esm/node/OktaAuth.js.map +0 -1
- package/esm/node/OktaUserAgent.js +0 -39
- package/esm/node/OktaUserAgent.js.map +0 -1
- package/esm/node/PromiseQueue.js +0 -65
- package/esm/node/PromiseQueue.js.map +0 -1
- package/esm/node/SavedObject.js +0 -82
- package/esm/node/SavedObject.js.map +0 -1
- package/esm/node/ServiceManager.js +0 -115
- package/esm/node/ServiceManager.js.map +0 -1
- package/esm/node/StorageManager.js +0 -148
- package/esm/node/StorageManager.js.map +0 -1
- package/esm/node/TokenManager.js +0 -387
- package/esm/node/TokenManager.js.map +0 -1
- package/esm/node/TransactionManager.js +0 -244
- package/esm/node/TransactionManager.js.map +0 -1
- package/esm/node/browser/browserStorage.js +0 -216
- package/esm/node/browser/browserStorage.js.map +0 -1
- package/esm/node/builderUtil.js +0 -39
- package/esm/node/builderUtil.js.map +0 -1
- package/esm/node/crypto/webauthn.js +0 -79
- package/esm/node/crypto/webauthn.js.map +0 -1
- package/esm/node/index.js +0 -92
- package/esm/node/index.js.map +0 -1
- package/esm/node/myaccount/myaccount/index.js +0 -24
- package/esm/node/myaccount/myaccount/index.js.map +0 -1
- package/esm/node/options/index.js +0 -85
- package/esm/node/options/index.js.map +0 -1
- package/esm/node/options/node.js +0 -41
- package/esm/node/options/node.js.map +0 -1
- package/esm/node/services/AutoRenewService.js +0 -77
- package/esm/node/services/AutoRenewService.js.map +0 -1
- package/esm/node/services/LeaderElectionService.js +0 -74
- package/esm/node/services/LeaderElectionService.js.map +0 -1
- package/esm/node/services/SyncStorageService.js +0 -130
- package/esm/node/services/SyncStorageService.js.map +0 -1
- package/esm/node/session.js +0 -66
- package/esm/node/session.js.map +0 -1
- package/esm/node/tx/AuthTransaction.js +0 -174
- package/esm/node/tx/AuthTransaction.js.map +0 -1
- package/esm/node/tx/api.js +0 -72
- package/esm/node/tx/api.js.map +0 -1
- package/esm/node/tx/poll.js +0 -117
- package/esm/node/tx/poll.js.map +0 -1
- package/esm/node/tx/util.js +0 -26
- package/esm/node/tx/util.js.map +0 -1
- package/esm/node/types/Token.js.map +0 -1
- package/esm/node/types/TokenManager.js.map +0 -1
- package/esm/node/types/Transaction.js.map +0 -1
- package/esm/node/util/sharedStorage.js +0 -56
- package/esm/node/util/sharedStorage.js.map +0 -1
- package/esm/node/util/storage.js +0 -26
- package/esm/node/util/storage.js.map +0 -1
- package/esm/package.json +0 -5
- package/lib/AuthStateManager.d.ts +0 -33
- package/lib/OktaAuth.d.ts +0 -81
- package/lib/OktaUserAgent.d.ts +0 -22
- package/lib/PromiseQueue.d.ts +0 -30
- package/lib/SavedObject.d.ts +0 -26
- package/lib/ServiceManager.d.ts +0 -32
- package/lib/StorageManager.d.ts +0 -28
- package/lib/TokenManager.d.ts +0 -53
- package/lib/TransactionManager.d.ts +0 -39
- package/lib/browser/browserStorage.d.ts +0 -15
- package/lib/browser/fingerprint.d.ts +0 -13
- package/lib/builderUtil.d.ts +0 -14
- package/lib/cdnEntry.d.ts +0 -18
- package/lib/constants.d.ts +0 -33
- package/lib/crypto/index.d.ts +0 -15
- package/lib/crypto/webauthn.d.ts +0 -25
- package/lib/errors/AuthApiError.d.ts +0 -23
- package/lib/errors/AuthSdkError.d.ts +0 -22
- package/lib/errors/index.d.ts +0 -18
- package/lib/fetch/fetchRequest.d.ts +0 -14
- package/lib/http/headers.d.ts +0 -14
- package/lib/http/index.d.ts +0 -2
- package/lib/http/request.d.ts +0 -16
- package/lib/idx/authenticate.d.ts +0 -13
- package/lib/idx/cancel.d.ts +0 -13
- package/lib/idx/emailVerify.d.ts +0 -26
- package/lib/idx/flow/FlowSpecification.d.ts +0 -9
- package/lib/idx/handleInteractionCodeRedirect.d.ts +0 -13
- package/lib/idx/idxState/index.d.ts +0 -7
- package/lib/idx/idxState/v1/generateIdxAction.d.ts +0 -15
- package/lib/idx/idxState/v1/idxResponseParser.d.ts +0 -21
- package/lib/idx/idxState/v1/makeIdxState.d.ts +0 -14
- package/lib/idx/idxState/v1/remediationParser.d.ts +0 -13
- package/lib/idx/index.d.ts +0 -24
- package/lib/idx/interact.d.ts +0 -25
- package/lib/idx/introspect.d.ts +0 -14
- package/lib/idx/poll.d.ts +0 -13
- package/lib/idx/proceed.d.ts +0 -14
- package/lib/idx/recoverPassword.d.ts +0 -13
- package/lib/idx/register.d.ts +0 -13
- package/lib/idx/remediate.d.ts +0 -21
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +0 -28
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +0 -46
- package/lib/idx/remediators/Base/Remediator.d.ts +0 -43
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +0 -54
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +0 -26
- package/lib/idx/remediators/EnrollPoll.d.ts +0 -23
- package/lib/idx/remediators/EnrollProfile.d.ts +0 -39
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +0 -58
- package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +0 -9
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +0 -36
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +0 -48
- package/lib/idx/run.d.ts +0 -13
- package/lib/idx/startTransaction.d.ts +0 -13
- package/lib/idx/transactionMeta.d.ts +0 -21
- package/lib/idx/types/api.d.ts +0 -112
- package/lib/idx/types/index.d.ts +0 -18
- package/lib/idx/types/options.d.ts +0 -46
- package/lib/idx/unlockAccount.d.ts +0 -13
- package/lib/idx/util.d.ts +0 -15
- package/lib/index.d.ts +0 -26
- package/lib/myaccount/index.d.ts +0 -13
- package/lib/myaccount/request.d.ts +0 -29
- package/lib/myaccount/transactions/Base.d.ts +0 -15
- package/lib/myaccount/types.d.ts +0 -55
- package/lib/oidc/decodeToken.d.ts +0 -2
- package/lib/oidc/endpoints/authorize.d.ts +0 -14
- package/lib/oidc/endpoints/token.d.ts +0 -14
- package/lib/oidc/endpoints/well-known.d.ts +0 -3
- package/lib/oidc/exchangeCodeForTokens.d.ts +0 -14
- package/lib/oidc/getToken.d.ts +0 -2
- package/lib/oidc/getUserInfo.d.ts +0 -2
- package/lib/oidc/getWithPopup.d.ts +0 -2
- package/lib/oidc/getWithRedirect.d.ts +0 -2
- package/lib/oidc/getWithoutPrompt.d.ts +0 -2
- package/lib/oidc/handleOAuthResponse.d.ts +0 -2
- package/lib/oidc/index.d.ts +0 -28
- package/lib/oidc/parseFromUrl.d.ts +0 -5
- package/lib/oidc/renewToken.d.ts +0 -2
- package/lib/oidc/renewTokens.d.ts +0 -2
- package/lib/oidc/renewTokensWithRefresh.d.ts +0 -2
- package/lib/oidc/revokeToken.d.ts +0 -14
- package/lib/oidc/util/browser.d.ts +0 -6
- package/lib/oidc/util/defaultTokenParams.d.ts +0 -2
- package/lib/oidc/util/errors.d.ts +0 -15
- package/lib/oidc/util/loginRedirect.d.ts +0 -30
- package/lib/oidc/util/oauth.d.ts +0 -6
- package/lib/oidc/util/oauthMeta.d.ts +0 -2
- package/lib/oidc/util/prepareTokenParams.d.ts +0 -5
- package/lib/oidc/util/refreshToken.d.ts +0 -3
- package/lib/oidc/util/validateClaims.d.ts +0 -14
- package/lib/oidc/util/validateToken.d.ts +0 -2
- package/lib/oidc/verifyToken.d.ts +0 -2
- package/lib/options/browser.d.ts +0 -16
- package/lib/options/index.d.ts +0 -14
- package/lib/options/node.d.ts +0 -16
- package/lib/server/serverStorage.d.ts +0 -25
- package/lib/services/AutoRenewService.d.ts +0 -27
- package/lib/services/LeaderElectionService.d.ts +0 -33
- package/lib/services/SyncStorageService.d.ts +0 -38
- package/lib/tx/AuthTransaction.d.ts +0 -58
- package/lib/tx/TransactionState.d.ts +0 -37
- package/lib/tx/api.d.ts +0 -18
- package/lib/tx/index.d.ts +0 -17
- package/lib/tx/poll.d.ts +0 -20
- package/lib/tx/util.d.ts +0 -15
- package/lib/types/AuthState.d.ts +0 -25
- package/lib/types/Cookies.d.ts +0 -26
- package/lib/types/EventEmitter.d.ts +0 -17
- package/lib/types/OktaAuthOptions.d.ts +0 -93
- package/lib/types/Service.d.ts +0 -26
- package/lib/types/Storage.d.ts +0 -95
- package/lib/types/TokenManager.d.ts +0 -39
- package/lib/types/Transaction.d.ts +0 -40
- package/lib/types/api.d.ts +0 -251
- package/lib/types/http.d.ts +0 -47
- package/lib/types/index.d.ts +0 -27
- package/lib/util/index.d.ts +0 -17
- package/lib/util/sharedStorage.d.ts +0 -6
- package/lib/util/storage.d.ts +0 -12
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.isCustomAuthTransactionMeta = isCustomAuthTransactionMeta;
|
|
4
|
+
exports.isIdxTransactionMeta = isIdxTransactionMeta;
|
|
5
|
+
exports.isOAuthTransactionMeta = isOAuthTransactionMeta;
|
|
6
|
+
exports.isPKCETransactionMeta = isPKCETransactionMeta;
|
|
7
|
+
exports.isTransactionMeta = isTransactionMeta;
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
11
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
12
|
+
*
|
|
13
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
16
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
*
|
|
18
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
function isObjectWithProperties(obj) {
|
|
21
|
+
if (!obj || typeof obj !== 'object' || Object.values(obj).length === 0) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function isOAuthTransactionMeta(obj) {
|
|
29
|
+
if (!isObjectWithProperties(obj)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return !!obj.redirectUri || !!obj.responseType;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isPKCETransactionMeta(obj) {
|
|
37
|
+
if (!isOAuthTransactionMeta(obj)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return !!obj.codeVerifier;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isIdxTransactionMeta(obj) {
|
|
45
|
+
if (!isPKCETransactionMeta(obj)) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return !!obj.interactionHandle;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function isCustomAuthTransactionMeta(obj) {
|
|
53
|
+
if (!isObjectWithProperties(obj)) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const isAllStringValues = Object.values(obj).find(value => typeof value !== 'string') === undefined;
|
|
58
|
+
return isAllStringValues;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function isTransactionMeta(obj) {
|
|
62
|
+
if (isOAuthTransactionMeta(obj) || isCustomAuthTransactionMeta(obj)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=Transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transaction.js","names":["isObjectWithProperties","obj","Object","values","length","isOAuthTransactionMeta","redirectUri","responseType","isPKCETransactionMeta","codeVerifier","isIdxTransactionMeta","interactionHandle","isCustomAuthTransactionMeta","isAllStringValues","find","value","undefined","isTransactionMeta"],"sources":["../../../../lib/oidc/types/Transaction.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 { IdxTransactionMeta } from '../../idx/types/meta';\nimport { OAuthTransactionMeta, PKCETransactionMeta } from './meta';\nimport { OAuthStorageManagerInterface } from './storage';\n\nexport interface TransactionManagerOptions\n{\n storageManager?: OAuthStorageManagerInterface;\n enableSharedStorage?: boolean; // default true\n saveNonceCookie?: boolean; // default true\n saveStateCookie?: boolean; // default true\n saveParamsCookie?: boolean; // default true\n saveLastResponse?: boolean; // default true\n}\n\n\nexport type CustomAuthTransactionMeta = Record<string, string | undefined>;\n\nexport type TransactionMeta =\n IdxTransactionMeta |\n PKCETransactionMeta |\n OAuthTransactionMeta |\n CustomAuthTransactionMeta;\n\n\nfunction isObjectWithProperties(obj) {\n if (!obj || typeof obj !== 'object' || Object.values(obj).length === 0) {\n return false;\n }\n return true;\n}\n\nexport function isOAuthTransactionMeta(obj: any): obj is OAuthTransactionMeta {\n if (!isObjectWithProperties(obj)) {\n return false;\n }\n return !!obj.redirectUri || !!obj.responseType;\n}\n\nexport function isPKCETransactionMeta(obj: any): obj is PKCETransactionMeta {\n if (!isOAuthTransactionMeta(obj)) {\n return false;\n }\n return !!(obj as any).codeVerifier;\n}\n\nexport function isIdxTransactionMeta(obj: any): obj is IdxTransactionMeta {\n if (!isPKCETransactionMeta(obj)) {\n return false;\n }\n return !!(obj as any).interactionHandle;\n}\n\nexport function isCustomAuthTransactionMeta(obj: any): obj is CustomAuthTransactionMeta {\n if (!isObjectWithProperties(obj)) {\n return false;\n }\n const isAllStringValues = Object.values(obj).find((value) => (typeof value !== 'string')) === undefined;\n return isAllStringValues;\n}\n\nexport function isTransactionMeta(obj: any): obj is TransactionMeta {\n if (isOAuthTransactionMeta(obj) || isCustomAuthTransactionMeta(obj)) {\n return true;\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA2BA,SAASA,sBAAT,CAAgCC,GAAhC,EAAqC;EACnC,IAAI,CAACA,GAAD,IAAQ,OAAOA,GAAP,KAAe,QAAvB,IAAmCC,MAAM,CAACC,MAAP,CAAcF,GAAd,EAAmBG,MAAnB,KAA8B,CAArE,EAAwE;IACtE,OAAO,KAAP;EACD;;EACD,OAAO,IAAP;AACD;;AAEM,SAASC,sBAAT,CAAgCJ,GAAhC,EAAuE;EAC5E,IAAI,CAACD,sBAAsB,CAACC,GAAD,CAA3B,EAAkC;IAChC,OAAO,KAAP;EACD;;EACD,OAAO,CAAC,CAACA,GAAG,CAACK,WAAN,IAAqB,CAAC,CAACL,GAAG,CAACM,YAAlC;AACD;;AAEM,SAASC,qBAAT,CAA+BP,GAA/B,EAAqE;EAC1E,IAAI,CAACI,sBAAsB,CAACJ,GAAD,CAA3B,EAAkC;IAChC,OAAO,KAAP;EACD;;EACD,OAAO,CAAC,CAAEA,GAAD,CAAaQ,YAAtB;AACD;;AAEM,SAASC,oBAAT,CAA8BT,GAA9B,EAAmE;EACxE,IAAI,CAACO,qBAAqB,CAACP,GAAD,CAA1B,EAAiC;IAC/B,OAAO,KAAP;EACD;;EACD,OAAO,CAAC,CAAEA,GAAD,CAAaU,iBAAtB;AACD;;AAEM,SAASC,2BAAT,CAAqCX,GAArC,EAAiF;EACtF,IAAI,CAACD,sBAAsB,CAACC,GAAD,CAA3B,EAAkC;IAChC,OAAO,KAAP;EACD;;EACD,MAAMY,iBAAiB,GAAGX,MAAM,CAACC,MAAP,CAAcF,GAAd,EAAmBa,IAAnB,CAAyBC,KAAD,IAAY,OAAOA,KAAP,KAAiB,QAArD,MAAoEC,SAA9F;EACA,OAAOH,iBAAP;AACD;;AAEM,SAASI,iBAAT,CAA2BhB,GAA3B,EAA6D;EAClE,IAAII,sBAAsB,CAACJ,GAAD,CAAtB,IAA+BW,2BAA2B,CAACX,GAAD,CAA9D,EAAqE;IACnE,OAAO,IAAP;EACD;;EACD,OAAO,KAAP;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionManager.js","names":[],"sources":["../../../../lib/oidc/types/TransactionManager.ts"],"sourcesContent":["import { OAuthTransactionMeta, TransactionMetaOptions } from './meta';\nimport { TransactionManagerOptions, TransactionMeta } from './Transaction';\n\nexport interface ClearTransactionMetaOptions extends TransactionMetaOptions {\n clearSharedStorage?: boolean; // true by default\n clearIdxResponse?: boolean; // true by default\n}\n\nexport interface TransactionManagerInterface {\n clear(options?: ClearTransactionMetaOptions);\n save(meta: OAuthTransactionMeta, options?: TransactionMetaOptions);\n exists(options?: TransactionMetaOptions);\n load(options?: TransactionMetaOptions): TransactionMeta | null\n}\n\n\nexport interface TransactionManagerConstructor\n<\n TM extends TransactionManagerInterface = TransactionManagerInterface\n>\n{\n new (options: TransactionManagerOptions): TM;\n}\n"],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserClaims.js","names":[],"sources":["../../../../lib/oidc/types/UserClaims.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n *\n * This interface represents the union of possible known claims that are in an\n * ID Token or returned from the /userinfo response and depend on the\n * response_type and scope parameters in the authorize request\n */\n\n /* eslint-disable camelcase */\nexport type CustomUserClaimValue = string | boolean | number;\nexport type CustomUserClaim = CustomUserClaimValue | Record<string, CustomUserClaimValue>;\nexport type CustomUserClaims = Record<string, CustomUserClaim | CustomUserClaim[]>;\n\nexport type UserClaims<T extends CustomUserClaims = CustomUserClaims> = T & {\n auth_time?: number;\n aud?: string;\n email?: string;\n email_verified?: boolean;\n exp?: number;\n family_name?: string;\n given_name?: string;\n iat?: number;\n iss?: string;\n jti?: string;\n locale?: string;\n name?: string;\n nonce?: string;\n preferred_username?: string;\n sub: string;\n updated_at?: number;\n ver?: number;\n zoneinfo?: string;\n at_hash?: string;\n}"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","names":[],"sources":["../../../../lib/oidc/types/api.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\nimport { JWTObject } from './JWT';\nimport { OAuthTransactionMeta, PKCETransactionMeta } from './meta';\nimport { CustomUrls, OktaAuthOAuthOptions, SigninWithRedirectOptions, TokenParams } from './options';\nimport { OAuthStorageManagerInterface } from './storage';\nimport { AccessToken, IDToken, RefreshToken, RevocableToken, Token, Tokens } from './Token';\nimport { TokenManagerInterface } from './TokenManager';\nimport { CustomUserClaims, UserClaims } from './UserClaims';\nimport { TransactionManagerInterface } from './TransactionManager';\nimport { OktaAuthSessionInterface } from '../../session/types';\n\nexport interface PopupParams {\n popupTitle?: string;\n popupWindow?: Window;\n}\n\nexport interface TokenResponse {\n tokens: Tokens;\n state: string;\n code?: string;\n}\n\nexport interface ParseFromUrlOptions {\n url?: string;\n responseMode?: string;\n}\n\nexport type ParseFromUrlFunction = (options?: string | ParseFromUrlOptions) => Promise<TokenResponse>;\n\nexport interface ParseFromUrlInterface extends ParseFromUrlFunction {\n _getDocument: () => Document;\n _getLocation: () => Location;\n _getHistory: () => History;\n}\n\nexport type GetWithRedirectFunction = (params?: TokenParams) => Promise<void>;\n\nexport type SetLocationFunction = (loc: string) => void;\n\nexport interface GetWithRedirectAPI extends GetWithRedirectFunction {\n _setLocation: SetLocationFunction;\n}\n\nexport interface BaseTokenAPI {\n decode(token: string): JWTObject;\n prepareTokenParams(params?: TokenParams): Promise<TokenParams>;\n exchangeCodeForTokens(params: TokenParams, urls?: CustomUrls): Promise<TokenResponse>;\n}\n\nexport interface TokenAPI extends BaseTokenAPI {\n getUserInfo<S extends CustomUserClaims = CustomUserClaims>(\n accessToken?: AccessToken,\n idToken?: IDToken\n ): Promise<UserClaims<S>>;\n getWithRedirect: GetWithRedirectAPI;\n parseFromUrl: ParseFromUrlInterface;\n getWithoutPrompt(params?: TokenParams): Promise<TokenResponse>;\n getWithPopup(params?: TokenParams): Promise<TokenResponse>;\n revoke(token: RevocableToken): Promise<object>;\n renew(token: Token): Promise<Token | undefined>;\n renewTokens(options?: TokenParams): Promise<Tokens>;\n renewTokensWithRefresh(tokenParams: TokenParams, refreshTokenObject: RefreshToken): Promise<Tokens>;\n verify(token: IDToken, params?: object): Promise<IDToken>;\n isLoginRedirect(): boolean;\n}\n\nexport interface TokenVerifyParams {\n clientId: string;\n issuer: string;\n ignoreSignature?: boolean;\n nonce?: string;\n accessToken?: string; // raw access token string\n}\n\nexport interface IDTokenAPI {\n authorize: {\n _getLocationHref: () => string;\n };\n}\n\nexport interface PkceAPI {\n DEFAULT_CODE_CHALLENGE_METHOD: string;\n generateVerifier(prefix: string): string;\n computeChallenge(str: string): PromiseLike<any>;\n}\n\nexport interface IsAuthenticatedOptions {\n onExpiredToken?: 'renew' | 'remove' | 'none';\n}\n\nexport interface SignoutRedirectUrlOptions {\n postLogoutRedirectUri?: string;\n idToken?: IDToken;\n state?: string;\n}\n\nexport interface SignoutOptions extends SignoutRedirectUrlOptions {\n revokeAccessToken?: boolean;\n revokeRefreshToken?: boolean;\n accessToken?: AccessToken;\n refreshToken?: RefreshToken;\n clearTokensBeforeRedirect?: boolean;\n}\n\nexport interface OriginalUriApi {\n getOriginalUri(state?: string): string | undefined;\n setOriginalUri(originalUri: string, state?: string): void;\n removeOriginalUri(state?: string): void;\n}\n\nexport interface OktaAuthOAuthInterface\n<\n M extends OAuthTransactionMeta = PKCETransactionMeta,\n S extends OAuthStorageManagerInterface<M> = OAuthStorageManagerInterface<M>,\n O extends OktaAuthOAuthOptions = OktaAuthOAuthOptions,\n TM extends TransactionManagerInterface = TransactionManagerInterface\n> \n extends OktaAuthSessionInterface<S, O>,\n OriginalUriApi\n{\n token: TokenAPI;\n tokenManager: TokenManagerInterface;\n pkce: PkceAPI;\n transactionManager: TM;\n \n isPKCE(): boolean;\n getIdToken(): string | undefined;\n getAccessToken(): string | undefined;\n getRefreshToken(): string | undefined;\n\n isAuthenticated(options?: IsAuthenticatedOptions): Promise<boolean>;\n signOut(opts?: SignoutOptions): Promise<void>;\n isLoginRedirect(): boolean;\n storeTokensFromRedirect(): Promise<void>;\n getUser<T extends CustomUserClaims = CustomUserClaims>(): Promise<UserClaims<T>>;\n signInWithRedirect(opts?: SigninWithRedirectOptions): Promise<void>;\n \n revokeAccessToken(accessToken?: AccessToken): Promise<unknown>;\n revokeRefreshToken(refreshToken?: RefreshToken): Promise<unknown>;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _api = require("./api");
|
|
4
|
+
|
|
5
|
+
Object.keys(_api).forEach(function (key) {
|
|
6
|
+
if (key === "default" || key === "__esModule") return;
|
|
7
|
+
if (key in exports && exports[key] === _api[key]) return;
|
|
8
|
+
Object.defineProperty(exports, key, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _api[key];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var _JWT = require("./JWT");
|
|
17
|
+
|
|
18
|
+
Object.keys(_JWT).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _JWT[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _JWT[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
var _meta = require("./meta");
|
|
30
|
+
|
|
31
|
+
Object.keys(_meta).forEach(function (key) {
|
|
32
|
+
if (key === "default" || key === "__esModule") return;
|
|
33
|
+
if (key in exports && exports[key] === _meta[key]) return;
|
|
34
|
+
Object.defineProperty(exports, key, {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return _meta[key];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
var _options = require("./options");
|
|
43
|
+
|
|
44
|
+
Object.keys(_options).forEach(function (key) {
|
|
45
|
+
if (key === "default" || key === "__esModule") return;
|
|
46
|
+
if (key in exports && exports[key] === _options[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () {
|
|
50
|
+
return _options[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _proto = require("./proto");
|
|
56
|
+
|
|
57
|
+
Object.keys(_proto).forEach(function (key) {
|
|
58
|
+
if (key === "default" || key === "__esModule") return;
|
|
59
|
+
if (key in exports && exports[key] === _proto[key]) return;
|
|
60
|
+
Object.defineProperty(exports, key, {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _proto[key];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
var _storage = require("./storage");
|
|
69
|
+
|
|
70
|
+
Object.keys(_storage).forEach(function (key) {
|
|
71
|
+
if (key === "default" || key === "__esModule") return;
|
|
72
|
+
if (key in exports && exports[key] === _storage[key]) return;
|
|
73
|
+
Object.defineProperty(exports, key, {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return _storage[key];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
var _Token = require("./Token");
|
|
82
|
+
|
|
83
|
+
Object.keys(_Token).forEach(function (key) {
|
|
84
|
+
if (key === "default" || key === "__esModule") return;
|
|
85
|
+
if (key in exports && exports[key] === _Token[key]) return;
|
|
86
|
+
Object.defineProperty(exports, key, {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return _Token[key];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
var _TokenManager = require("./TokenManager");
|
|
95
|
+
|
|
96
|
+
Object.keys(_TokenManager).forEach(function (key) {
|
|
97
|
+
if (key === "default" || key === "__esModule") return;
|
|
98
|
+
if (key in exports && exports[key] === _TokenManager[key]) return;
|
|
99
|
+
Object.defineProperty(exports, key, {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () {
|
|
102
|
+
return _TokenManager[key];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
var _Transaction = require("./Transaction");
|
|
108
|
+
|
|
109
|
+
Object.keys(_Transaction).forEach(function (key) {
|
|
110
|
+
if (key === "default" || key === "__esModule") return;
|
|
111
|
+
if (key in exports && exports[key] === _Transaction[key]) return;
|
|
112
|
+
Object.defineProperty(exports, key, {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return _Transaction[key];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
var _TransactionManager = require("./TransactionManager");
|
|
121
|
+
|
|
122
|
+
Object.keys(_TransactionManager).forEach(function (key) {
|
|
123
|
+
if (key === "default" || key === "__esModule") return;
|
|
124
|
+
if (key in exports && exports[key] === _TransactionManager[key]) return;
|
|
125
|
+
Object.defineProperty(exports, key, {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () {
|
|
128
|
+
return _TransactionManager[key];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
var _UserClaims = require("./UserClaims");
|
|
134
|
+
|
|
135
|
+
Object.keys(_UserClaims).forEach(function (key) {
|
|
136
|
+
if (key === "default" || key === "__esModule") return;
|
|
137
|
+
if (key in exports && exports[key] === _UserClaims[key]) return;
|
|
138
|
+
Object.defineProperty(exports, key, {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _UserClaims[key];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/oidc/types/index.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\nexport * from './api';\nexport * from './JWT';\nexport * from './meta';\nexport * from './options';\nexport * from './proto';\nexport * from './storage';\nexport * from './Token';\nexport * from './TokenManager';\nexport * from './Transaction';\nexport * from './TransactionManager';\nexport * from './UserClaims';\n"],"mappings":";;AAYA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","names":[],"sources":["../../../../lib/oidc/types/meta.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\nimport { CustomUrls, TokenParams } from './options';\n\n// formerly known as \"Redirect OAuth Params\"\nexport interface OAuthTransactionMeta extends\n Pick<TokenParams,\n 'issuer' |\n 'clientId' |\n 'redirectUri' |\n 'responseType' |\n 'responseMode' |\n 'scopes' |\n 'state' |\n 'pkce' |\n 'ignoreSignature' |\n 'nonce'\n >\n{\n urls: CustomUrls;\n originalUri?: string;\n}\n\nexport interface PKCETransactionMeta extends\n OAuthTransactionMeta,\n Pick<TokenParams,\n 'codeChallenge' |\n 'codeChallengeMethod' |\n 'codeVerifier'\n >\n{}\n\nexport interface TransactionMetaOptions extends\n Pick<PKCETransactionMeta,\n 'state' |\n 'codeChallenge' |\n 'codeChallengeMethod' |\n 'codeVerifier'\n >\n{\n muteWarning?: boolean;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","names":[],"sources":["../../../../lib/oidc/types/options.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\nimport { OktaAuthOptionsConstructor } from '../../base/types';\nimport { OktaAuthHttpOptions } from '../../http/types';\nimport { SimpleStorage } from '../../storage/types';\nimport { OktaAuthOAuthInterface, SetLocationFunction } from './api';\nimport { OAuthResponseMode, OAuthResponseType } from './proto';\nimport { TransactionManagerOptions } from './Transaction';\n\nexport interface CustomUrls {\n issuer?: string;\n authorizeUrl?: string;\n userinfoUrl?: string;\n tokenUrl?: string;\n revokeUrl?: string;\n logoutUrl?: string;\n}\n\nexport interface TokenParams extends CustomUrls {\n pkce?: boolean;\n clientId?: string;\n redirectUri?: string;\n responseType?: OAuthResponseType | OAuthResponseType[];\n responseMode?: OAuthResponseMode;\n state?: string;\n nonce?: string;\n scopes?: string[];\n display?: string;\n ignoreSignature?: boolean;\n codeVerifier?: string;\n authorizationCode?: string;\n codeChallenge?: string;\n codeChallengeMethod?: string;\n interactionCode?: string;\n idp?: string;\n idpScope?: string | string[];\n loginHint?: string;\n maxAge?: string | number;\n prompt?: string;\n sessionToken?: string;\n timeout?: number;\n extraParams?: { [propName: string]: string }; // custom authorize query params\n // TODO: remove in the next major version\n popupTitle?: string;\n}\n\nexport interface TokenManagerOptions {\n autoRenew?: boolean;\n autoRemove?: boolean;\n clearPendingRemoveTokens?: boolean;\n secure?: boolean;\n storage?: string | SimpleStorage;\n storageKey?: string;\n expireEarlySeconds?: number;\n syncStorage?: boolean;\n}\n\nexport interface SigninWithRedirectOptions extends TokenParams {\n originalUri?: string;\n}\n\nexport interface OktaAuthOAuthOptions extends\n OktaAuthHttpOptions,\n CustomUrls,\n Pick<TokenParams,\n 'issuer' |\n 'clientId' |\n 'redirectUri' |\n 'responseType' |\n 'responseMode' |\n 'scopes' |\n 'state' |\n 'pkce' |\n 'ignoreSignature' |\n 'codeChallenge' |\n 'codeChallengeMethod'\n >\n{\n ignoreLifetime?: boolean;\n tokenManager?: TokenManagerOptions;\n postLogoutRedirectUri?: string;\n maxClockSkew?: number;\n restoreOriginalUri?: (oktaAuth: OktaAuthOAuthInterface, originalUri?: string) => Promise<void>;\n\n transactionManager?: TransactionManagerOptions;\n\n // For server-side web applications ONLY!\n clientSecret?: string;\n setLocation?: SetLocationFunction;\n}\n\nexport type OktaAuthOauthOptionsConstructor = OktaAuthOptionsConstructor<OktaAuthOAuthOptions>;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proto.js","names":[],"sources":["../../../../lib/oidc/types/proto.ts"],"sourcesContent":["/* eslint-disable camelcase */\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\nexport interface OAuthParams {\n client_id?: string;\n code_challenge?: string;\n code_challenge_method?: string;\n display?: string;\n idp?: string;\n idp_scope?: string | string[];\n login_hint?: string;\n max_age?: string | number;\n nonce?: string;\n prompt?: string;\n redirect_uri?: string;\n response_mode?: string;\n response_type?: string | string[];\n scope?: string;\n sessionToken?: string;\n state?: string;\n grant_type?: string;\n code?: string;\n interaction_code?: string;\n}\n\nexport interface OAuthResponse {\n state?: string;\n code?: string;\n interaction_code?: string;\n expires_in?: string;\n token_type?: string;\n access_token?: string;\n id_token?: string;\n refresh_token?: string;\n scope?: string;\n error?: string;\n error_description?: string;\n}\n\nexport interface WellKnownResponse {\n issuer: string;\n authorization_endpoint: string;\n userinfo_endpoint: string;\n jwks_uri: string;\n response_types_supported: string[];\n response_modes_supported: string[];\n grant_types_supported: string[];\n subject_types_supported: string[];\n id_token_signing_alg_values_supported: string[];\n scopes_supported: string[];\n claims_supported: string[];\n}\n\n\nexport type OAuthResponseMode = 'okta_post_message' |'fragment' |'query' |'form_post';\n\nexport type OAuthResponseType = 'code' |'token' |'id_token' | 'refresh_token';\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","names":[],"sources":["../../../../lib/oidc/types/storage.ts"],"sourcesContent":["import {\n StorageManagerConstructor,\n StorageManagerInterface,\n StorageOptions,\n StorageProvider\n} from '../../storage/types';\nimport { OAuthTransactionMeta, PKCETransactionMeta } from './meta';\n\nexport interface TransactionStorage<M extends OAuthTransactionMeta = OAuthTransactionMeta> extends StorageProvider {\n setStorage(obj: M): void;\n getStorage(): M;\n}\n\nexport interface OAuthStorageManagerInterface\n<\n M extends OAuthTransactionMeta = PKCETransactionMeta\n>\nextends StorageManagerInterface\n{\n getTransactionStorage(options?: StorageOptions): TransactionStorage<M>;\n getSharedTansactionStorage(options?: StorageOptions): TransactionStorage<M>;\n getOriginalUriStorage(options?: StorageOptions): TransactionStorage<M>;\n getTokenStorage(options?: StorageOptions): StorageProvider\n}\n\nexport type OAuthStorageManagerConstructor<M extends OAuthTransactionMeta = PKCETransactionMeta>\n = StorageManagerConstructor<OAuthStorageManagerInterface<M>>;\n"],"mappings":""}
|
package/cjs/oidc/util/browser.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.addListener = addListener;
|
|
6
4
|
exports.addPostMessageListener = addPostMessageListener;
|
|
7
5
|
exports.loadFrame = loadFrame;
|
|
8
6
|
exports.loadPopup = loadPopup;
|
|
9
7
|
exports.removeListener = removeListener;
|
|
10
8
|
|
|
11
|
-
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
12
|
-
|
|
13
9
|
var _errors = require("../../errors");
|
|
14
10
|
|
|
15
11
|
/*!
|
|
@@ -60,7 +56,7 @@ function loadPopup(src, options) {
|
|
|
60
56
|
function addPostMessageListener(sdk, timeout, state) {
|
|
61
57
|
var responseHandler;
|
|
62
58
|
var timeoutId;
|
|
63
|
-
var msgReceivedOrTimeout = new
|
|
59
|
+
var msgReceivedOrTimeout = new Promise(function (resolve, reject) {
|
|
64
60
|
responseHandler = function responseHandler(e) {
|
|
65
61
|
if (!e.data || e.data.state !== state) {
|
|
66
62
|
// A message not meant for us
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","names":["addListener","eventTarget","name","fn","addEventListener","attachEvent","removeListener","removeEventListener","detachEvent","loadFrame","src","iframe","document","createElement","style","display","body","appendChild","loadPopup","options","title","popupTitle","appearance","window","open","addPostMessageListener","sdk","timeout","state","responseHandler","timeoutId","msgReceivedOrTimeout","resolve","reject","e","data","origin","getIssuerOrigin","AuthSdkError","setTimeout","finally","clearTimeout"],"sources":["../../../../lib/oidc/util/browser.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/* global window, document */\n/* eslint-disable complexity, max-statements */\nimport { AuthSdkError } from '../../errors';\nimport {
|
|
1
|
+
{"version":3,"file":"browser.js","names":["addListener","eventTarget","name","fn","addEventListener","attachEvent","removeListener","removeEventListener","detachEvent","loadFrame","src","iframe","document","createElement","style","display","body","appendChild","loadPopup","options","title","popupTitle","appearance","window","open","addPostMessageListener","sdk","timeout","state","responseHandler","timeoutId","msgReceivedOrTimeout","Promise","resolve","reject","e","data","origin","getIssuerOrigin","AuthSdkError","setTimeout","finally","clearTimeout"],"sources":["../../../../lib/oidc/util/browser.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/* global window, document */\n/* eslint-disable complexity, max-statements */\nimport { AuthSdkError } from '../../errors';\nimport { OktaAuthOAuthInterface } from '../types';\n\nexport function addListener(eventTarget, name, fn) {\n if (eventTarget.addEventListener) {\n eventTarget.addEventListener(name, fn);\n } else {\n eventTarget.attachEvent('on' + name, fn);\n }\n}\n\nexport function removeListener(eventTarget, name, fn) {\n if (eventTarget.removeEventListener) {\n eventTarget.removeEventListener(name, fn);\n } else {\n eventTarget.detachEvent('on' + name, fn);\n }\n}\n\nexport function loadFrame(src) {\n var iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n iframe.src = src;\n\n return document.body.appendChild(iframe);\n}\n\nexport function loadPopup(src, options) {\n var title = options.popupTitle || 'External Identity Provider User Authentication';\n var appearance = 'toolbar=no, scrollbars=yes, resizable=yes, ' +\n 'top=100, left=500, width=600, height=600';\n return window.open(src, title, appearance);\n}\n\nexport function addPostMessageListener(sdk: OktaAuthOAuthInterface, timeout, state) {\n var responseHandler;\n var timeoutId;\n var msgReceivedOrTimeout = new Promise(function (resolve, reject) {\n\n responseHandler = function responseHandler(e) {\n if (!e.data || e.data.state !== state) {\n // A message not meant for us\n return;\n }\n\n // Configuration mismatch between saved token and current app instance\n // This may happen if apps with different issuers are running on the same host url\n // If they share the same storage key, they may read and write tokens in the same location.\n // Common when developing against http://localhost\n if (e.origin !== sdk.getIssuerOrigin()) {\n return reject(new AuthSdkError('The request does not match client configuration'));\n }\n resolve(e.data);\n };\n\n addListener(window, 'message', responseHandler);\n\n timeoutId = setTimeout(function () {\n reject(new AuthSdkError('OAuth flow timed out'));\n }, timeout || 120000);\n });\n\n return msgReceivedOrTimeout\n .finally(function () {\n clearTimeout(timeoutId);\n removeListener(window, 'message', responseHandler);\n });\n}\n"],"mappings":";;;;;;;;AAcA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;;AACA;AAIO,SAASA,WAAT,CAAqBC,WAArB,EAAkCC,IAAlC,EAAwCC,EAAxC,EAA4C;EACjD,IAAIF,WAAW,CAACG,gBAAhB,EAAkC;IAChCH,WAAW,CAACG,gBAAZ,CAA6BF,IAA7B,EAAmCC,EAAnC;EACD,CAFD,MAEO;IACLF,WAAW,CAACI,WAAZ,CAAwB,OAAOH,IAA/B,EAAqCC,EAArC;EACD;AACF;;AAEM,SAASG,cAAT,CAAwBL,WAAxB,EAAqCC,IAArC,EAA2CC,EAA3C,EAA+C;EACpD,IAAIF,WAAW,CAACM,mBAAhB,EAAqC;IACnCN,WAAW,CAACM,mBAAZ,CAAgCL,IAAhC,EAAsCC,EAAtC;EACD,CAFD,MAEO;IACLF,WAAW,CAACO,WAAZ,CAAwB,OAAON,IAA/B,EAAqCC,EAArC;EACD;AACF;;AAEM,SAASM,SAAT,CAAmBC,GAAnB,EAAwB;EAC7B,IAAIC,MAAM,GAAGC,QAAQ,CAACC,aAAT,CAAuB,QAAvB,CAAb;EACAF,MAAM,CAACG,KAAP,CAAaC,OAAb,GAAuB,MAAvB;EACAJ,MAAM,CAACD,GAAP,GAAaA,GAAb;EAEA,OAAOE,QAAQ,CAACI,IAAT,CAAcC,WAAd,CAA0BN,MAA1B,CAAP;AACD;;AAEM,SAASO,SAAT,CAAmBR,GAAnB,EAAwBS,OAAxB,EAAiC;EACtC,IAAIC,KAAK,GAAGD,OAAO,CAACE,UAAR,IAAsB,gDAAlC;EACA,IAAIC,UAAU,GAAG,gDACf,0CADF;EAEA,OAAOC,MAAM,CAACC,IAAP,CAAYd,GAAZ,EAAiBU,KAAjB,EAAwBE,UAAxB,CAAP;AACD;;AAEM,SAASG,sBAAT,CAAgCC,GAAhC,EAA6DC,OAA7D,EAAsEC,KAAtE,EAA6E;EAClF,IAAIC,eAAJ;EACA,IAAIC,SAAJ;EACA,IAAIC,oBAAoB,GAAG,IAAIC,OAAJ,CAAY,UAAUC,OAAV,EAAmBC,MAAnB,EAA2B;IAEhEL,eAAe,GAAG,SAASA,eAAT,CAAyBM,CAAzB,EAA4B;MAC5C,IAAI,CAACA,CAAC,CAACC,IAAH,IAAWD,CAAC,CAACC,IAAF,CAAOR,KAAP,KAAiBA,KAAhC,EAAuC;QACrC;QACA;MACD,CAJ2C,CAM5C;MACA;MACA;MACA;;;MACA,IAAIO,CAAC,CAACE,MAAF,KAAaX,GAAG,CAACY,eAAJ,EAAjB,EAAwC;QACtC,OAAOJ,MAAM,CAAC,IAAIK,oBAAJ,CAAiB,iDAAjB,CAAD,CAAb;MACD;;MACDN,OAAO,CAACE,CAAC,CAACC,IAAH,CAAP;IACD,CAdD;;IAgBApC,WAAW,CAACuB,MAAD,EAAS,SAAT,EAAoBM,eAApB,CAAX;IAEAC,SAAS,GAAGU,UAAU,CAAC,YAAY;MACjCN,MAAM,CAAC,IAAIK,oBAAJ,CAAiB,sBAAjB,CAAD,CAAN;IACD,CAFqB,EAEnBZ,OAAO,IAAI,MAFQ,CAAtB;EAGD,CAvB0B,CAA3B;EAyBA,OAAOI,oBAAoB,CACxBU,OADI,CACI,YAAY;IACnBC,YAAY,CAACZ,SAAD,CAAZ;IACAxB,cAAc,CAACiB,MAAD,EAAS,SAAT,EAAoBM,eAApB,CAAd;EACD,CAJI,CAAP;AAKD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTokenParams.js","names":["getDefaultTokenParams","sdk","pkce","clientId","redirectUri","responseType","responseMode","scopes","state","ignoreSignature","options","defaultRedirectUri","isBrowser","window","location","href","undefined","removeNils","generateState","nonce","generateNonce"],"sources":["../../../../lib/oidc/util/defaultTokenParams.ts"],"sourcesContent":["\n/* global window */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { generateNonce, generateState } from './oauth';\nimport {
|
|
1
|
+
{"version":3,"file":"defaultTokenParams.js","names":["getDefaultTokenParams","sdk","pkce","clientId","redirectUri","responseType","responseMode","scopes","state","ignoreSignature","options","defaultRedirectUri","isBrowser","window","location","href","undefined","removeNils","generateState","nonce","generateNonce"],"sources":["../../../../lib/oidc/util/defaultTokenParams.ts"],"sourcesContent":["\n/* global window */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\nimport { generateNonce, generateState } from './oauth';\nimport { OktaAuthOAuthInterface, TokenParams } from '../types';\nimport { isBrowser } from '../../features';\nimport { removeNils } from '../../util';\n\nexport function getDefaultTokenParams(sdk: OktaAuthOAuthInterface): TokenParams {\n const {\n pkce,\n clientId,\n redirectUri,\n responseType,\n responseMode,\n scopes,\n state,\n ignoreSignature\n } = sdk.options;\n const defaultRedirectUri = isBrowser() ? window.location.href : undefined;\n return removeNils({\n pkce,\n clientId,\n redirectUri: redirectUri || defaultRedirectUri,\n responseType: responseType || ['token', 'id_token'],\n responseMode,\n state: state || generateState(),\n nonce: generateNonce(),\n scopes: scopes || ['openid', 'email'],\n ignoreSignature\n });\n}"],"mappings":";;;;AAcA;;AAEA;;AACA;;AAhBA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,SAASA,qBAAT,CAA+BC,GAA/B,EAAyE;EAC9E,MAAM;IACJC,IADI;IAEJC,QAFI;IAGJC,WAHI;IAIJC,YAJI;IAKJC,YALI;IAMJC,MANI;IAOJC,KAPI;IAQJC;EARI,IASFR,GAAG,CAACS,OATR;EAUA,MAAMC,kBAAkB,GAAG,IAAAC,mBAAA,MAAcC,MAAM,CAACC,QAAP,CAAgBC,IAA9B,GAAqCC,SAAhE;EACA,OAAO,IAAAC,gBAAA,EAAW;IAChBf,IADgB;IAEhBC,QAFgB;IAGhBC,WAAW,EAAEA,WAAW,IAAIO,kBAHZ;IAIhBN,YAAY,EAAEA,YAAY,IAAI,CAAC,OAAD,EAAU,UAAV,CAJd;IAKhBC,YALgB;IAMhBE,KAAK,EAAEA,KAAK,IAAI,IAAAU,oBAAA,GANA;IAOhBC,KAAK,EAAE,IAAAC,oBAAA,GAPS;IAQhBb,MAAM,EAAEA,MAAM,IAAI,CAAC,QAAD,EAAW,OAAX,CARF;IAShBE;EATgB,CAAX,CAAP;AAWD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":["isInteractionRequiredError","error","name","oauthError","errorCode","isAuthorizationCodeError","sdk","authApiError","errorResponse","xhr","responseJSON","options","pkce","isRefreshTokenInvalidError","isOAuthError","errorSummary"],"sources":["../../../../lib/oidc/util/errors.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 {
|
|
1
|
+
{"version":3,"file":"errors.js","names":["isInteractionRequiredError","error","name","oauthError","errorCode","isAuthorizationCodeError","sdk","authApiError","errorResponse","xhr","responseJSON","options","pkce","isRefreshTokenInvalidError","isOAuthError","errorSummary"],"sources":["../../../../lib/oidc/util/errors.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 { OktaAuthOAuthInterface } from '../types';\nimport { OAuthError, AuthApiError, isOAuthError } from '../../errors';\n\nexport function isInteractionRequiredError(error: Error) {\n if (error.name !== 'OAuthError') {\n return false;\n }\n const oauthError = error as OAuthError;\n return (oauthError.errorCode === 'interaction_required');\n}\n\nexport function isAuthorizationCodeError(sdk: OktaAuthOAuthInterface, error: Error) {\n if (error.name !== 'AuthApiError') {\n return false;\n }\n const authApiError = error as AuthApiError;\n // xhr property doesn't seem to match XMLHttpRequest type\n const errorResponse = authApiError.xhr as unknown as Record<string, unknown>;\n const responseJSON = errorResponse?.responseJSON as Record<string, unknown>;\n return sdk.options.pkce && (responseJSON?.error as string === 'invalid_grant');\n}\n\nexport function isRefreshTokenInvalidError(error: unknown): boolean {\n // error: {\"error\":\"invalid_grant\",\"error_description\":\"The refresh token is invalid or expired.\"}\n return isOAuthError(error) &&\n error.errorCode === 'invalid_grant' &&\n error.errorSummary === 'The refresh token is invalid or expired.';\n}\n"],"mappings":";;;;;;AAcA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,SAASA,0BAAT,CAAoCC,KAApC,EAAkD;EACvD,IAAIA,KAAK,CAACC,IAAN,KAAe,YAAnB,EAAiC;IAC/B,OAAO,KAAP;EACD;;EACD,MAAMC,UAAU,GAAGF,KAAnB;EACA,OAAQE,UAAU,CAACC,SAAX,KAAyB,sBAAjC;AACD;;AAEM,SAASC,wBAAT,CAAkCC,GAAlC,EAA+DL,KAA/D,EAA6E;EAClF,IAAIA,KAAK,CAACC,IAAN,KAAe,cAAnB,EAAmC;IACjC,OAAO,KAAP;EACD;;EACD,MAAMK,YAAY,GAAGN,KAArB,CAJkF,CAKlF;;EACA,MAAMO,aAAa,GAAGD,YAAY,CAACE,GAAnC;EACA,MAAMC,YAAY,GAAGF,aAAH,aAAGA,aAAH,uBAAGA,aAAa,CAAEE,YAApC;EACA,OAAOJ,GAAG,CAACK,OAAJ,CAAYC,IAAZ,IAAqB,CAAAF,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAET,KAAd,MAAkC,eAA9D;AACD;;AAEM,SAASY,0BAAT,CAAoCZ,KAApC,EAA6D;EAClE;EACA,OAAO,IAAAa,oBAAA,EAAab,KAAb,KACLA,KAAK,CAACG,SAAN,KAAoB,eADf,IAELH,KAAK,CAACc,YAAN,KAAuB,0CAFzB;AAGD"}
|
package/cjs/oidc/util/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
7
5
|
var _exportNames = {
|
|
8
6
|
pkce: true
|
|
@@ -16,7 +14,7 @@ Object.defineProperty(exports, "pkce", {
|
|
|
16
14
|
|
|
17
15
|
var _browser = require("./browser");
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
Object.keys(_browser).forEach(function (key) {
|
|
20
18
|
if (key === "default" || key === "__esModule") return;
|
|
21
19
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
22
20
|
if (key in exports && exports[key] === _browser[key]) return;
|
|
@@ -30,7 +28,7 @@ _Object$keys(_browser).forEach(function (key) {
|
|
|
30
28
|
|
|
31
29
|
var _defaultTokenParams = require("./defaultTokenParams");
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Object.keys(_defaultTokenParams).forEach(function (key) {
|
|
34
32
|
if (key === "default" || key === "__esModule") return;
|
|
35
33
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
36
34
|
if (key in exports && exports[key] === _defaultTokenParams[key]) return;
|
|
@@ -44,7 +42,7 @@ _Object$keys(_defaultTokenParams).forEach(function (key) {
|
|
|
44
42
|
|
|
45
43
|
var _errors = require("./errors");
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
Object.keys(_errors).forEach(function (key) {
|
|
48
46
|
if (key === "default" || key === "__esModule") return;
|
|
49
47
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
50
48
|
if (key in exports && exports[key] === _errors[key]) return;
|
|
@@ -58,7 +56,7 @@ _Object$keys(_errors).forEach(function (key) {
|
|
|
58
56
|
|
|
59
57
|
var _loginRedirect = require("./loginRedirect");
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
Object.keys(_loginRedirect).forEach(function (key) {
|
|
62
60
|
if (key === "default" || key === "__esModule") return;
|
|
63
61
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
64
62
|
if (key in exports && exports[key] === _loginRedirect[key]) return;
|
|
@@ -72,7 +70,7 @@ _Object$keys(_loginRedirect).forEach(function (key) {
|
|
|
72
70
|
|
|
73
71
|
var _oauth = require("./oauth");
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
Object.keys(_oauth).forEach(function (key) {
|
|
76
74
|
if (key === "default" || key === "__esModule") return;
|
|
77
75
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
78
76
|
if (key in exports && exports[key] === _oauth[key]) return;
|
|
@@ -86,7 +84,7 @@ _Object$keys(_oauth).forEach(function (key) {
|
|
|
86
84
|
|
|
87
85
|
var _oauthMeta = require("./oauthMeta");
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
Object.keys(_oauthMeta).forEach(function (key) {
|
|
90
88
|
if (key === "default" || key === "__esModule") return;
|
|
91
89
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
92
90
|
if (key in exports && exports[key] === _oauthMeta[key]) return;
|
|
@@ -102,7 +100,7 @@ var _pkce = _interopRequireDefault(require("./pkce"));
|
|
|
102
100
|
|
|
103
101
|
var _prepareTokenParams = require("./prepareTokenParams");
|
|
104
102
|
|
|
105
|
-
|
|
103
|
+
Object.keys(_prepareTokenParams).forEach(function (key) {
|
|
106
104
|
if (key === "default" || key === "__esModule") return;
|
|
107
105
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
108
106
|
if (key in exports && exports[key] === _prepareTokenParams[key]) return;
|
|
@@ -116,7 +114,7 @@ _Object$keys(_prepareTokenParams).forEach(function (key) {
|
|
|
116
114
|
|
|
117
115
|
var _refreshToken = require("./refreshToken");
|
|
118
116
|
|
|
119
|
-
|
|
117
|
+
Object.keys(_refreshToken).forEach(function (key) {
|
|
120
118
|
if (key === "default" || key === "__esModule") return;
|
|
121
119
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
122
120
|
if (key in exports && exports[key] === _refreshToken[key]) return;
|
|
@@ -130,7 +128,7 @@ _Object$keys(_refreshToken).forEach(function (key) {
|
|
|
130
128
|
|
|
131
129
|
var _urlParams = require("./urlParams");
|
|
132
130
|
|
|
133
|
-
|
|
131
|
+
Object.keys(_urlParams).forEach(function (key) {
|
|
134
132
|
if (key === "default" || key === "__esModule") return;
|
|
135
133
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
136
134
|
if (key in exports && exports[key] === _urlParams[key]) return;
|
|
@@ -144,7 +142,7 @@ _Object$keys(_urlParams).forEach(function (key) {
|
|
|
144
142
|
|
|
145
143
|
var _validateClaims = require("./validateClaims");
|
|
146
144
|
|
|
147
|
-
|
|
145
|
+
Object.keys(_validateClaims).forEach(function (key) {
|
|
148
146
|
if (key === "default" || key === "__esModule") return;
|
|
149
147
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
150
148
|
if (key in exports && exports[key] === _validateClaims[key]) return;
|
|
@@ -158,7 +156,7 @@ _Object$keys(_validateClaims).forEach(function (key) {
|
|
|
158
156
|
|
|
159
157
|
var _validateToken = require("./validateToken");
|
|
160
158
|
|
|
161
|
-
|
|
159
|
+
Object.keys(_validateToken).forEach(function (key) {
|
|
162
160
|
if (key === "default" || key === "__esModule") return;
|
|
163
161
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
164
162
|
if (key in exports && exports[key] === _validateToken[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/oidc/util/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\n\n\nexport * from './browser';\nexport * from './defaultTokenParams';\nexport * from './errors';\nexport * from './loginRedirect';\nexport * from './oauth';\nexport * from './oauthMeta';\nimport pkce from './pkce';\nexport { pkce };\nexport * from './prepareTokenParams';\nexport * from './refreshToken';\nexport * from './urlParams';\nexport * from './validateClaims';\nexport * from './validateToken';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/oidc/util/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n *\n */\n\n\nexport * from './browser';\nexport * from './defaultTokenParams';\nexport * from './errors';\nexport * from './loginRedirect';\nexport * from './oauth';\nexport * from './oauthMeta';\nimport pkce from './pkce';\nexport { pkce };\nexport * from './prepareTokenParams';\nexport * from './refreshToken';\nexport * from './urlParams';\nexport * from './validateClaims';\nexport * from './validateToken';\n"],"mappings":";;;;;;;;;;;;;;AAcA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
exports.getHashOrSearch = getHashOrSearch;
|
|
6
4
|
exports.hasAuthorizationCode = hasAuthorizationCode;
|
|
7
5
|
exports.hasErrorInUrl = hasErrorInUrl;
|
|
@@ -12,8 +10,6 @@ exports.isInteractionRequired = isInteractionRequired;
|
|
|
12
10
|
exports.isLoginRedirect = isLoginRedirect;
|
|
13
11
|
exports.isRedirectUri = isRedirectUri;
|
|
14
12
|
|
|
15
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
16
|
-
|
|
17
13
|
/*!
|
|
18
14
|
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
19
15
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -55,7 +51,7 @@ function isRedirectUri(uri, sdk) {
|
|
|
55
51
|
return false;
|
|
56
52
|
}
|
|
57
53
|
|
|
58
|
-
return
|
|
54
|
+
return uri.indexOf(authParams.redirectUri) === 0;
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
function isCodeFlow(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginRedirect.js","names":["hasTokensInHash","hash","test","hasAuthorizationCode","hashOrSearch","hasInteractionCode","hasErrorInUrl","isRedirectUri","uri","sdk","authParams","options","redirectUri","isCodeFlow","pkce","responseType","responseMode","getHashOrSearch","codeFlow","useQuery","window","location","search","isLoginRedirect","href","hasCode","isInteractionRequired"],"sources":["../../../../lib/oidc/util/loginRedirect.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/* global window */\n/* eslint-disable complexity, max-statements */\nimport {
|
|
1
|
+
{"version":3,"file":"loginRedirect.js","names":["hasTokensInHash","hash","test","hasAuthorizationCode","hashOrSearch","hasInteractionCode","hasErrorInUrl","isRedirectUri","uri","sdk","authParams","options","redirectUri","indexOf","isCodeFlow","pkce","responseType","responseMode","getHashOrSearch","codeFlow","useQuery","window","location","search","isLoginRedirect","href","hasCode","isInteractionRequired"],"sources":["../../../../lib/oidc/util/loginRedirect.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/* global window */\n/* eslint-disable complexity, max-statements */\nimport { OktaAuthOAuthOptions, OktaAuthOAuthInterface } from '../types';\n\nexport function hasTokensInHash(hash: string): boolean {\n return /((id|access)_token=)/i.test(hash);\n}\n\n// authorization_code\nexport function hasAuthorizationCode(hashOrSearch: string): boolean {\n return /(code=)/i.test(hashOrSearch);\n}\n\n// interaction_code\nexport function hasInteractionCode(hashOrSearch: string): boolean {\n return /(interaction_code=)/i.test(hashOrSearch);\n}\n\nexport function hasErrorInUrl(hashOrSearch: string): boolean {\n return /(error=)/i.test(hashOrSearch) || /(error_description)/i.test(hashOrSearch);\n}\n\nexport function isRedirectUri(uri: string, sdk: OktaAuthOAuthInterface): boolean {\n var authParams = sdk.options;\n if (!uri || !authParams.redirectUri) {\n return false;\n }\n return uri.indexOf(authParams.redirectUri) === 0;\n}\n\nexport function isCodeFlow(options: OktaAuthOAuthOptions) {\n return options.pkce || options.responseType === 'code' || options.responseMode === 'query';\n}\n\nexport function getHashOrSearch(options: OktaAuthOAuthOptions) {\n var codeFlow = isCodeFlow(options);\n var useQuery = codeFlow && options.responseMode !== 'fragment';\n return useQuery ? window.location.search : window.location.hash;\n}\n\n/**\n * Check if tokens or a code have been passed back into the url, which happens in\n * the OIDC (including social auth IDP) redirect flow.\n */\nexport function isLoginRedirect (sdk: OktaAuthOAuthInterface) {\n // First check, is this a redirect URI?\n if (!isRedirectUri(window.location.href, sdk)){\n return false;\n }\n\n // The location contains either a code, token, or an error + error_description\n var codeFlow = isCodeFlow(sdk.options);\n var hashOrSearch = getHashOrSearch(sdk.options);\n\n if (hasErrorInUrl(hashOrSearch)) {\n return true;\n }\n\n if (codeFlow) {\n var hasCode = hasAuthorizationCode(hashOrSearch) || hasInteractionCode(hashOrSearch);\n return hasCode;\n }\n\n // implicit flow, will always be hash fragment\n return hasTokensInHash(window.location.hash);\n}\n\n/**\n * Check if error=interaction_required has been passed back in the url, which happens in\n * the social auth IDP redirect flow.\n */\nexport function isInteractionRequired (sdk: OktaAuthOAuthInterface, hashOrSearch?: string) {\n if (!hashOrSearch) { // web only\n // First check, is this a redirect URI?\n if (!isLoginRedirect(sdk)){\n return false;\n }\n \n hashOrSearch = getHashOrSearch(sdk.options);\n }\n return /(error=interaction_required)/i.test(hashOrSearch);\n}"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;;AACA;AAGO,SAASA,eAAT,CAAyBC,IAAzB,EAAgD;EACrD,OAAO,wBAAwBC,IAAxB,CAA6BD,IAA7B,CAAP;AACD,C,CAED;;;AACO,SAASE,oBAAT,CAA8BC,YAA9B,EAA6D;EAClE,OAAO,WAAWF,IAAX,CAAgBE,YAAhB,CAAP;AACD,C,CAED;;;AACO,SAASC,kBAAT,CAA4BD,YAA5B,EAA2D;EAChE,OAAO,uBAAuBF,IAAvB,CAA4BE,YAA5B,CAAP;AACD;;AAEM,SAASE,aAAT,CAAuBF,YAAvB,EAAsD;EAC3D,OAAO,YAAYF,IAAZ,CAAiBE,YAAjB,KAAkC,uBAAuBF,IAAvB,CAA4BE,YAA5B,CAAzC;AACD;;AAEM,SAASG,aAAT,CAAuBC,GAAvB,EAAoCC,GAApC,EAA0E;EAC/E,IAAIC,UAAU,GAAGD,GAAG,CAACE,OAArB;;EACA,IAAI,CAACH,GAAD,IAAQ,CAACE,UAAU,CAACE,WAAxB,EAAqC;IACnC,OAAO,KAAP;EACD;;EACD,OAAOJ,GAAG,CAACK,OAAJ,CAAYH,UAAU,CAACE,WAAvB,MAAwC,CAA/C;AACD;;AAEM,SAASE,UAAT,CAAoBH,OAApB,EAAmD;EACxD,OAAOA,OAAO,CAACI,IAAR,IAAgBJ,OAAO,CAACK,YAAR,KAAyB,MAAzC,IAAmDL,OAAO,CAACM,YAAR,KAAyB,OAAnF;AACD;;AAEM,SAASC,eAAT,CAAyBP,OAAzB,EAAwD;EAC7D,IAAIQ,QAAQ,GAAGL,UAAU,CAACH,OAAD,CAAzB;EACA,IAAIS,QAAQ,GAAGD,QAAQ,IAAIR,OAAO,CAACM,YAAR,KAAyB,UAApD;EACA,OAAOG,QAAQ,GAAGC,MAAM,CAACC,QAAP,CAAgBC,MAAnB,GAA4BF,MAAM,CAACC,QAAP,CAAgBrB,IAA3D;AACD;AAED;AACA;AACA;AACA;;;AACO,SAASuB,eAAT,CAA0Bf,GAA1B,EAAuD;EAC5D;EACA,IAAI,CAACF,aAAa,CAACc,MAAM,CAACC,QAAP,CAAgBG,IAAjB,EAAuBhB,GAAvB,CAAlB,EAA8C;IAC5C,OAAO,KAAP;EACD,CAJ2D,CAM5D;;;EACA,IAAIU,QAAQ,GAAGL,UAAU,CAACL,GAAG,CAACE,OAAL,CAAzB;EACA,IAAIP,YAAY,GAAGc,eAAe,CAACT,GAAG,CAACE,OAAL,CAAlC;;EAEA,IAAIL,aAAa,CAACF,YAAD,CAAjB,EAAiC;IAC/B,OAAO,IAAP;EACD;;EAED,IAAIe,QAAJ,EAAc;IACZ,IAAIO,OAAO,GAAIvB,oBAAoB,CAACC,YAAD,CAApB,IAAsCC,kBAAkB,CAACD,YAAD,CAAvE;IACA,OAAOsB,OAAP;EACD,CAjB2D,CAmB5D;;;EACA,OAAO1B,eAAe,CAACqB,MAAM,CAACC,QAAP,CAAgBrB,IAAjB,CAAtB;AACD;AAED;AACA;AACA;AACA;;;AACO,SAAS0B,qBAAT,CAAgClB,GAAhC,EAA6DL,YAA7D,EAAoF;EACzF,IAAI,CAACA,YAAL,EAAmB;IAAE;IACnB;IACA,IAAI,CAACoB,eAAe,CAACf,GAAD,CAApB,EAA0B;MACxB,OAAO,KAAP;IACD;;IAEDL,YAAY,GAAGc,eAAe,CAACT,GAAG,CAACE,OAAL,CAA9B;EACD;;EACD,OAAO,gCAAgCT,IAAhC,CAAqCE,YAArC,CAAP;AACD"}
|
package/cjs/oidc/util/oauth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
5
|
exports.generateNonce = generateNonce;
|
|
6
6
|
exports.generateState = generateState;
|
|
@@ -8,8 +8,6 @@ exports.getOAuthBaseUrl = getOAuthBaseUrl;
|
|
|
8
8
|
exports.getOAuthDomain = getOAuthDomain;
|
|
9
9
|
exports.getOAuthUrls = getOAuthUrls;
|
|
10
10
|
|
|
11
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
12
|
-
|
|
13
11
|
var _util = require("../../util");
|
|
14
12
|
|
|
15
13
|
var _AuthSdkError = _interopRequireDefault(require("../../errors/AuthSdkError"));
|
|
@@ -43,7 +41,7 @@ function getIssuer(sdk, options = {}) {
|
|
|
43
41
|
|
|
44
42
|
function getOAuthBaseUrl(sdk, options = {}) {
|
|
45
43
|
const issuer = getIssuer(sdk, options);
|
|
46
|
-
const baseUrl =
|
|
44
|
+
const baseUrl = issuer.indexOf('/oauth2') > 0 ? issuer : issuer + '/oauth2';
|
|
47
45
|
return baseUrl;
|
|
48
46
|
}
|
|
49
47
|
|