@okta/okta-auth-js 6.6.0 → 6.7.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 +23 -0
- package/README.md +20 -5
- package/cjs/AuthStateManager.js +6 -6
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +17 -7
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/SavedObject.js +6 -0
- package/cjs/SavedObject.js.map +1 -1
- package/cjs/ServiceManager.js +44 -68
- package/cjs/ServiceManager.js.map +1 -1
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +63 -65
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +13 -3
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/cdnEntry.js +52 -0
- package/cjs/cdnEntry.js.map +1 -0
- package/cjs/clock.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/browser.js.map +1 -1
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/verifyToken.js.map +1 -1
- package/cjs/crypto/webauthn.js.map +1 -1
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +5 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthPollStopError.js.map +1 -1
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js.map +1 -1
- package/cjs/errors/index.js.map +1 -1
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/request.js +14 -1
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/Authenticator.js.map +1 -1
- package/cjs/idx/authenticator/OktaPassword.js.map +1 -1
- package/cjs/idx/authenticator/OktaVerifyTotp.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/authenticator/util.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js.map +1 -1
- package/cjs/idx/flow/AccountUnlockFlow.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/RemediationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/idxState/index.js.map +1 -1
- package/cjs/idx/idxState/v1/actionParser.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/idxState/v1/parsers.js.map +1 -1
- package/cjs/idx/idxState/v1/remediationParser.js.map +1 -1
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js.map +1 -1
- 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.map +1 -1
- package/cjs/idx/remediate.js +7 -11
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/util.js +7 -1
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -1
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +1 -1
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/FlowIdentifier.js.map +1 -1
- package/cjs/idx/types/api.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/options.js.map +1 -1
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +21 -24
- package/cjs/idx/util.js.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/myaccount/api.js +43 -0
- package/cjs/myaccount/api.js.map +1 -0
- package/cjs/myaccount/emailApi.js +144 -0
- package/cjs/myaccount/emailApi.js.map +1 -0
- package/cjs/myaccount/index.js +30 -0
- package/cjs/myaccount/index.js.map +1 -0
- package/cjs/myaccount/phoneApi.js +123 -0
- package/cjs/myaccount/phoneApi.js.map +1 -0
- package/cjs/myaccount/profileApi.js +58 -0
- package/cjs/myaccount/profileApi.js.map +1 -0
- package/cjs/myaccount/request.js +168 -0
- package/cjs/myaccount/request.js.map +1 -0
- package/cjs/myaccount/transactions/Base.js +38 -0
- package/cjs/myaccount/transactions/Base.js.map +1 -0
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js +58 -0
- package/cjs/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/EmailStatusTransaction.js +32 -0
- package/cjs/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/EmailTransaction.js +94 -0
- package/cjs/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/PhoneTransaction.js +78 -0
- package/cjs/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js +19 -0
- package/cjs/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/ProfileTransaction.js +26 -0
- package/cjs/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/cjs/myaccount/transactions/index.js +61 -0
- package/cjs/myaccount/transactions/index.js.map +1 -0
- package/cjs/myaccount/types.js +64 -0
- package/cjs/myaccount/types.js.map +1 -0
- package/cjs/oidc/decodeToken.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js.map +1 -1
- 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.map +1 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js.map +1 -1
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/refreshToken.js.map +1 -1
- package/cjs/oidc/util/urlParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/util/validateToken.js.map +1 -1
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options/browser.js.map +1 -1
- package/cjs/options/index.js +3 -1
- package/cjs/options/index.js.map +1 -1
- package/cjs/options/node.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +7 -7
- package/cjs/services/AutoRenewService.js.map +1 -1
- package/cjs/services/LeaderElectionService.js +103 -0
- package/cjs/services/LeaderElectionService.js.map +1 -0
- package/cjs/services/SyncStorageService.js +121 -39
- package/cjs/services/SyncStorageService.js.map +1 -1
- package/cjs/services/index.js +13 -0
- package/cjs/services/index.js.map +1 -1
- package/cjs/session.js.map +1 -1
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js.map +1 -1
- package/cjs/tx/index.js.map +1 -1
- package/cjs/tx/poll.js.map +1 -1
- package/cjs/tx/util.js.map +1 -1
- package/cjs/types/AuthState.js.map +1 -1
- package/cjs/types/Cookies.js.map +1 -1
- package/cjs/types/EventEmitter.js.map +1 -1
- package/cjs/types/JWT.js.map +1 -1
- package/cjs/types/OAuth.js.map +1 -1
- package/cjs/types/OktaAuthOptions.js.map +1 -1
- package/cjs/types/Service.js.map +1 -1
- package/cjs/types/Storage.js.map +1 -1
- package/cjs/types/Token.js.map +1 -1
- package/cjs/types/TokenManager.js +16 -0
- package/cjs/types/TokenManager.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/types/UserClaims.js.map +1 -1
- package/cjs/types/api.js.map +1 -1
- package/cjs/types/http.js.map +1 -1
- package/cjs/types/index.js +13 -0
- package/cjs/types/index.js.map +1 -1
- package/cjs/util/console.js +2 -1
- package/cjs/util/console.js.map +1 -1
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/sharedStorage.js.map +1 -1
- package/cjs/util/types.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/myaccount.umd.js +3 -0
- package/dist/myaccount.umd.js.LICENSE.txt +12 -0
- package/dist/myaccount.umd.js.map +1 -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.polyfill.js +1 -1
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/dist/okta-auth-js.umd.js +1 -1
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/browser/AuthStateManager.js +161 -0
- package/esm/browser/AuthStateManager.js.map +1 -0
- package/esm/browser/OktaAuth.js +560 -0
- package/esm/browser/OktaAuth.js.map +1 -0
- package/esm/browser/OktaUserAgent.js +39 -0
- package/esm/browser/OktaUserAgent.js.map +1 -0
- package/esm/browser/PromiseQueue.js +65 -0
- package/esm/browser/PromiseQueue.js.map +1 -0
- package/esm/browser/SavedObject.js +81 -0
- package/esm/browser/SavedObject.js.map +1 -0
- package/esm/browser/ServiceManager.js +115 -0
- package/esm/browser/ServiceManager.js.map +1 -0
- package/esm/browser/StorageManager.js +148 -0
- package/esm/browser/StorageManager.js.map +1 -0
- package/esm/browser/TokenManager.js +386 -0
- package/esm/browser/TokenManager.js.map +1 -0
- package/esm/browser/TransactionManager.js +244 -0
- package/esm/browser/TransactionManager.js.map +1 -0
- package/esm/browser/_virtual/_tslib.js +41 -0
- package/esm/browser/_virtual/_tslib.js.map +1 -0
- package/esm/browser/browser/browserStorage.js +216 -0
- package/esm/browser/browser/browserStorage.js.map +1 -0
- package/esm/browser/browser/fingerprint.js +69 -0
- package/esm/browser/browser/fingerprint.js.map +1 -0
- package/esm/browser/builderUtil.js +39 -0
- package/esm/browser/builderUtil.js.map +1 -0
- package/esm/browser/clock.js +28 -0
- package/esm/browser/clock.js.map +1 -0
- package/esm/browser/constants.js +37 -0
- package/esm/browser/constants.js.map +1 -0
- package/esm/browser/crypto/base64.js +66 -0
- package/esm/browser/crypto/base64.js.map +1 -0
- package/esm/browser/crypto/browser.js +18 -0
- package/esm/browser/crypto/browser.js.map +1 -0
- package/esm/browser/crypto/index.js +17 -0
- package/esm/browser/crypto/index.js.map +1 -0
- package/esm/browser/crypto/oidcHash.js +28 -0
- package/esm/browser/crypto/oidcHash.js.map +1 -0
- package/esm/browser/crypto/verifyToken.js +38 -0
- package/esm/browser/crypto/verifyToken.js.map +1 -0
- package/esm/browser/crypto/webauthn.js +79 -0
- package/esm/browser/crypto/webauthn.js.map +1 -0
- package/esm/browser/errors/AuthApiError.js +35 -0
- package/esm/browser/errors/AuthApiError.js.map +1 -0
- package/esm/browser/errors/AuthPollStopError.js +23 -0
- package/esm/browser/errors/AuthPollStopError.js.map +1 -0
- package/esm/browser/errors/AuthSdkError.js +31 -0
- package/esm/browser/errors/AuthSdkError.js.map +1 -0
- package/esm/browser/errors/CustomError.js +21 -0
- package/esm/browser/errors/CustomError.js.map +1 -0
- package/esm/browser/errors/OAuthError.js +27 -0
- package/esm/browser/errors/OAuthError.js.map +1 -0
- package/esm/browser/errors/index.js +26 -0
- package/esm/browser/errors/index.js.map +1 -0
- package/esm/browser/features.js +67 -0
- package/esm/browser/features.js.map +1 -0
- package/esm/browser/fetch/fetchRequest.js +90 -0
- package/esm/browser/fetch/fetchRequest.js.map +1 -0
- package/esm/browser/http/headers.js +19 -0
- package/esm/browser/http/headers.js.map +1 -0
- package/esm/browser/http/request.js +133 -0
- package/esm/browser/http/request.js.map +1 -0
- package/esm/browser/idx/authenticate.js +25 -0
- package/esm/browser/idx/authenticate.js.map +1 -0
- package/esm/browser/idx/authenticator/Authenticator.js +20 -0
- package/esm/browser/idx/authenticator/Authenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/OktaPassword.js +33 -0
- package/esm/browser/idx/authenticator/OktaPassword.js.map +1 -0
- package/esm/browser/idx/authenticator/OktaVerifyTotp.js +26 -0
- package/esm/browser/idx/authenticator/OktaVerifyTotp.js.map +1 -0
- package/esm/browser/idx/authenticator/SecurityQuestionEnrollment.js +45 -0
- package/esm/browser/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -0
- package/esm/browser/idx/authenticator/SecurityQuestionVerification.js +42 -0
- package/esm/browser/idx/authenticator/SecurityQuestionVerification.js.map +1 -0
- package/esm/browser/idx/authenticator/VerificationCodeAuthenticator.js +33 -0
- package/esm/browser/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js +41 -0
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/esm/browser/idx/authenticator/WebauthnVerification.js +43 -0
- package/esm/browser/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/esm/browser/idx/authenticator/getAuthenticator.js +51 -0
- package/esm/browser/idx/authenticator/getAuthenticator.js.map +1 -0
- package/esm/browser/idx/authenticator/util.js +55 -0
- package/esm/browser/idx/authenticator/util.js.map +1 -0
- package/esm/browser/idx/cancel.js +42 -0
- package/esm/browser/idx/cancel.js.map +1 -0
- package/esm/browser/idx/emailVerify.js +46 -0
- package/esm/browser/idx/emailVerify.js.map +1 -0
- package/esm/browser/idx/flow/AccountUnlockFlow.js +43 -0
- package/esm/browser/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/esm/browser/idx/flow/AuthenticationFlow.js +49 -0
- package/esm/browser/idx/flow/AuthenticationFlow.js.map +1 -0
- package/esm/browser/idx/flow/FlowSpecification.js +56 -0
- package/esm/browser/idx/flow/FlowSpecification.js.map +1 -0
- package/esm/browser/idx/flow/PasswordRecoveryFlow.js +47 -0
- package/esm/browser/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/esm/browser/idx/flow/RegistrationFlow.js +46 -0
- package/esm/browser/idx/flow/RegistrationFlow.js.map +1 -0
- package/esm/browser/idx/handleInteractionCodeRedirect.js +41 -0
- package/esm/browser/idx/handleInteractionCodeRedirect.js.map +1 -0
- package/esm/browser/idx/idxState/index.js +46 -0
- package/esm/browser/idx/idxState/index.js.map +1 -0
- package/esm/browser/idx/idxState/v1/actionParser.js +53 -0
- package/esm/browser/idx/idxState/v1/actionParser.js.map +1 -0
- package/esm/browser/idx/idxState/v1/generateIdxAction.js +65 -0
- package/esm/browser/idx/idxState/v1/generateIdxAction.js.map +1 -0
- package/esm/browser/idx/idxState/v1/idxResponseParser.js +95 -0
- package/esm/browser/idx/idxState/v1/idxResponseParser.js.map +1 -0
- package/esm/browser/idx/idxState/v1/makeIdxState.js +46 -0
- package/esm/browser/idx/idxState/v1/makeIdxState.js.map +1 -0
- package/esm/browser/idx/idxState/v1/parsers.js +20 -0
- package/esm/browser/idx/idxState/v1/parsers.js.map +1 -0
- package/esm/browser/idx/idxState/v1/remediationParser.js +25 -0
- package/esm/browser/idx/idxState/v1/remediationParser.js.map +1 -0
- package/esm/browser/idx/interact.js +62 -0
- package/esm/browser/idx/interact.js.map +1 -0
- package/esm/browser/idx/introspect.js +68 -0
- package/esm/browser/idx/introspect.js.map +1 -0
- package/esm/browser/idx/poll.js +52 -0
- package/esm/browser/idx/poll.js.map +1 -0
- package/esm/browser/idx/proceed.js +34 -0
- package/esm/browser/idx/proceed.js.map +1 -0
- package/esm/browser/idx/recoverPassword.js +41 -0
- package/esm/browser/idx/recoverPassword.js.map +1 -0
- package/esm/browser/idx/register.js +36 -0
- package/esm/browser/idx/register.js.map +1 -0
- package/esm/browser/idx/remediate.js +134 -0
- package/esm/browser/idx/remediate.js.map +1 -0
- package/esm/browser/idx/remediators/AuthenticatorEnrollmentData.js +48 -0
- package/esm/browser/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -0
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js +71 -0
- package/esm/browser/idx/remediators/AuthenticatorVerificationData.js.map +1 -0
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js +82 -0
- package/esm/browser/idx/remediators/Base/AuthenticatorData.js.map +1 -0
- package/esm/browser/idx/remediators/Base/Remediator.js +177 -0
- package/esm/browser/idx/remediators/Base/Remediator.js.map +1 -0
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js +90 -0
- package/esm/browser/idx/remediators/Base/SelectAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js +44 -0
- package/esm/browser/idx/remediators/Base/VerifyAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/ChallengeAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/ChallengeAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/ChallengePoll.js +23 -0
- package/esm/browser/idx/remediators/ChallengePoll.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/EnrollAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollPoll.js +38 -0
- package/esm/browser/idx/remediators/EnrollPoll.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollProfile.js +52 -0
- package/esm/browser/idx/remediators/EnrollProfile.js.map +1 -0
- package/esm/browser/idx/remediators/EnrollmentChannelData.js +49 -0
- package/esm/browser/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js +61 -0
- package/esm/browser/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
- package/esm/browser/idx/remediators/GenericRemediator/util.js +92 -0
- package/esm/browser/idx/remediators/GenericRemediator/util.js.map +1 -0
- package/esm/browser/idx/remediators/Identify.js +40 -0
- package/esm/browser/idx/remediators/Identify.js.map +1 -0
- package/esm/browser/idx/remediators/ReEnrollAuthenticator.js +34 -0
- package/esm/browser/idx/remediators/ReEnrollAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/RedirectIdp.js +32 -0
- package/esm/browser/idx/remediators/RedirectIdp.js.map +1 -0
- package/esm/browser/idx/remediators/ResetAuthenticator.js +20 -0
- package/esm/browser/idx/remediators/ResetAuthenticator.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorAuthenticate.js +35 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorEnroll.js +20 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js +44 -0
- package/esm/browser/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/esm/browser/idx/remediators/SelectEnrollProfile.js +23 -0
- package/esm/browser/idx/remediators/SelectEnrollProfile.js.map +1 -0
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js +50 -0
- package/esm/browser/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/esm/browser/idx/remediators/Skip.js +23 -0
- package/esm/browser/idx/remediators/Skip.js.map +1 -0
- package/esm/browser/idx/remediators/index.js +33 -0
- package/esm/browser/idx/remediators/index.js.map +1 -0
- package/esm/browser/idx/remediators/util.js +34 -0
- package/esm/browser/idx/remediators/util.js.map +1 -0
- package/esm/browser/idx/run.js +245 -0
- package/esm/browser/idx/run.js.map +1 -0
- package/esm/browser/idx/startTransaction.js +21 -0
- package/esm/browser/idx/startTransaction.js.map +1 -0
- package/esm/browser/idx/transactionMeta.js +110 -0
- package/esm/browser/idx/transactionMeta.js.map +1 -0
- package/esm/browser/idx/types/api.js +43 -0
- package/esm/browser/idx/types/api.js.map +1 -0
- package/esm/browser/idx/types/idx-js.js +21 -0
- package/esm/browser/idx/types/idx-js.js.map +1 -0
- package/esm/browser/idx/unlockAccount.js +32 -0
- package/esm/browser/idx/unlockAccount.js.map +1 -0
- package/esm/browser/idx/util.js +212 -0
- package/esm/browser/idx/util.js.map +1 -0
- package/esm/browser/index.js +91 -0
- package/esm/browser/index.js.map +1 -0
- package/esm/browser/myaccount/emailApi.js +86 -0
- package/esm/browser/myaccount/emailApi.js.map +1 -0
- package/esm/browser/myaccount/myaccount/index.js +24 -0
- package/esm/browser/myaccount/myaccount/index.js.map +1 -0
- package/esm/browser/myaccount/phoneApi.js +76 -0
- package/esm/browser/myaccount/phoneApi.js.map +1 -0
- package/esm/browser/myaccount/profileApi.js +46 -0
- package/esm/browser/myaccount/profileApi.js.map +1 -0
- package/esm/browser/myaccount/request.js +121 -0
- package/esm/browser/myaccount/request.js.map +1 -0
- package/esm/browser/myaccount/transactions/Base.js +32 -0
- package/esm/browser/myaccount/transactions/Base.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailChallengeTransaction.js +48 -0
- package/esm/browser/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailStatusTransaction.js +28 -0
- package/esm/browser/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/EmailTransaction.js +81 -0
- package/esm/browser/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/PhoneTransaction.js +67 -0
- package/esm/browser/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/ProfileSchemaTransaction.js +23 -0
- package/esm/browser/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/esm/browser/myaccount/transactions/ProfileTransaction.js +26 -0
- package/esm/browser/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/esm/browser/myaccount/types.js +25 -0
- package/esm/browser/myaccount/types.js.map +1 -0
- package/esm/browser/oidc/decodeToken.js +33 -0
- package/esm/browser/oidc/decodeToken.js.map +1 -0
- package/esm/browser/oidc/endpoints/authorize.js +63 -0
- package/esm/browser/oidc/endpoints/authorize.js.map +1 -0
- package/esm/browser/oidc/endpoints/token.js +83 -0
- package/esm/browser/oidc/endpoints/token.js.map +1 -0
- package/esm/browser/oidc/endpoints/well-known.js +55 -0
- package/esm/browser/oidc/endpoints/well-known.js.map +1 -0
- package/esm/browser/oidc/exchangeCodeForTokens.js +58 -0
- package/esm/browser/oidc/exchangeCodeForTokens.js.map +1 -0
- package/esm/browser/oidc/getToken.js +117 -0
- package/esm/browser/oidc/getToken.js.map +1 -0
- package/esm/browser/oidc/getUserInfo.js +69 -0
- package/esm/browser/oidc/getUserInfo.js.map +1 -0
- package/esm/browser/oidc/getWithPopup.js +35 -0
- package/esm/browser/oidc/getWithPopup.js.map +1 -0
- package/esm/browser/oidc/getWithRedirect.js +34 -0
- package/esm/browser/oidc/getWithRedirect.js.map +1 -0
- package/esm/browser/oidc/getWithoutPrompt.js +31 -0
- package/esm/browser/oidc/getWithoutPrompt.js.map +1 -0
- package/esm/browser/oidc/handleOAuthResponse.js +119 -0
- package/esm/browser/oidc/handleOAuthResponse.js.map +1 -0
- package/esm/browser/oidc/parseFromUrl.js +116 -0
- package/esm/browser/oidc/parseFromUrl.js.map +1 -0
- package/esm/browser/oidc/renewToken.js +67 -0
- package/esm/browser/oidc/renewToken.js.map +1 -0
- package/esm/browser/oidc/renewTokens.js +58 -0
- package/esm/browser/oidc/renewTokens.js.map +1 -0
- package/esm/browser/oidc/renewTokensWithRefresh.js +47 -0
- package/esm/browser/oidc/renewTokensWithRefresh.js.map +1 -0
- package/esm/browser/oidc/revokeToken.js +49 -0
- package/esm/browser/oidc/revokeToken.js.map +1 -0
- package/esm/browser/oidc/util/browser.js +69 -0
- package/esm/browser/oidc/util/browser.js.map +1 -0
- package/esm/browser/oidc/util/defaultTokenParams.js +34 -0
- package/esm/browser/oidc/util/defaultTokenParams.js.map +1 -0
- package/esm/browser/oidc/util/errors.js +38 -0
- package/esm/browser/oidc/util/errors.js.map +1 -0
- package/esm/browser/oidc/util/loginRedirect.js +66 -0
- package/esm/browser/oidc/util/loginRedirect.js.map +1 -0
- package/esm/browser/oidc/util/oauth.js +65 -0
- package/esm/browser/oidc/util/oauth.js.map +1 -0
- package/esm/browser/oidc/util/oauthMeta.js +38 -0
- package/esm/browser/oidc/util/oauthMeta.js.map +1 -0
- package/esm/browser/oidc/util/pkce.js +48 -0
- package/esm/browser/oidc/util/pkce.js.map +1 -0
- package/esm/browser/oidc/util/prepareTokenParams.js +65 -0
- package/esm/browser/oidc/util/prepareTokenParams.js.map +1 -0
- package/esm/browser/oidc/util/refreshToken.js +33 -0
- package/esm/browser/oidc/util/refreshToken.js.map +1 -0
- package/esm/browser/oidc/util/urlParams.js +43 -0
- package/esm/browser/oidc/util/urlParams.js.map +1 -0
- package/esm/browser/oidc/util/validateClaims.js +48 -0
- package/esm/browser/oidc/util/validateClaims.js.map +1 -0
- package/esm/browser/oidc/util/validateToken.js +34 -0
- package/esm/browser/oidc/util/validateToken.js.map +1 -0
- package/esm/browser/oidc/verifyToken.js +54 -0
- package/esm/browser/oidc/verifyToken.js.map +1 -0
- package/esm/browser/options/browser.js +77 -0
- package/esm/browser/options/browser.js.map +1 -0
- package/esm/browser/options/index.js +85 -0
- package/esm/browser/options/index.js.map +1 -0
- package/esm/browser/services/AutoRenewService.js +77 -0
- package/esm/browser/services/AutoRenewService.js.map +1 -0
- package/esm/browser/services/LeaderElectionService.js +74 -0
- package/esm/browser/services/LeaderElectionService.js.map +1 -0
- package/esm/browser/services/SyncStorageService.js +130 -0
- package/esm/browser/services/SyncStorageService.js.map +1 -0
- package/esm/browser/session.js +66 -0
- package/esm/browser/session.js.map +1 -0
- package/esm/browser/tx/AuthTransaction.js +174 -0
- package/esm/browser/tx/AuthTransaction.js.map +1 -0
- package/esm/browser/tx/api.js +72 -0
- package/esm/browser/tx/api.js.map +1 -0
- package/esm/browser/tx/poll.js +117 -0
- package/esm/browser/tx/poll.js.map +1 -0
- package/esm/browser/tx/util.js +26 -0
- package/esm/browser/tx/util.js.map +1 -0
- package/esm/browser/types/Token.js +32 -0
- package/esm/browser/types/Token.js.map +1 -0
- package/esm/browser/types/TokenManager.js +21 -0
- package/esm/browser/types/TokenManager.js.map +1 -0
- package/esm/browser/types/Transaction.js +52 -0
- package/esm/browser/types/Transaction.js.map +1 -0
- package/esm/browser/util/console.js +50 -0
- package/esm/browser/util/console.js.map +1 -0
- package/esm/browser/util/misc.js +32 -0
- package/esm/browser/util/misc.js.map +1 -0
- package/esm/browser/util/object.js +98 -0
- package/esm/browser/util/object.js.map +1 -0
- package/esm/browser/util/sharedStorage.js +56 -0
- package/esm/browser/util/sharedStorage.js.map +1 -0
- package/esm/browser/util/types.js +30 -0
- package/esm/browser/util/types.js.map +1 -0
- package/esm/browser/util/url.js +57 -0
- package/esm/browser/util/url.js.map +1 -0
- package/esm/node/AuthStateManager.js +161 -0
- package/esm/node/AuthStateManager.js.map +1 -0
- package/esm/node/OktaAuth.js +560 -0
- package/esm/node/OktaAuth.js.map +1 -0
- package/esm/node/OktaUserAgent.js +39 -0
- package/esm/node/OktaUserAgent.js.map +1 -0
- package/esm/node/PromiseQueue.js +65 -0
- package/esm/node/PromiseQueue.js.map +1 -0
- package/esm/node/SavedObject.js +81 -0
- package/esm/node/SavedObject.js.map +1 -0
- package/esm/node/ServiceManager.js +115 -0
- package/esm/node/ServiceManager.js.map +1 -0
- package/esm/node/StorageManager.js +148 -0
- package/esm/node/StorageManager.js.map +1 -0
- package/esm/node/TokenManager.js +387 -0
- package/esm/node/TokenManager.js.map +1 -0
- package/esm/node/TransactionManager.js +244 -0
- package/esm/node/TransactionManager.js.map +1 -0
- package/esm/node/_virtual/_tslib.js +41 -0
- package/esm/node/_virtual/_tslib.js.map +1 -0
- package/esm/node/browser/browserStorage.js +216 -0
- package/esm/node/browser/browserStorage.js.map +1 -0
- package/esm/node/browser/fingerprint.js +70 -0
- package/esm/node/browser/fingerprint.js.map +1 -0
- package/esm/node/builderUtil.js +39 -0
- package/esm/node/builderUtil.js.map +1 -0
- package/esm/node/clock.js +28 -0
- package/esm/node/clock.js.map +1 -0
- package/esm/node/constants.js +37 -0
- package/esm/node/constants.js.map +1 -0
- package/esm/node/crypto/base64.js +66 -0
- package/esm/node/crypto/base64.js.map +1 -0
- package/esm/node/crypto/index.js +17 -0
- package/esm/node/crypto/index.js.map +1 -0
- package/esm/node/crypto/node.js +48 -0
- package/esm/node/crypto/node.js.map +1 -0
- package/esm/node/crypto/oidcHash.js +28 -0
- package/esm/node/crypto/oidcHash.js.map +1 -0
- package/esm/node/crypto/verifyToken.js +38 -0
- package/esm/node/crypto/verifyToken.js.map +1 -0
- package/esm/node/crypto/webauthn.js +79 -0
- package/esm/node/crypto/webauthn.js.map +1 -0
- package/esm/node/errors/AuthApiError.js +35 -0
- package/esm/node/errors/AuthApiError.js.map +1 -0
- package/esm/node/errors/AuthPollStopError.js +23 -0
- package/esm/node/errors/AuthPollStopError.js.map +1 -0
- package/esm/node/errors/AuthSdkError.js +31 -0
- package/esm/node/errors/AuthSdkError.js.map +1 -0
- package/esm/node/errors/CustomError.js +21 -0
- package/esm/node/errors/CustomError.js.map +1 -0
- package/esm/node/errors/OAuthError.js +27 -0
- package/esm/node/errors/OAuthError.js.map +1 -0
- package/esm/node/errors/index.js +26 -0
- package/esm/node/errors/index.js.map +1 -0
- package/esm/node/features.js +67 -0
- package/esm/node/features.js.map +1 -0
- package/esm/node/fetch/fetchRequest.js +90 -0
- package/esm/node/fetch/fetchRequest.js.map +1 -0
- package/esm/node/http/headers.js +19 -0
- package/esm/node/http/headers.js.map +1 -0
- package/esm/node/http/request.js +133 -0
- package/esm/node/http/request.js.map +1 -0
- package/esm/node/idx/authenticate.js +25 -0
- package/esm/node/idx/authenticate.js.map +1 -0
- package/esm/node/idx/authenticator/Authenticator.js +20 -0
- package/esm/node/idx/authenticator/Authenticator.js.map +1 -0
- package/esm/node/idx/authenticator/OktaPassword.js +33 -0
- package/esm/node/idx/authenticator/OktaPassword.js.map +1 -0
- package/esm/node/idx/authenticator/OktaVerifyTotp.js +26 -0
- package/esm/node/idx/authenticator/OktaVerifyTotp.js.map +1 -0
- package/esm/node/idx/authenticator/SecurityQuestionEnrollment.js +45 -0
- package/esm/node/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -0
- package/esm/node/idx/authenticator/SecurityQuestionVerification.js +42 -0
- package/esm/node/idx/authenticator/SecurityQuestionVerification.js.map +1 -0
- package/esm/node/idx/authenticator/VerificationCodeAuthenticator.js +33 -0
- package/esm/node/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -0
- package/esm/node/idx/authenticator/WebauthnEnrollment.js +41 -0
- package/esm/node/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/esm/node/idx/authenticator/WebauthnVerification.js +43 -0
- package/esm/node/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/esm/node/idx/authenticator/getAuthenticator.js +51 -0
- package/esm/node/idx/authenticator/getAuthenticator.js.map +1 -0
- package/esm/node/idx/authenticator/util.js +55 -0
- package/esm/node/idx/authenticator/util.js.map +1 -0
- package/esm/node/idx/cancel.js +42 -0
- package/esm/node/idx/cancel.js.map +1 -0
- package/esm/node/idx/emailVerify.js +46 -0
- package/esm/node/idx/emailVerify.js.map +1 -0
- package/esm/node/idx/flow/AccountUnlockFlow.js +43 -0
- package/esm/node/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/esm/node/idx/flow/AuthenticationFlow.js +49 -0
- package/esm/node/idx/flow/AuthenticationFlow.js.map +1 -0
- package/esm/node/idx/flow/FlowSpecification.js +56 -0
- package/esm/node/idx/flow/FlowSpecification.js.map +1 -0
- package/esm/node/idx/flow/PasswordRecoveryFlow.js +47 -0
- package/esm/node/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/esm/node/idx/flow/RegistrationFlow.js +46 -0
- package/esm/node/idx/flow/RegistrationFlow.js.map +1 -0
- package/esm/node/idx/handleInteractionCodeRedirect.js +41 -0
- package/esm/node/idx/handleInteractionCodeRedirect.js.map +1 -0
- package/esm/node/idx/idxState/index.js +46 -0
- package/esm/node/idx/idxState/index.js.map +1 -0
- package/esm/node/idx/idxState/v1/actionParser.js +53 -0
- package/esm/node/idx/idxState/v1/actionParser.js.map +1 -0
- package/esm/node/idx/idxState/v1/generateIdxAction.js +65 -0
- package/esm/node/idx/idxState/v1/generateIdxAction.js.map +1 -0
- package/esm/node/idx/idxState/v1/idxResponseParser.js +95 -0
- package/esm/node/idx/idxState/v1/idxResponseParser.js.map +1 -0
- package/esm/node/idx/idxState/v1/makeIdxState.js +46 -0
- package/esm/node/idx/idxState/v1/makeIdxState.js.map +1 -0
- package/esm/node/idx/idxState/v1/parsers.js +20 -0
- package/esm/node/idx/idxState/v1/parsers.js.map +1 -0
- package/esm/node/idx/idxState/v1/remediationParser.js +25 -0
- package/esm/node/idx/idxState/v1/remediationParser.js.map +1 -0
- package/esm/node/idx/interact.js +63 -0
- package/esm/node/idx/interact.js.map +1 -0
- package/esm/node/idx/introspect.js +69 -0
- package/esm/node/idx/introspect.js.map +1 -0
- package/esm/node/idx/poll.js +52 -0
- package/esm/node/idx/poll.js.map +1 -0
- package/esm/node/idx/proceed.js +34 -0
- package/esm/node/idx/proceed.js.map +1 -0
- package/esm/node/idx/recoverPassword.js +41 -0
- package/esm/node/idx/recoverPassword.js.map +1 -0
- package/esm/node/idx/register.js +36 -0
- package/esm/node/idx/register.js.map +1 -0
- package/esm/node/idx/remediate.js +134 -0
- package/esm/node/idx/remediate.js.map +1 -0
- package/esm/node/idx/remediators/AuthenticatorEnrollmentData.js +48 -0
- package/esm/node/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -0
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js +71 -0
- package/esm/node/idx/remediators/AuthenticatorVerificationData.js.map +1 -0
- package/esm/node/idx/remediators/Base/AuthenticatorData.js +82 -0
- package/esm/node/idx/remediators/Base/AuthenticatorData.js.map +1 -0
- package/esm/node/idx/remediators/Base/Remediator.js +177 -0
- package/esm/node/idx/remediators/Base/Remediator.js.map +1 -0
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js +90 -0
- package/esm/node/idx/remediators/Base/SelectAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js +44 -0
- package/esm/node/idx/remediators/Base/VerifyAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/ChallengeAuthenticator.js +20 -0
- package/esm/node/idx/remediators/ChallengeAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/ChallengePoll.js +23 -0
- package/esm/node/idx/remediators/ChallengePoll.js.map +1 -0
- package/esm/node/idx/remediators/EnrollAuthenticator.js +20 -0
- package/esm/node/idx/remediators/EnrollAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/EnrollPoll.js +38 -0
- package/esm/node/idx/remediators/EnrollPoll.js.map +1 -0
- package/esm/node/idx/remediators/EnrollProfile.js +52 -0
- package/esm/node/idx/remediators/EnrollProfile.js.map +1 -0
- package/esm/node/idx/remediators/EnrollmentChannelData.js +49 -0
- package/esm/node/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js +61 -0
- package/esm/node/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
- package/esm/node/idx/remediators/GenericRemediator/util.js +92 -0
- package/esm/node/idx/remediators/GenericRemediator/util.js.map +1 -0
- package/esm/node/idx/remediators/Identify.js +40 -0
- package/esm/node/idx/remediators/Identify.js.map +1 -0
- package/esm/node/idx/remediators/ReEnrollAuthenticator.js +34 -0
- package/esm/node/idx/remediators/ReEnrollAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/RedirectIdp.js +32 -0
- package/esm/node/idx/remediators/RedirectIdp.js.map +1 -0
- package/esm/node/idx/remediators/ResetAuthenticator.js +20 -0
- package/esm/node/idx/remediators/ResetAuthenticator.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorAuthenticate.js +35 -0
- package/esm/node/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorEnroll.js +20 -0
- package/esm/node/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -0
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js +44 -0
- package/esm/node/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/esm/node/idx/remediators/SelectEnrollProfile.js +23 -0
- package/esm/node/idx/remediators/SelectEnrollProfile.js.map +1 -0
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js +50 -0
- package/esm/node/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/esm/node/idx/remediators/Skip.js +23 -0
- package/esm/node/idx/remediators/Skip.js.map +1 -0
- package/esm/node/idx/remediators/index.js +33 -0
- package/esm/node/idx/remediators/index.js.map +1 -0
- package/esm/node/idx/remediators/util.js +34 -0
- package/esm/node/idx/remediators/util.js.map +1 -0
- package/esm/node/idx/run.js +245 -0
- package/esm/node/idx/run.js.map +1 -0
- package/esm/node/idx/startTransaction.js +21 -0
- package/esm/node/idx/startTransaction.js.map +1 -0
- package/esm/node/idx/transactionMeta.js +111 -0
- package/esm/node/idx/transactionMeta.js.map +1 -0
- package/esm/node/idx/types/api.js +43 -0
- package/esm/node/idx/types/api.js.map +1 -0
- package/esm/node/idx/types/idx-js.js +21 -0
- package/esm/node/idx/types/idx-js.js.map +1 -0
- package/esm/node/idx/unlockAccount.js +32 -0
- package/esm/node/idx/unlockAccount.js.map +1 -0
- package/esm/node/idx/util.js +212 -0
- package/esm/node/idx/util.js.map +1 -0
- package/esm/node/index.js +91 -0
- package/esm/node/index.js.map +1 -0
- package/esm/node/myaccount/emailApi.js +86 -0
- package/esm/node/myaccount/emailApi.js.map +1 -0
- package/esm/node/myaccount/myaccount/index.js +24 -0
- package/esm/node/myaccount/myaccount/index.js.map +1 -0
- package/esm/node/myaccount/phoneApi.js +76 -0
- package/esm/node/myaccount/phoneApi.js.map +1 -0
- package/esm/node/myaccount/profileApi.js +46 -0
- package/esm/node/myaccount/profileApi.js.map +1 -0
- package/esm/node/myaccount/request.js +121 -0
- package/esm/node/myaccount/request.js.map +1 -0
- package/esm/node/myaccount/transactions/Base.js +32 -0
- package/esm/node/myaccount/transactions/Base.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailChallengeTransaction.js +48 -0
- package/esm/node/myaccount/transactions/EmailChallengeTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailStatusTransaction.js +28 -0
- package/esm/node/myaccount/transactions/EmailStatusTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/EmailTransaction.js +81 -0
- package/esm/node/myaccount/transactions/EmailTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/PhoneTransaction.js +67 -0
- package/esm/node/myaccount/transactions/PhoneTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/ProfileSchemaTransaction.js +23 -0
- package/esm/node/myaccount/transactions/ProfileSchemaTransaction.js.map +1 -0
- package/esm/node/myaccount/transactions/ProfileTransaction.js +26 -0
- package/esm/node/myaccount/transactions/ProfileTransaction.js.map +1 -0
- package/esm/node/myaccount/types.js +25 -0
- package/esm/node/myaccount/types.js.map +1 -0
- package/esm/node/oidc/decodeToken.js +34 -0
- package/esm/node/oidc/decodeToken.js.map +1 -0
- package/esm/node/oidc/endpoints/authorize.js +63 -0
- package/esm/node/oidc/endpoints/authorize.js.map +1 -0
- package/esm/node/oidc/endpoints/token.js +83 -0
- package/esm/node/oidc/endpoints/token.js.map +1 -0
- package/esm/node/oidc/endpoints/well-known.js +55 -0
- package/esm/node/oidc/endpoints/well-known.js.map +1 -0
- package/esm/node/oidc/exchangeCodeForTokens.js +59 -0
- package/esm/node/oidc/exchangeCodeForTokens.js.map +1 -0
- package/esm/node/oidc/getToken.js +118 -0
- package/esm/node/oidc/getToken.js.map +1 -0
- package/esm/node/oidc/getUserInfo.js +69 -0
- package/esm/node/oidc/getUserInfo.js.map +1 -0
- package/esm/node/oidc/getWithPopup.js +36 -0
- package/esm/node/oidc/getWithPopup.js.map +1 -0
- package/esm/node/oidc/getWithRedirect.js +35 -0
- package/esm/node/oidc/getWithRedirect.js.map +1 -0
- package/esm/node/oidc/getWithoutPrompt.js +31 -0
- package/esm/node/oidc/getWithoutPrompt.js.map +1 -0
- package/esm/node/oidc/handleOAuthResponse.js +120 -0
- package/esm/node/oidc/handleOAuthResponse.js.map +1 -0
- package/esm/node/oidc/parseFromUrl.js +117 -0
- package/esm/node/oidc/parseFromUrl.js.map +1 -0
- package/esm/node/oidc/renewToken.js +67 -0
- package/esm/node/oidc/renewToken.js.map +1 -0
- package/esm/node/oidc/renewTokens.js +59 -0
- package/esm/node/oidc/renewTokens.js.map +1 -0
- package/esm/node/oidc/renewTokensWithRefresh.js +47 -0
- package/esm/node/oidc/renewTokensWithRefresh.js.map +1 -0
- package/esm/node/oidc/revokeToken.js +49 -0
- package/esm/node/oidc/revokeToken.js.map +1 -0
- package/esm/node/oidc/util/browser.js +69 -0
- package/esm/node/oidc/util/browser.js.map +1 -0
- package/esm/node/oidc/util/defaultTokenParams.js +34 -0
- package/esm/node/oidc/util/defaultTokenParams.js.map +1 -0
- package/esm/node/oidc/util/errors.js +38 -0
- package/esm/node/oidc/util/errors.js.map +1 -0
- package/esm/node/oidc/util/loginRedirect.js +66 -0
- package/esm/node/oidc/util/loginRedirect.js.map +1 -0
- package/esm/node/oidc/util/oauth.js +65 -0
- package/esm/node/oidc/util/oauth.js.map +1 -0
- package/esm/node/oidc/util/oauthMeta.js +38 -0
- package/esm/node/oidc/util/oauthMeta.js.map +1 -0
- package/esm/node/oidc/util/pkce.js +48 -0
- package/esm/node/oidc/util/pkce.js.map +1 -0
- package/esm/node/oidc/util/prepareTokenParams.js +65 -0
- package/esm/node/oidc/util/prepareTokenParams.js.map +1 -0
- package/esm/node/oidc/util/refreshToken.js +33 -0
- package/esm/node/oidc/util/refreshToken.js.map +1 -0
- package/esm/node/oidc/util/urlParams.js +43 -0
- package/esm/node/oidc/util/urlParams.js.map +1 -0
- package/esm/node/oidc/util/validateClaims.js +48 -0
- package/esm/node/oidc/util/validateClaims.js.map +1 -0
- package/esm/node/oidc/util/validateToken.js +34 -0
- package/esm/node/oidc/util/validateToken.js.map +1 -0
- package/esm/node/oidc/verifyToken.js +55 -0
- package/esm/node/oidc/verifyToken.js.map +1 -0
- package/esm/node/options/index.js +85 -0
- package/esm/node/options/index.js.map +1 -0
- package/esm/node/options/node.js +41 -0
- package/esm/node/options/node.js.map +1 -0
- package/esm/node/server/serverStorage.js +82 -0
- package/esm/node/server/serverStorage.js.map +1 -0
- package/esm/node/services/AutoRenewService.js +77 -0
- package/esm/node/services/AutoRenewService.js.map +1 -0
- package/esm/node/services/LeaderElectionService.js +74 -0
- package/esm/node/services/LeaderElectionService.js.map +1 -0
- package/esm/node/services/SyncStorageService.js +130 -0
- package/esm/node/services/SyncStorageService.js.map +1 -0
- package/esm/node/session.js +66 -0
- package/esm/node/session.js.map +1 -0
- package/esm/node/tx/AuthTransaction.js +174 -0
- package/esm/node/tx/AuthTransaction.js.map +1 -0
- package/esm/node/tx/api.js +72 -0
- package/esm/node/tx/api.js.map +1 -0
- package/esm/node/tx/poll.js +117 -0
- package/esm/node/tx/poll.js.map +1 -0
- package/esm/node/tx/util.js +26 -0
- package/esm/node/tx/util.js.map +1 -0
- package/esm/node/types/Token.js +32 -0
- package/esm/node/types/Token.js.map +1 -0
- package/esm/node/types/TokenManager.js +21 -0
- package/esm/node/types/TokenManager.js.map +1 -0
- package/esm/node/types/Transaction.js +52 -0
- package/esm/node/types/Transaction.js.map +1 -0
- package/esm/node/util/console.js +50 -0
- package/esm/node/util/console.js.map +1 -0
- package/esm/node/util/misc.js +32 -0
- package/esm/node/util/misc.js.map +1 -0
- package/esm/node/util/object.js +98 -0
- package/esm/node/util/object.js.map +1 -0
- package/esm/node/util/sharedStorage.js +56 -0
- package/esm/node/util/sharedStorage.js.map +1 -0
- package/esm/node/util/types.js +30 -0
- package/esm/node/util/types.js.map +1 -0
- package/esm/node/util/url.js +57 -0
- package/esm/node/util/url.js.map +1 -0
- package/esm/package.json +3 -0
- package/lib/SavedObject.d.ts +1 -0
- package/lib/ServiceManager.d.ts +1 -7
- package/lib/TokenManager.d.ts +12 -10
- package/lib/cdnEntry.d.ts +18 -0
- package/lib/errors/AuthApiError.d.ts +2 -1
- package/lib/idx/idxState/v1/idxResponseParser.d.ts +2 -2
- package/lib/idx/util.d.ts +3 -3
- package/lib/myaccount/api.d.ts +14 -0
- package/lib/myaccount/emailApi.d.ts +29 -0
- package/lib/myaccount/index.d.ts +13 -0
- package/lib/myaccount/phoneApi.d.ts +25 -0
- package/lib/myaccount/profileApi.d.ts +13 -0
- package/lib/myaccount/request.d.ts +29 -0
- package/lib/myaccount/transactions/Base.d.ts +15 -0
- package/lib/myaccount/transactions/EmailChallengeTransaction.d.ts +12 -0
- package/lib/myaccount/transactions/EmailStatusTransaction.d.ts +9 -0
- package/lib/myaccount/transactions/EmailTransaction.d.ts +15 -0
- package/lib/myaccount/transactions/PhoneTransaction.d.ts +12 -0
- package/lib/myaccount/transactions/ProfileSchemaTransaction.d.ts +5 -0
- package/lib/myaccount/transactions/ProfileTransaction.d.ts +7 -0
- package/lib/myaccount/transactions/index.d.ts +7 -0
- package/lib/myaccount/types.d.ts +55 -0
- package/lib/services/AutoRenewService.d.ts +2 -2
- package/lib/services/LeaderElectionService.d.ts +33 -0
- package/lib/services/SyncStorageService.d.ts +17 -5
- package/lib/services/index.d.ts +1 -0
- package/lib/types/JWT.d.ts +4 -1
- package/lib/types/OktaAuthOptions.d.ts +4 -2
- package/lib/types/Service.d.ts +7 -4
- package/lib/types/Storage.d.ts +2 -0
- package/lib/types/TokenManager.d.ts +20 -4
- package/lib/types/api.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +44 -20
- package/polyfill/index.js +7 -0
- package/esm/esm.browser.js +0 -9834
- package/esm/esm.browser.js.map +0 -1
- package/esm/esm.node.mjs +0 -9932
- package/esm/esm.node.mjs.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
var _request = require("../request");
|
|
10
|
+
|
|
11
|
+
class EmailChallengeTransaction extends _Base.default {
|
|
12
|
+
// eslint-disable-next-line no-use-before-define
|
|
13
|
+
constructor(oktaAuth, options) {
|
|
14
|
+
super(oktaAuth, options);
|
|
15
|
+
const {
|
|
16
|
+
accessToken,
|
|
17
|
+
res
|
|
18
|
+
} = options; // assign required fields from res
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
id,
|
|
22
|
+
expiresAt,
|
|
23
|
+
profile,
|
|
24
|
+
status,
|
|
25
|
+
_links
|
|
26
|
+
} = res;
|
|
27
|
+
this.id = id;
|
|
28
|
+
this.expiresAt = expiresAt;
|
|
29
|
+
this.profile = profile;
|
|
30
|
+
this.status = status; // assign transformed fns to transaction
|
|
31
|
+
|
|
32
|
+
this.poll = async () => {
|
|
33
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
34
|
+
oktaAuth,
|
|
35
|
+
accessToken,
|
|
36
|
+
methodName: 'poll',
|
|
37
|
+
links: _links,
|
|
38
|
+
transactionClassName: 'EmailStatusTransaction'
|
|
39
|
+
});
|
|
40
|
+
return await fn();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
this.verify = async payload => {
|
|
44
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
45
|
+
oktaAuth,
|
|
46
|
+
accessToken,
|
|
47
|
+
methodName: 'verify',
|
|
48
|
+
links: _links
|
|
49
|
+
});
|
|
50
|
+
return await fn(payload);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exports.default = EmailChallengeTransaction;
|
|
57
|
+
module.exports = exports.default;
|
|
58
|
+
//# sourceMappingURL=EmailChallengeTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailChallengeTransaction.js","names":["EmailChallengeTransaction","BaseTransaction","constructor","oktaAuth","options","accessToken","res","id","expiresAt","profile","status","_links","poll","fn","methodName","links","transactionClassName","verify","payload"],"sources":["../../../../lib/myaccount/transactions/EmailChallengeTransaction.ts"],"sourcesContent":["import EmailStatusTransaction from './EmailStatusTransaction';\nimport { \n EmailProfile, \n Status,\n VerificationPayload, \n} from '../types';\nimport BaseTransaction from './Base';\nimport { generateRequestFnFromLinks } from '../request';\n\nexport default class EmailChallengeTransaction extends BaseTransaction {\n id: string;\n expiresAt: string;\n profile: EmailProfile;\n status: Status;\n\n poll: () => Promise<EmailStatusTransaction>;\n // eslint-disable-next-line no-use-before-define\n verify: (payload: VerificationPayload) => Promise<EmailChallengeTransaction>;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n const { accessToken, res } = options;\n // assign required fields from res\n const { id, expiresAt, profile, status, _links } = res;\n this.id = id;\n this.expiresAt = expiresAt;\n this.profile = profile;\n this.status = status;\n\n // assign transformed fns to transaction\n this.poll = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'poll', \n links: _links,\n transactionClassName: 'EmailStatusTransaction'\n });\n return await fn() as EmailStatusTransaction;\n };\n this.verify = async (payload) => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'verify', \n links: _links,\n });\n return await fn(payload) as EmailChallengeTransaction;\n };\n }\n}\n"],"mappings":";;;;;;AAMA;;AACA;;AAEe,MAAMA,yBAAN,SAAwCC,aAAxC,CAAwD;EAOrE;EAGAC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,MAAM;MAAEC,WAAF;MAAeC;IAAf,IAAuBF,OAA7B,CAH6B,CAI7B;;IACA,MAAM;MAAEG,EAAF;MAAMC,SAAN;MAAiBC,OAAjB;MAA0BC,MAA1B;MAAkCC;IAAlC,IAA6CL,GAAnD;IACA,KAAKC,EAAL,GAAUA,EAAV;IACA,KAAKC,SAAL,GAAiBA,SAAjB;IACA,KAAKC,OAAL,GAAeA,OAAf;IACA,KAAKC,MAAL,GAAcA,MAAd,CAT6B,CAW7B;;IACA,KAAKE,IAAL,GAAY,YAAY;MACtB,MAAMC,EAAE,GAAG,yCAA2B;QACpCV,QADoC;QAEpCE,WAFoC;QAGpCS,UAAU,EAAE,MAHwB;QAIpCC,KAAK,EAAEJ,MAJ6B;QAKpCK,oBAAoB,EAAE;MALc,CAA3B,CAAX;MAOA,OAAO,MAAMH,EAAE,EAAf;IACD,CATD;;IAUA,KAAKI,MAAL,GAAc,MAAOC,OAAP,IAAmB;MAC/B,MAAML,EAAE,GAAG,yCAA2B;QACpCV,QADoC;QAEpCE,WAFoC;QAGpCS,UAAU,EAAE,QAHwB;QAIpCC,KAAK,EAAEJ;MAJ6B,CAA3B,CAAX;MAMA,OAAO,MAAME,EAAE,CAACK,OAAD,CAAf;IACD,CARD;EASD;;AAzCoE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
class EmailStatusTransaction extends _Base.default {
|
|
10
|
+
constructor(oktaAuth, options) {
|
|
11
|
+
super(oktaAuth, options);
|
|
12
|
+
const {
|
|
13
|
+
res
|
|
14
|
+
} = options; // assign required fields from res
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
id,
|
|
18
|
+
profile,
|
|
19
|
+
expiresAt,
|
|
20
|
+
status
|
|
21
|
+
} = res;
|
|
22
|
+
this.id = id;
|
|
23
|
+
this.expiresAt = expiresAt;
|
|
24
|
+
this.profile = profile;
|
|
25
|
+
this.status = status;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.default = EmailStatusTransaction;
|
|
31
|
+
module.exports = exports.default;
|
|
32
|
+
//# sourceMappingURL=EmailStatusTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailStatusTransaction.js","names":["EmailStatusTransaction","BaseTransaction","constructor","oktaAuth","options","res","id","profile","expiresAt","status"],"sources":["../../../../lib/myaccount/transactions/EmailStatusTransaction.ts"],"sourcesContent":["import { EmailProfile, Status } from '../types';\nimport BaseTransaction from './Base';\n\nexport default class EmailStatusTransaction extends BaseTransaction {\n id: string;\n expiresAt: string;\n profile: EmailProfile;\n status: Status;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n const { res } = options;\n // assign required fields from res\n const { id, profile, expiresAt, status } = res;\n this.id = id;\n this.expiresAt = expiresAt;\n this.profile = profile;\n this.status = status;\n }\n}\n"],"mappings":";;;;;;AACA;;AAEe,MAAMA,sBAAN,SAAqCC,aAArC,CAAqD;EAMlEC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,MAAM;MAAEC;IAAF,IAAUD,OAAhB,CAH6B,CAI7B;;IACA,MAAM;MAAEE,EAAF;MAAMC,OAAN;MAAeC,SAAf;MAA0BC;IAA1B,IAAqCJ,GAA3C;IACA,KAAKC,EAAL,GAAUA,EAAV;IACA,KAAKE,SAAL,GAAiBA,SAAjB;IACA,KAAKD,OAAL,GAAeA,OAAf;IACA,KAAKE,MAAL,GAAcA,MAAd;EACD;;AAhBiE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
var _request = require("../request");
|
|
10
|
+
|
|
11
|
+
class EmailTransaction extends _Base.default {
|
|
12
|
+
// eslint-disable-next-line no-use-before-define
|
|
13
|
+
constructor(oktaAuth, options) {
|
|
14
|
+
super(oktaAuth, options);
|
|
15
|
+
const {
|
|
16
|
+
accessToken,
|
|
17
|
+
res
|
|
18
|
+
} = options; // assign required fields from res
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
id,
|
|
22
|
+
profile,
|
|
23
|
+
roles,
|
|
24
|
+
status,
|
|
25
|
+
_links
|
|
26
|
+
} = res;
|
|
27
|
+
this.id = id;
|
|
28
|
+
this.profile = profile;
|
|
29
|
+
this.roles = roles;
|
|
30
|
+
this.status = status; // assign transformed fns to transaction
|
|
31
|
+
|
|
32
|
+
this.get = async () => {
|
|
33
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
34
|
+
oktaAuth,
|
|
35
|
+
accessToken,
|
|
36
|
+
methodName: 'get',
|
|
37
|
+
links: _links,
|
|
38
|
+
transactionClassName: 'EmailTransaction'
|
|
39
|
+
});
|
|
40
|
+
return await fn();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
this.delete = async () => {
|
|
44
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
45
|
+
oktaAuth,
|
|
46
|
+
accessToken,
|
|
47
|
+
methodName: 'delete',
|
|
48
|
+
links: _links
|
|
49
|
+
});
|
|
50
|
+
return await fn();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
this.challenge = async () => {
|
|
54
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
55
|
+
oktaAuth,
|
|
56
|
+
accessToken,
|
|
57
|
+
methodName: 'challenge',
|
|
58
|
+
links: _links,
|
|
59
|
+
transactionClassName: 'EmailChallengeTransaction'
|
|
60
|
+
});
|
|
61
|
+
return await fn();
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
if (_links.poll) {
|
|
65
|
+
this.poll = async () => {
|
|
66
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
67
|
+
oktaAuth,
|
|
68
|
+
accessToken,
|
|
69
|
+
methodName: 'poll',
|
|
70
|
+
links: _links,
|
|
71
|
+
transactionClassName: 'EmailStatusTransaction'
|
|
72
|
+
});
|
|
73
|
+
return await fn();
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (_links.verify) {
|
|
78
|
+
this.verify = async payload => {
|
|
79
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
80
|
+
oktaAuth,
|
|
81
|
+
accessToken,
|
|
82
|
+
methodName: 'verify',
|
|
83
|
+
links: _links
|
|
84
|
+
});
|
|
85
|
+
return await fn(payload);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
exports.default = EmailTransaction;
|
|
93
|
+
module.exports = exports.default;
|
|
94
|
+
//# sourceMappingURL=EmailTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailTransaction.js","names":["EmailTransaction","BaseTransaction","constructor","oktaAuth","options","accessToken","res","id","profile","roles","status","_links","get","fn","methodName","links","transactionClassName","delete","challenge","poll","verify","payload"],"sources":["../../../../lib/myaccount/transactions/EmailTransaction.ts"],"sourcesContent":["import { EmailChallengeTransaction, EmailStatusTransaction } from '.';\nimport { EmailProfile, EmailRole, Status, VerificationPayload } from '../types';\nimport BaseTransaction from './Base';\nimport { generateRequestFnFromLinks } from '../request';\n\nexport default class EmailTransaction extends BaseTransaction {\n id: string;\n profile: EmailProfile;\n roles: EmailRole[];\n status: Status;\n\n // eslint-disable-next-line no-use-before-define\n get: () => Promise<EmailTransaction>;\n delete: () => Promise<BaseTransaction>;\n challenge: () => Promise<EmailChallengeTransaction>;\n poll?: () => Promise<EmailStatusTransaction>;\n verify?: (payload: VerificationPayload) => Promise<BaseTransaction>;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n const { accessToken, res } = options;\n // assign required fields from res\n const { id, profile, roles, status, _links } = res;\n this.id = id;\n this.profile = profile;\n this.roles = roles;\n this.status = status;\n\n // assign transformed fns to transaction\n this.get = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'get', \n links: _links,\n transactionClassName: 'EmailTransaction'\n });\n return await fn() as EmailTransaction;\n };\n this.delete = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'delete', \n links: _links \n });\n return await fn() as BaseTransaction;\n };\n this.challenge = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'challenge', \n links: _links,\n transactionClassName: 'EmailChallengeTransaction'\n });\n return await fn() as EmailChallengeTransaction;\n };\n if (_links.poll) {\n this.poll = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'poll', \n links: _links,\n transactionClassName: 'EmailStatusTransaction'\n });\n return await fn() as EmailStatusTransaction;\n };\n }\n if (_links.verify) {\n this.verify = async (payload: VerificationPayload) => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'verify', \n links: _links,\n });\n return await fn(payload) as BaseTransaction;\n };\n }\n }\n}\n"],"mappings":";;;;;;AAEA;;AACA;;AAEe,MAAMA,gBAAN,SAA+BC,aAA/B,CAA+C;EAM5D;EAOAC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,MAAM;MAAEC,WAAF;MAAeC;IAAf,IAAuBF,OAA7B,CAH6B,CAI7B;;IACA,MAAM;MAAEG,EAAF;MAAMC,OAAN;MAAeC,KAAf;MAAsBC,MAAtB;MAA8BC;IAA9B,IAAyCL,GAA/C;IACA,KAAKC,EAAL,GAAUA,EAAV;IACA,KAAKC,OAAL,GAAeA,OAAf;IACA,KAAKC,KAAL,GAAaA,KAAb;IACA,KAAKC,MAAL,GAAcA,MAAd,CAT6B,CAW7B;;IACA,KAAKE,GAAL,GAAW,YAAY;MACrB,MAAMC,EAAE,GAAG,yCAA2B;QACpCV,QADoC;QAEpCE,WAFoC;QAGpCS,UAAU,EAAE,KAHwB;QAIpCC,KAAK,EAAEJ,MAJ6B;QAKpCK,oBAAoB,EAAE;MALc,CAA3B,CAAX;MAOA,OAAO,MAAMH,EAAE,EAAf;IACD,CATD;;IAUA,KAAKI,MAAL,GAAc,YAAY;MACxB,MAAMJ,EAAE,GAAG,yCAA2B;QACpCV,QADoC;QAEpCE,WAFoC;QAGpCS,UAAU,EAAE,QAHwB;QAIpCC,KAAK,EAAEJ;MAJ6B,CAA3B,CAAX;MAMA,OAAO,MAAME,EAAE,EAAf;IACD,CARD;;IASA,KAAKK,SAAL,GAAiB,YAAY;MAC3B,MAAML,EAAE,GAAG,yCAA2B;QACpCV,QADoC;QAEpCE,WAFoC;QAGpCS,UAAU,EAAE,WAHwB;QAIpCC,KAAK,EAAEJ,MAJ6B;QAKpCK,oBAAoB,EAAE;MALc,CAA3B,CAAX;MAOA,OAAO,MAAMH,EAAE,EAAf;IACD,CATD;;IAUA,IAAIF,MAAM,CAACQ,IAAX,EAAiB;MACf,KAAKA,IAAL,GAAY,YAAY;QACtB,MAAMN,EAAE,GAAG,yCAA2B;UACpCV,QADoC;UAEpCE,WAFoC;UAGpCS,UAAU,EAAE,MAHwB;UAIpCC,KAAK,EAAEJ,MAJ6B;UAKpCK,oBAAoB,EAAE;QALc,CAA3B,CAAX;QAOA,OAAO,MAAMH,EAAE,EAAf;MACD,CATD;IAUD;;IACD,IAAIF,MAAM,CAACS,MAAX,EAAmB;MACjB,KAAKA,MAAL,GAAc,MAAOC,OAAP,IAAwC;QACpD,MAAMR,EAAE,GAAG,yCAA2B;UACpCV,QADoC;UAEpCE,WAFoC;UAGpCS,UAAU,EAAE,QAHwB;UAIpCC,KAAK,EAAEJ;QAJ6B,CAA3B,CAAX;QAMA,OAAO,MAAME,EAAE,CAACQ,OAAD,CAAf;MACD,CARD;IASD;EACF;;AA7E2D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
var _request = require("../request");
|
|
10
|
+
|
|
11
|
+
class PhoneTransaction extends _Base.default {
|
|
12
|
+
// eslint-disable-next-line no-use-before-define
|
|
13
|
+
constructor(oktaAuth, options) {
|
|
14
|
+
super(oktaAuth, options);
|
|
15
|
+
const {
|
|
16
|
+
res,
|
|
17
|
+
accessToken
|
|
18
|
+
} = options; // assign required fields from res
|
|
19
|
+
|
|
20
|
+
const {
|
|
21
|
+
id,
|
|
22
|
+
profile,
|
|
23
|
+
status,
|
|
24
|
+
_links
|
|
25
|
+
} = res;
|
|
26
|
+
this.id = id;
|
|
27
|
+
this.profile = profile;
|
|
28
|
+
this.status = status; // assign transformed fns to transaction
|
|
29
|
+
|
|
30
|
+
this.get = async () => {
|
|
31
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
32
|
+
oktaAuth,
|
|
33
|
+
accessToken,
|
|
34
|
+
methodName: 'get',
|
|
35
|
+
links: _links,
|
|
36
|
+
transactionClassName: 'PhoneTransaction'
|
|
37
|
+
});
|
|
38
|
+
return await fn();
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
this.delete = async () => {
|
|
42
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
43
|
+
oktaAuth,
|
|
44
|
+
accessToken,
|
|
45
|
+
methodName: 'delete',
|
|
46
|
+
links: _links
|
|
47
|
+
});
|
|
48
|
+
return await fn();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
this.challenge = async payload => {
|
|
52
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
53
|
+
oktaAuth,
|
|
54
|
+
accessToken,
|
|
55
|
+
methodName: 'challenge',
|
|
56
|
+
links: _links
|
|
57
|
+
});
|
|
58
|
+
return await fn(payload);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
if (_links.verify) {
|
|
62
|
+
this.verify = async payload => {
|
|
63
|
+
const fn = (0, _request.generateRequestFnFromLinks)({
|
|
64
|
+
oktaAuth,
|
|
65
|
+
accessToken,
|
|
66
|
+
methodName: 'verify',
|
|
67
|
+
links: _links
|
|
68
|
+
});
|
|
69
|
+
return await fn(payload);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
exports.default = PhoneTransaction;
|
|
77
|
+
module.exports = exports.default;
|
|
78
|
+
//# sourceMappingURL=PhoneTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneTransaction.js","names":["PhoneTransaction","BaseTransaction","constructor","oktaAuth","options","res","accessToken","id","profile","status","_links","get","fn","methodName","links","transactionClassName","delete","challenge","payload","verify"],"sources":["../../../../lib/myaccount/transactions/PhoneTransaction.ts"],"sourcesContent":["import { ChallengePhonePayload, PhoneProfile, Status, VerificationPayload } from '../types';\nimport BaseTransaction from './Base';\nimport { generateRequestFnFromLinks } from '../request';\n\nexport default class PhoneTransaction extends BaseTransaction {\n id: string;\n profile: PhoneProfile;\n status: Status;\n\n // eslint-disable-next-line no-use-before-define\n get: () => Promise<PhoneTransaction>;\n delete: () => Promise<BaseTransaction>;\n challenge: (payload: ChallengePhonePayload) => Promise<BaseTransaction>;\n verify?: (payload: VerificationPayload) => Promise<BaseTransaction>;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n const { res, accessToken } = options;\n // assign required fields from res\n const { id, profile, status, _links } = res;\n this.id = id;\n this.profile = profile;\n this.status = status;\n\n // assign transformed fns to transaction\n this.get = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'get', \n links: _links,\n transactionClassName: 'PhoneTransaction'\n });\n return await fn() as PhoneTransaction;\n };\n this.delete = async () => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'delete', \n links: _links \n });\n return await fn() as BaseTransaction;\n };\n this.challenge = async (payload) => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'challenge', \n links: _links \n });\n return await fn(payload) as BaseTransaction;\n };\n if (_links.verify) {\n this.verify = async (payload) => {\n const fn = generateRequestFnFromLinks({ \n oktaAuth, \n accessToken, \n methodName: 'verify', \n links: _links \n });\n return await fn(payload) as BaseTransaction;\n } ;\n }\n }\n}\n"],"mappings":";;;;;;AACA;;AACA;;AAEe,MAAMA,gBAAN,SAA+BC,aAA/B,CAA+C;EAK5D;EAMAC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,MAAM;MAAEC,GAAF;MAAOC;IAAP,IAAuBF,OAA7B,CAH6B,CAI7B;;IACA,MAAM;MAAEG,EAAF;MAAMC,OAAN;MAAeC,MAAf;MAAuBC;IAAvB,IAAkCL,GAAxC;IACA,KAAKE,EAAL,GAAUA,EAAV;IACA,KAAKC,OAAL,GAAeA,OAAf;IACA,KAAKC,MAAL,GAAcA,MAAd,CAR6B,CAU7B;;IACA,KAAKE,GAAL,GAAW,YAAY;MACrB,MAAMC,EAAE,GAAG,yCAA2B;QACpCT,QADoC;QAEpCG,WAFoC;QAGpCO,UAAU,EAAE,KAHwB;QAIpCC,KAAK,EAAEJ,MAJ6B;QAKpCK,oBAAoB,EAAE;MALc,CAA3B,CAAX;MAOA,OAAO,MAAMH,EAAE,EAAf;IACD,CATD;;IAUA,KAAKI,MAAL,GAAc,YAAY;MACxB,MAAMJ,EAAE,GAAG,yCAA2B;QACpCT,QADoC;QAEpCG,WAFoC;QAGpCO,UAAU,EAAE,QAHwB;QAIpCC,KAAK,EAAEJ;MAJ6B,CAA3B,CAAX;MAMA,OAAO,MAAME,EAAE,EAAf;IACD,CARD;;IASA,KAAKK,SAAL,GAAiB,MAAOC,OAAP,IAAmB;MAClC,MAAMN,EAAE,GAAG,yCAA2B;QACpCT,QADoC;QAEpCG,WAFoC;QAGpCO,UAAU,EAAE,WAHwB;QAIpCC,KAAK,EAAEJ;MAJ6B,CAA3B,CAAX;MAMA,OAAO,MAAME,EAAE,CAACM,OAAD,CAAf;IACD,CARD;;IASA,IAAIR,MAAM,CAACS,MAAX,EAAmB;MACjB,KAAKA,MAAL,GAAc,MAAOD,OAAP,IAAmB;QAC/B,MAAMN,EAAE,GAAG,yCAA2B;UACpCT,QADoC;UAEpCG,WAFoC;UAGpCO,UAAU,EAAE,QAHwB;UAIpCC,KAAK,EAAEJ;QAJ6B,CAA3B,CAAX;QAMA,OAAO,MAAME,EAAE,CAACM,OAAD,CAAf;MACD,CARD;IASD;EACF;;AA7D2D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
class ProfileSchemaTransaction extends _Base.default {
|
|
10
|
+
constructor(oktaAuth, options) {
|
|
11
|
+
super(oktaAuth, options);
|
|
12
|
+
this.properties = options.res.properties;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.default = ProfileSchemaTransaction;
|
|
18
|
+
module.exports = exports.default;
|
|
19
|
+
//# sourceMappingURL=ProfileSchemaTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileSchemaTransaction.js","names":["ProfileSchemaTransaction","BaseTransaction","constructor","oktaAuth","options","properties","res"],"sources":["../../../../lib/myaccount/transactions/ProfileSchemaTransaction.ts"],"sourcesContent":["import BaseTransaction from './Base';\n\nexport default class ProfileSchemaTransaction extends BaseTransaction {\n properties: Record<string, object>;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n this.properties = options.res.properties;\n }\n}\n"],"mappings":";;;;;;AAAA;;AAEe,MAAMA,wBAAN,SAAuCC,aAAvC,CAAuD;EAGpEC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,KAAKC,UAAL,GAAkBD,OAAO,CAACE,GAAR,CAAYD,UAA9B;EACD;;AAPmE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
|
|
7
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
8
|
+
|
|
9
|
+
class ProfileTransaction extends _Base.default {
|
|
10
|
+
constructor(oktaAuth, options) {
|
|
11
|
+
super(oktaAuth, options);
|
|
12
|
+
const {
|
|
13
|
+
createdAt,
|
|
14
|
+
modifiedAt,
|
|
15
|
+
profile
|
|
16
|
+
} = options.res;
|
|
17
|
+
this.createdAt = createdAt;
|
|
18
|
+
this.modifiedAt = modifiedAt;
|
|
19
|
+
this.profile = profile;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.default = ProfileTransaction;
|
|
25
|
+
module.exports = exports.default;
|
|
26
|
+
//# sourceMappingURL=ProfileTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileTransaction.js","names":["ProfileTransaction","BaseTransaction","constructor","oktaAuth","options","createdAt","modifiedAt","profile","res"],"sources":["../../../../lib/myaccount/transactions/ProfileTransaction.ts"],"sourcesContent":["import BaseTransaction from './Base';\n\nexport default class ProfileTransaction extends BaseTransaction {\n createdAt: string;\n modifiedAt: string;\n profile: Record<string, string>;\n\n constructor(oktaAuth, options) {\n super(oktaAuth, options);\n\n const { createdAt, modifiedAt, profile } = options.res;\n this.createdAt = createdAt;\n this.modifiedAt = modifiedAt;\n this.profile = profile;\n }\n}\n"],"mappings":";;;;;;AAAA;;AAEe,MAAMA,kBAAN,SAAiCC,aAAjC,CAAiD;EAK9DC,WAAW,CAACC,QAAD,EAAWC,OAAX,EAAoB;IAC7B,MAAMD,QAAN,EAAgBC,OAAhB;IAEA,MAAM;MAAEC,SAAF;MAAaC,UAAb;MAAyBC;IAAzB,IAAqCH,OAAO,CAACI,GAAnD;IACA,KAAKH,SAAL,GAAiBA,SAAjB;IACA,KAAKC,UAAL,GAAkBA,UAAlB;IACA,KAAKC,OAAL,GAAeA,OAAf;EACD;;AAZ6D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "ProfileTransaction", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () {
|
|
8
|
+
return _ProfileTransaction.default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "ProfileSchemaTransaction", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return _ProfileSchemaTransaction.default;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "EmailTransaction", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _EmailTransaction.default;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "EmailStatusTransaction", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return _EmailStatusTransaction.default;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "EmailChallengeTransaction", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return _EmailChallengeTransaction.default;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "PhoneTransaction", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return _PhoneTransaction.default;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "BaseTransaction", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return _Base.default;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
var _ProfileTransaction = _interopRequireDefault(require("./ProfileTransaction"));
|
|
49
|
+
|
|
50
|
+
var _ProfileSchemaTransaction = _interopRequireDefault(require("./ProfileSchemaTransaction"));
|
|
51
|
+
|
|
52
|
+
var _EmailTransaction = _interopRequireDefault(require("./EmailTransaction"));
|
|
53
|
+
|
|
54
|
+
var _EmailStatusTransaction = _interopRequireDefault(require("./EmailStatusTransaction"));
|
|
55
|
+
|
|
56
|
+
var _EmailChallengeTransaction = _interopRequireDefault(require("./EmailChallengeTransaction"));
|
|
57
|
+
|
|
58
|
+
var _PhoneTransaction = _interopRequireDefault(require("./PhoneTransaction"));
|
|
59
|
+
|
|
60
|
+
var _Base = _interopRequireDefault(require("./Base"));
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/myaccount/transactions/index.ts"],"sourcesContent":["export { default as ProfileTransaction } from './ProfileTransaction';\nexport { default as ProfileSchemaTransaction } from './ProfileSchemaTransaction';\nexport { default as EmailTransaction } from './EmailTransaction';\nexport { default as EmailStatusTransaction } from './EmailStatusTransaction';\nexport { default as EmailChallengeTransaction } from './EmailChallengeTransaction';\nexport { default as PhoneTransaction } from './PhoneTransaction';\nexport { default as BaseTransaction } from './Base';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "EmailTransaction", {
|
|
4
|
+
enumerable: true,
|
|
5
|
+
get: function () {
|
|
6
|
+
return _transactions.EmailTransaction;
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(exports, "EmailStatusTransaction", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _transactions.EmailStatusTransaction;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "EmailChallengeTransaction", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _transactions.EmailChallengeTransaction;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "PhoneTransaction", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _transactions.PhoneTransaction;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "ProfileTransaction", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _transactions.ProfileTransaction;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "ProfileSchemaTransaction", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _transactions.ProfileSchemaTransaction;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "BaseTransaction", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return _transactions.BaseTransaction;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
exports.Status = exports.EmailRole = void 0;
|
|
46
|
+
|
|
47
|
+
var _transactions = require("./transactions");
|
|
48
|
+
|
|
49
|
+
let EmailRole;
|
|
50
|
+
exports.EmailRole = EmailRole;
|
|
51
|
+
|
|
52
|
+
(function (EmailRole) {
|
|
53
|
+
EmailRole["PRIMARY"] = "PRIMARY";
|
|
54
|
+
EmailRole["SECONDARY"] = "SECONDARY";
|
|
55
|
+
})(EmailRole || (exports.EmailRole = EmailRole = {}));
|
|
56
|
+
|
|
57
|
+
let Status;
|
|
58
|
+
exports.Status = Status;
|
|
59
|
+
|
|
60
|
+
(function (Status) {
|
|
61
|
+
Status["VERIFIED"] = "VERIFIED";
|
|
62
|
+
Status["UNVERIFIED"] = "UNVERIFIED";
|
|
63
|
+
})(Status || (exports.Status = Status = {}));
|
|
64
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":["EmailRole","Status"],"sources":["../../../lib/myaccount/types.ts"],"sourcesContent":["import { OktaAuthInterface } from '../types';\n\nexport { \n EmailTransaction, \n EmailStatusTransaction,\n EmailChallengeTransaction,\n PhoneTransaction,\n ProfileTransaction,\n ProfileSchemaTransaction,\n BaseTransaction\n} from './transactions';\n\nexport enum EmailRole {\n PRIMARY = 'PRIMARY',\n SECONDARY = 'SECONDARY'\n}\n\nexport enum Status {\n VERIFIED = 'VERIFIED',\n UNVERIFIED = 'UNVERIFIED'\n}\n\nexport type EmailProfile = {\n email: string;\n}\n\nexport type AddEmailPayload = {\n profile: {\n email: string;\n };\n sendEmail: boolean;\n role: EmailRole;\n}\n\nexport type PhoneProfile = {\n profile: {\n phoneNumber: string;\n };\n}\n\nexport type AddPhonePayload = {\n profile: {\n phoneNumber: string;\n };\n sendCode: boolean;\n method: string;\n};\n\nexport type ChallengePhonePayload = {\n method: string;\n}\n\nexport type VerificationPayload = {\n verificationCode: string;\n};\n\nexport type UpdateProfilePayload = {\n profile: {\n firstName?: string;\n lastName?: string;\n email?: string;\n login?: string;\n [property: string]: any;\n };\n};\n\nexport type MyAccountRequestOptions = {\n id?: string;\n emailId?: string;\n challengeId?: string;\n payload?: AddEmailPayload \n | AddPhonePayload \n | ChallengePhonePayload\n | VerificationPayload \n | UpdateProfilePayload;\n accessToken?: string;\n}\n\nexport type IAPIFunction<T> = (\n oktaAuth: OktaAuthInterface, \n options?: MyAccountRequestOptions\n) => Promise<T>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;IAUYA,S;;;WAAAA,S;EAAAA,S;EAAAA,S;GAAAA,S,yBAAAA,S;;IAKAC,M;;;WAAAA,M;EAAAA,M;EAAAA,M;GAAAA,M,sBAAAA,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"decodeToken.js","names":["decodeToken","token","jwt","split","decodedToken","header","JSON","parse","payload","signature","e","AuthSdkError"],"sources":["../../../lib/oidc/decodeToken.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 */\nimport { AuthSdkError } from '../errors';\nimport { JWTObject } from '../types';\nimport { base64UrlToString } from '../crypto';\n\nexport function decodeToken(token: string): JWTObject {\n var jwt = token.split('.');\n var decodedToken: JWTObject;\n\n try {\n decodedToken = {\n header: JSON.parse(base64UrlToString(jwt[0])),\n payload: JSON.parse(base64UrlToString(jwt[1])),\n signature: jwt[2]\n };\n } catch (e) {\n throw new AuthSdkError('Malformed token');\n }\n\n return decodedToken;\n}\n"],"mappings":";;;;AAYA;;AAEA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKO,SAASA,WAAT,CAAqBC,KAArB,EAA+C;EACpD,IAAIC,GAAG,GAAGD,KAAK,CAACE,KAAN,CAAY,GAAZ,CAAV;EACA,IAAIC,YAAJ;;EAEA,IAAI;IACFA,YAAY,GAAG;MACbC,MAAM,EAAEC,IAAI,CAACC,KAAL,CAAW,+BAAkBL,GAAG,CAAC,CAAD,CAArB,CAAX,CADK;MAEbM,OAAO,EAAEF,IAAI,CAACC,KAAL,CAAW,+BAAkBL,GAAG,CAAC,CAAD,CAArB,CAAX,CAFI;MAGbO,SAAS,EAAEP,GAAG,CAAC,CAAD;IAHD,CAAf;EAKD,CAND,CAME,OAAOQ,CAAP,EAAU;IACV,MAAM,IAAIC,oBAAJ,CAAiB,iBAAjB,CAAN;EACD;;EAED,OAAOP,YAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"authorize.js","names":["convertTokenParamsToOAuthParams","tokenParams","clientId","AuthSdkError","responseType","oauthParams","codeChallenge","codeChallengeMethod","display","idp","idpScope","loginHint","maxAge","nonce","prompt","redirectUri","responseMode","sessionToken","state","forEach","mayBeArray","Array","isArray","join","scopes","scope","buildAuthorizeParams","oauthQueryParams","extraParams"],"sources":["../../../../lib/oidc/endpoints/authorize.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { isString, removeNils, toQueryString } from '../../util';\nimport { AuthSdkError } from '../../errors';\nimport { OAuthParams, TokenParams } from '../../types';\n\nexport function convertTokenParamsToOAuthParams(tokenParams: TokenParams) {\n // Quick validation\n if (!tokenParams.clientId) {\n throw new AuthSdkError('A clientId must be specified in the OktaAuth constructor to get a token');\n }\n\n if (isString(tokenParams.responseType) && tokenParams.responseType.indexOf(' ') !== -1) {\n throw new AuthSdkError('Multiple OAuth responseTypes must be defined as an array');\n }\n\n // Convert our params to their actual OAuth equivalents\n var oauthParams: OAuthParams = {\n 'client_id': tokenParams.clientId,\n 'code_challenge': tokenParams.codeChallenge,\n 'code_challenge_method': tokenParams.codeChallengeMethod,\n 'display': tokenParams.display,\n 'idp': tokenParams.idp,\n 'idp_scope': tokenParams.idpScope,\n 'login_hint': tokenParams.loginHint,\n 'max_age': tokenParams.maxAge,\n 'nonce': tokenParams.nonce,\n 'prompt': tokenParams.prompt,\n 'redirect_uri': tokenParams.redirectUri,\n 'response_mode': tokenParams.responseMode,\n 'response_type': tokenParams.responseType,\n 'sessionToken': tokenParams.sessionToken,\n 'state': tokenParams.state,\n };\n oauthParams = removeNils(oauthParams) as OAuthParams;\n\n ['idp_scope', 'response_type'].forEach(function (mayBeArray) {\n if (Array.isArray(oauthParams[mayBeArray])) {\n oauthParams[mayBeArray] = oauthParams[mayBeArray].join(' ');\n }\n });\n\n if (tokenParams.responseType!.indexOf('id_token') !== -1 &&\n tokenParams.scopes!.indexOf('openid') === -1) {\n throw new AuthSdkError('openid scope must be specified in the scopes argument when requesting an id_token');\n } else {\n oauthParams.scope = tokenParams.scopes!.join(' ');\n }\n\n return oauthParams;\n}\n\nexport function buildAuthorizeParams(tokenParams: TokenParams) {\n var oauthQueryParams = convertTokenParamsToOAuthParams(tokenParams);\n return toQueryString({ \n ...oauthQueryParams, \n ...(tokenParams.extraParams && { ...tokenParams.extraParams })\n });\n}\n"],"mappings":";;;;;;;;;AAcA;;AACA;;AAfA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,SAASA,+BAAT,CAAyCC,WAAzC,EAAmE;EAAA;;EACxE;EACA,IAAI,CAACA,WAAW,CAACC,QAAjB,EAA2B;IACzB,MAAM,IAAIC,oBAAJ,CAAiB,yEAAjB,CAAN;EACD;;EAED,IAAI,oBAASF,WAAW,CAACG,YAArB,KAAsC,iCAAAH,WAAW,CAACG,YAAZ,iBAAiC,GAAjC,MAA0C,CAAC,CAArF,EAAwF;IACtF,MAAM,IAAID,oBAAJ,CAAiB,0DAAjB,CAAN;EACD,CARuE,CAUxE;;;EACA,IAAIE,WAAwB,GAAG;IAC7B,aAAaJ,WAAW,CAACC,QADI;IAE7B,kBAAkBD,WAAW,CAACK,aAFD;IAG7B,yBAAyBL,WAAW,CAACM,mBAHR;IAI7B,WAAWN,WAAW,CAACO,OAJM;IAK7B,OAAOP,WAAW,CAACQ,GALU;IAM7B,aAAaR,WAAW,CAACS,QANI;IAO7B,cAAcT,WAAW,CAACU,SAPG;IAQ7B,WAAWV,WAAW,CAACW,MARM;IAS7B,SAASX,WAAW,CAACY,KATQ;IAU7B,UAAUZ,WAAW,CAACa,MAVO;IAW7B,gBAAgBb,WAAW,CAACc,WAXC;IAY7B,iBAAiBd,WAAW,CAACe,YAZA;IAa7B,iBAAiBf,WAAW,CAACG,YAbA;IAc7B,gBAAgBH,WAAW,CAACgB,YAdC;IAe7B,SAAShB,WAAW,CAACiB;EAfQ,CAA/B;EAiBAb,WAAW,GAAG,sBAAWA,WAAX,CAAd;EAEA,CAAC,WAAD,EAAc,eAAd,EAA+Bc,OAA/B,CAAuC,UAAUC,UAAV,EAAsB;IAC3D,IAAIC,KAAK,CAACC,OAAN,CAAcjB,WAAW,CAACe,UAAD,CAAzB,CAAJ,EAA4C;MAC1Cf,WAAW,CAACe,UAAD,CAAX,GAA0Bf,WAAW,CAACe,UAAD,CAAX,CAAwBG,IAAxB,CAA6B,GAA7B,CAA1B;IACD;EACF,CAJD;;EAMA,IAAI,kCAAAtB,WAAW,CAACG,YAAZ,kBAAkC,UAAlC,MAAkD,CAAC,CAAnD,IACF,kCAAAH,WAAW,CAACuB,MAAZ,kBAA4B,QAA5B,MAA0C,CAAC,CAD7C,EACgD;IAC9C,MAAM,IAAIrB,oBAAJ,CAAiB,mFAAjB,CAAN;EACD,CAHD,MAGO;IACLE,WAAW,CAACoB,KAAZ,GAAoBxB,WAAW,CAACuB,MAAZ,CAAoBD,IAApB,CAAyB,GAAzB,CAApB;EACD;;EAED,OAAOlB,WAAP;AACD;;AAEM,SAASqB,oBAAT,CAA8BzB,WAA9B,EAAwD;EAC7D,IAAI0B,gBAAgB,GAAG3B,+BAA+B,CAACC,WAAD,CAAtD;EACA,OAAO,yBAAc,EACnB,GAAG0B,gBADgB;IAEnB,IAAI1B,WAAW,CAAC2B,WAAZ,IAA2B,EAAE,GAAG3B,WAAW,CAAC2B;IAAjB,CAA/B;EAFmB,CAAd,CAAP;AAID"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/oidc/endpoints/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\nexport * from './authorize';\nexport * from './token';\nexport * from './well-known';\n"],"mappings":";;;;AAaA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"token.js","names":["validateOptions","options","clientId","AuthSdkError","redirectUri","authorizationCode","interactionCode","codeVerifier","getPostData","sdk","params","code","clientSecret","postToTokenEndpoint","urls","data","headers","url","tokenUrl","method","args","postRefreshToken","refreshToken","client_id","grant_type","scope","scopes","join","refresh_token","name","value","encodeURIComponent"],"sources":["../../../../lib/oidc/endpoints/token.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { AuthSdkError } from '../../errors';\nimport { CustomUrls, OAuthParams, OAuthResponse, OktaAuthHttpInterface, RefreshToken, TokenParams } from '../../types';\nimport { removeNils, toQueryString } from '../../util';\nimport { httpRequest } from '../../http';\n\nfunction validateOptions(options: TokenParams) {\n // Quick validation\n if (!options.clientId) {\n throw new AuthSdkError('A clientId must be specified in the OktaAuth constructor to get a token');\n }\n\n if (!options.redirectUri) {\n throw new AuthSdkError('The redirectUri passed to /authorize must also be passed to /token');\n }\n\n if (!options.authorizationCode && !options.interactionCode) {\n throw new AuthSdkError('An authorization code (returned from /authorize) must be passed to /token');\n }\n\n if (!options.codeVerifier) {\n throw new AuthSdkError('The \"codeVerifier\" (generated and saved by your app) must be passed to /token');\n }\n}\n\nfunction getPostData(sdk, options: TokenParams): string {\n // Convert Token params to OAuth params, sent to the /token endpoint\n var params: OAuthParams = removeNils({\n 'client_id': options.clientId,\n 'redirect_uri': options.redirectUri,\n 'grant_type': options.interactionCode ? 'interaction_code' : 'authorization_code',\n 'code_verifier': options.codeVerifier\n });\n\n if (options.interactionCode) {\n params['interaction_code'] = options.interactionCode;\n } else if (options.authorizationCode) {\n params.code = options.authorizationCode;\n }\n\n const { clientSecret } = sdk.options;\n if (clientSecret) {\n params['client_secret'] = clientSecret;\n }\n\n // Encode as URL string\n return toQueryString(params).slice(1);\n}\n\n// exchange authorization code for an access token\nexport function postToTokenEndpoint(sdk, options: TokenParams, urls: CustomUrls): Promise<OAuthResponse> {\n validateOptions(options);\n var data = getPostData(sdk, options);\n\n const headers = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n };\n\n return httpRequest(sdk, {\n url: urls.tokenUrl,\n method: 'POST',\n args: data,\n headers\n });\n}\n\nexport function postRefreshToken(\n sdk: OktaAuthHttpInterface,\n options: TokenParams,\n refreshToken: RefreshToken\n): Promise<OAuthResponse> {\n return httpRequest(sdk, {\n url: refreshToken.tokenUrl,\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n\n args: Object.entries({\n client_id: options.clientId, // eslint-disable-line camelcase\n grant_type: 'refresh_token', // eslint-disable-line camelcase\n scope: refreshToken.scopes.join(' '),\n refresh_token: refreshToken.refreshToken, // eslint-disable-line camelcase\n }).map(function ([name, value]) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return name + '=' + encodeURIComponent(value!);\n }).join('&'),\n });\n}"],"mappings":";;;;;;;;;;;;;AAaA;;AAEA;;AACA;;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA,SAASA,eAAT,CAAyBC,OAAzB,EAA+C;EAC7C;EACA,IAAI,CAACA,OAAO,CAACC,QAAb,EAAuB;IACrB,MAAM,IAAIC,oBAAJ,CAAiB,yEAAjB,CAAN;EACD;;EAED,IAAI,CAACF,OAAO,CAACG,WAAb,EAA0B;IACxB,MAAM,IAAID,oBAAJ,CAAiB,oEAAjB,CAAN;EACD;;EAED,IAAI,CAACF,OAAO,CAACI,iBAAT,IAA8B,CAACJ,OAAO,CAACK,eAA3C,EAA4D;IAC1D,MAAM,IAAIH,oBAAJ,CAAiB,2EAAjB,CAAN;EACD;;EAED,IAAI,CAACF,OAAO,CAACM,YAAb,EAA2B;IACzB,MAAM,IAAIJ,oBAAJ,CAAiB,+EAAjB,CAAN;EACD;AACF;;AAED,SAASK,WAAT,CAAqBC,GAArB,EAA0BR,OAA1B,EAAwD;EAAA;;EACtD;EACA,IAAIS,MAAmB,GAAG,sBAAW;IACnC,aAAaT,OAAO,CAACC,QADc;IAEnC,gBAAgBD,OAAO,CAACG,WAFW;IAGnC,cAAcH,OAAO,CAACK,eAAR,GAA0B,kBAA1B,GAA+C,oBAH1B;IAInC,iBAAiBL,OAAO,CAACM;EAJU,CAAX,CAA1B;;EAOA,IAAIN,OAAO,CAACK,eAAZ,EAA6B;IAC3BI,MAAM,CAAC,kBAAD,CAAN,GAA6BT,OAAO,CAACK,eAArC;EACD,CAFD,MAEO,IAAIL,OAAO,CAACI,iBAAZ,EAA+B;IACpCK,MAAM,CAACC,IAAP,GAAcV,OAAO,CAACI,iBAAtB;EACD;;EAED,MAAM;IAAEO;EAAF,IAAmBH,GAAG,CAACR,OAA7B;;EACA,IAAIW,YAAJ,EAAkB;IAChBF,MAAM,CAAC,eAAD,CAAN,GAA0BE,YAA1B;EACD,CAlBqD,CAoBtD;;;EACA,OAAO,wDAAcF,MAAd,kBAA4B,CAA5B,CAAP;AACD,C,CAED;;;AACO,SAASG,mBAAT,CAA6BJ,GAA7B,EAAkCR,OAAlC,EAAwDa,IAAxD,EAAkG;EACvGd,eAAe,CAACC,OAAD,CAAf;EACA,IAAIc,IAAI,GAAGP,WAAW,CAACC,GAAD,EAAMR,OAAN,CAAtB;EAEA,MAAMe,OAAO,GAAG;IACd,gBAAgB;EADF,CAAhB;EAIA,OAAO,uBAAYP,GAAZ,EAAiB;IACtBQ,GAAG,EAAEH,IAAI,CAACI,QADY;IAEtBC,MAAM,EAAE,MAFc;IAGtBC,IAAI,EAAEL,IAHgB;IAItBC;EAJsB,CAAjB,CAAP;AAMD;;AAEM,SAASK,gBAAT,CACLZ,GADK,EAELR,OAFK,EAGLqB,YAHK,EAImB;EAAA;;EACxB,OAAO,uBAAYb,GAAZ,EAAiB;IACtBQ,GAAG,EAAEK,YAAY,CAACJ,QADI;IAEtBC,MAAM,EAAE,MAFc;IAGtBH,OAAO,EAAE;MACP,gBAAgB;IADT,CAHa;IAOtBI,IAAI,EAAE,oDAAe;MACnBG,SAAS,EAAEtB,OAAO,CAACC,QADA;MACU;MAC7BsB,UAAU,EAAE,eAFO;MAEU;MAC7BC,KAAK,EAAEH,YAAY,CAACI,MAAb,CAAoBC,IAApB,CAAyB,GAAzB,CAHY;MAInBC,aAAa,EAAEN,YAAY,CAACA,YAJT,CAIuB;;IAJvB,CAAf,mBAKC,UAAU,CAACO,IAAD,EAAOC,KAAP,CAAV,EAAyB;MAC9B;MACA,OAAOD,IAAI,GAAG,GAAP,GAAaE,kBAAkB,CAACD,KAAD,CAAtC;IACD,CARK,EAQHH,IARG,CAQE,GARF;EAPgB,CAAjB,CAAP;AAiBD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"well-known.js","names":["getWellKnown","sdk","issuer","authServerUri","options","cacheResponse","getKey","kid","httpCache","storageManager","getHttpCache","cookies","then","wellKnown","jwksUri","cacheContents","getStorage","cachedResponse","Date","now","expiresAt","cachedKey","response","clearStorage","res","key","AuthSdkError"],"sources":["../../../../lib/oidc/endpoints/well-known.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 */\nimport { get } from '../../http';\nimport { find } from '../../util';\nimport { OktaAuthOIDCInterface, WellKnownResponse } from '../../types';\nimport AuthSdkError from '../../errors/AuthSdkError';\n\nexport function getWellKnown(sdk: OktaAuthOIDCInterface, issuer?: string): Promise<WellKnownResponse> {\n var authServerUri = (issuer || sdk.options.issuer);\n return get(sdk, authServerUri + '/.well-known/openid-configuration', {\n cacheResponse: true\n });\n}\n\nexport function getKey(sdk: OktaAuthOIDCInterface, issuer: string, kid: string): Promise<string> {\n var httpCache = sdk.storageManager.getHttpCache(sdk.options.cookies);\n\n return getWellKnown(sdk, issuer)\n .then(function(wellKnown) {\n var jwksUri = wellKnown['jwks_uri'];\n\n // Check our kid against the cached version (if it exists and isn't expired)\n var cacheContents = httpCache.getStorage();\n var cachedResponse = cacheContents[jwksUri];\n if (cachedResponse && Date.now()/1000 < cachedResponse.expiresAt) {\n var cachedKey = find(cachedResponse.response.keys, {\n kid: kid\n });\n\n if (cachedKey) {\n return cachedKey;\n }\n }\n\n // Remove cache for the key\n httpCache.clearStorage(jwksUri);\n\n // Pull the latest keys if the key wasn't in the cache\n return get(sdk, jwksUri, {\n cacheResponse: true\n })\n .then(function(res) {\n var key = find(res.keys, {\n kid: kid\n });\n\n if (key) {\n return key;\n }\n\n throw new AuthSdkError('The key id, ' + kid + ', was not found in the server\\'s keys');\n });\n });\n}\n"],"mappings":";;;;;;;;;;;AAYA;;AACA;;AAEA;;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,SAASA,YAAT,CAAsBC,GAAtB,EAAkDC,MAAlD,EAA+F;EACpG,IAAIC,aAAa,GAAID,MAAM,IAAID,GAAG,CAACG,OAAJ,CAAYF,MAA3C;EACA,OAAO,eAAID,GAAJ,EAASE,aAAa,GAAG,mCAAzB,EAA8D;IACnEE,aAAa,EAAE;EADoD,CAA9D,CAAP;AAGD;;AAEM,SAASC,MAAT,CAAgBL,GAAhB,EAA4CC,MAA5C,EAA4DK,GAA5D,EAA0F;EAC/F,IAAIC,SAAS,GAAGP,GAAG,CAACQ,cAAJ,CAAmBC,YAAnB,CAAgCT,GAAG,CAACG,OAAJ,CAAYO,OAA5C,CAAhB;EAEA,OAAOX,YAAY,CAACC,GAAD,EAAMC,MAAN,CAAZ,CACNU,IADM,CACD,UAASC,SAAT,EAAoB;IACxB,IAAIC,OAAO,GAAGD,SAAS,CAAC,UAAD,CAAvB,CADwB,CAGxB;;IACA,IAAIE,aAAa,GAAGP,SAAS,CAACQ,UAAV,EAApB;IACA,IAAIC,cAAc,GAAGF,aAAa,CAACD,OAAD,CAAlC;;IACA,IAAIG,cAAc,IAAIC,IAAI,CAACC,GAAL,KAAW,IAAX,GAAkBF,cAAc,CAACG,SAAvD,EAAkE;MAChE,IAAIC,SAAS,GAAG,qDAAKJ,cAAc,CAACK,QAApB,GAAmC;QACjDf,GAAG,EAAEA;MAD4C,CAAnC,CAAhB;;MAIA,IAAIc,SAAJ,EAAe;QACb,OAAOA,SAAP;MACD;IACF,CAduB,CAgBxB;;;IACAb,SAAS,CAACe,YAAV,CAAuBT,OAAvB,EAjBwB,CAmBxB;;IACA,OAAO,eAAIb,GAAJ,EAASa,OAAT,EAAkB;MACvBT,aAAa,EAAE;IADQ,CAAlB,EAGNO,IAHM,CAGD,UAASY,GAAT,EAAc;MAClB,IAAIC,GAAG,GAAG,qDAAKD,GAAL,GAAe;QACvBjB,GAAG,EAAEA;MADkB,CAAf,CAAV;;MAIA,IAAIkB,GAAJ,EAAS;QACP,OAAOA,GAAP;MACD;;MAED,MAAM,IAAIC,qBAAJ,CAAiB,iBAAiBnB,GAAjB,GAAuB,uCAAxC,CAAN;IACD,CAbM,CAAP;EAcD,CAnCM,CAAP;AAoCD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"exchangeCodeForTokens.js","names":["exchangeCodeForTokens","sdk","tokenParams","urls","authorizationCode","interactionCode","codeVerifier","clientId","redirectUri","scopes","ignoreSignature","state","getTokenOptions","then","response","responseType","push","handleResponseOptions","code","finally","transactionManager","clear"],"sources":["../../../lib/oidc/exchangeCodeForTokens.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/* eslint-disable max-len */\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 { CustomUrls, OAuthResponse, OAuthResponseType, OktaAuthOIDCInterface, TokenParams, TokenResponse } from '../types';\nimport { getOAuthUrls, getDefaultTokenParams } from './util';\nimport { clone } from '../util';\nimport { postToTokenEndpoint } from './endpoints/token';\nimport { handleOAuthResponse } from './handleOAuthResponse';\n\n// codeVerifier is required. May pass either an authorizationCode or interactionCode\nexport function exchangeCodeForTokens(sdk: OktaAuthOIDCInterface, tokenParams: TokenParams, urls?: CustomUrls): Promise<TokenResponse> {\n urls = urls || getOAuthUrls(sdk, tokenParams);\n // build params using defaults + options\n tokenParams = Object.assign({}, getDefaultTokenParams(sdk), clone(tokenParams));\n\n const {\n authorizationCode,\n interactionCode,\n codeVerifier,\n clientId,\n redirectUri,\n scopes,\n ignoreSignature,\n state\n } = tokenParams;\n\n var getTokenOptions = {\n clientId,\n redirectUri,\n authorizationCode,\n interactionCode,\n codeVerifier,\n };\n\n return postToTokenEndpoint(sdk, getTokenOptions, urls)\n .then((response: OAuthResponse) => {\n\n // `handleOAuthResponse` hanadles responses from both `/authorize` and `/token` endpoints\n // Here we modify the response from `/token` so that it more closely matches a response from `/authorize`\n // `responseType` is used to validate that the expected tokens were returned\n const responseType: OAuthResponseType[] = ['token']; // an accessToken will always be returned\n if (scopes!.indexOf('openid') !== -1) {\n responseType.push('id_token'); // an idToken will be returned if \"openid\" is in the scopes\n }\n const handleResponseOptions: TokenParams = {\n clientId,\n redirectUri,\n scopes,\n responseType,\n ignoreSignature,\n };\n return handleOAuthResponse(sdk, handleResponseOptions, response, urls!)\n .then((response: TokenResponse) => {\n // For compatibility, \"code\" is returned in the TokenResponse. OKTA-326091\n response.code = authorizationCode;\n response.state = state!;\n return response;\n });\n })\n .finally(() => {\n sdk.transactionManager.clear();\n });\n}"],"mappings":";;;;;;;;;;AAeA;;AACA;;AACA;;AACA;;AAlBA;;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACO,SAASA,qBAAT,CAA+BC,GAA/B,EAA2DC,WAA3D,EAAqFC,IAArF,EAAgI;EACrIA,IAAI,GAAGA,IAAI,IAAI,wBAAaF,GAAb,EAAkBC,WAAlB,CAAf,CADqI,CAErI;;EACAA,WAAW,GAAG,qBAAc,EAAd,EAAkB,iCAAsBD,GAAtB,CAAlB,EAA8C,kBAAMC,WAAN,CAA9C,CAAd;EAEA,MAAM;IACJE,iBADI;IAEJC,eAFI;IAGJC,YAHI;IAIJC,QAJI;IAKJC,WALI;IAMJC,MANI;IAOJC,eAPI;IAQJC;EARI,IASFT,WATJ;EAWA,IAAIU,eAAe,GAAG;IACpBL,QADoB;IAEpBC,WAFoB;IAGpBJ,iBAHoB;IAIpBC,eAJoB;IAKpBC;EALoB,CAAtB;EAQA,OAAO,gCAAoBL,GAApB,EAAyBW,eAAzB,EAA0CT,IAA1C,EACJU,IADI,CACEC,QAAD,IAA6B;IAAA;;IAEjC;IACA;IACA;IACA,MAAMC,YAAiC,GAAG,CAAC,OAAD,CAA1C,CALiC,CAKoB;;IACrD,IAAI,iCAAAN,MAAM,MAAN,WAAgB,QAAhB,MAA8B,CAAC,CAAnC,EAAsC;MACpCM,YAAY,CAACC,IAAb,CAAkB,UAAlB,EADoC,CACL;IAChC;;IACD,MAAMC,qBAAkC,GAAG;MACzCV,QADyC;MAEzCC,WAFyC;MAGzCC,MAHyC;MAIzCM,YAJyC;MAKzCL;IALyC,CAA3C;IAOA,OAAO,8CAAoBT,GAApB,EAAyBgB,qBAAzB,EAAgDH,QAAhD,EAA0DX,IAA1D,EACJU,IADI,CACEC,QAAD,IAA6B;MACjC;MACAA,QAAQ,CAACI,IAAT,GAAgBd,iBAAhB;MACAU,QAAQ,CAACH,KAAT,GAAiBA,KAAjB;MACA,OAAOG,QAAP;IACD,CANI,CAAP;EAOD,CAxBI,EAyBJK,OAzBI,CAyBI,MAAM;IACblB,GAAG,CAACmB,kBAAJ,CAAuBC,KAAvB;EACD,CA3BI,CAAP;AA4BD"}
|