@okta/okta-auth-js 5.10.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/README.md +10 -6
- package/cjs/AuthStateManager.js +11 -3
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +139 -95
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js +11 -2
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/SavedObject.js +4 -2
- package/cjs/SavedObject.js.map +1 -1
- package/cjs/StorageManager.js +16 -9
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +38 -22
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +26 -7
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +25 -14
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +12 -4
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js +7 -19
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/clock.js +5 -1
- package/cjs/clock.js.map +1 -1
- package/cjs/crypto/base64.js +18 -0
- package/cjs/crypto/base64.js.map +1 -1
- package/cjs/crypto/index.js +6 -4
- package/cjs/crypto/index.js.map +1 -1
- package/cjs/crypto/oidcHash.js +5 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/crypto/webauthn.js +101 -0
- package/cjs/crypto/webauthn.js.map +1 -0
- package/cjs/crypto/webcrypto.js +3 -1
- package/cjs/crypto/webcrypto.js.map +1 -1
- package/cjs/errors/AuthApiError.js +1 -1
- package/cjs/errors/AuthPollStopError.js +1 -1
- package/cjs/errors/AuthSdkError.js +1 -1
- package/cjs/errors/CustomError.js +5 -1
- package/cjs/errors/CustomError.js.map +1 -1
- package/cjs/errors/OAuthError.js +1 -1
- package/cjs/errors/index.js +1 -1
- package/cjs/features.js +9 -3
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +19 -6
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/headers.js.map +1 -1
- package/cjs/http/index.js +4 -2
- package/cjs/http/index.js.map +1 -1
- package/cjs/http/request.js +11 -5
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js +8 -5
- 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/SecurityQuestionEnrollment.js +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +2 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js +2 -2
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnEnrollment.js +46 -0
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -0
- package/cjs/idx/authenticator/WebauthnVerification.js +55 -0
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -0
- package/cjs/idx/authenticator/getAuthenticator.js +17 -6
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -1
- package/cjs/idx/authenticator/index.js +34 -6
- package/cjs/idx/authenticator/index.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/emailVerify.js +73 -0
- package/cjs/idx/emailVerify.js.map +1 -0
- package/cjs/idx/flow/AccountUnlockFlow.js +30 -0
- package/cjs/idx/flow/AccountUnlockFlow.js.map +1 -0
- package/cjs/idx/flow/AuthenticationFlow.js +2 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js +24 -4
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js +4 -1
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js +2 -0
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js +20 -5
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +6 -1
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/headers.js +21 -5
- package/cjs/idx/headers.js.map +1 -1
- package/cjs/idx/idx-js/client.js +91 -0
- package/cjs/idx/idx-js/client.js.map +1 -0
- package/cjs/idx/idx-js/index.js +162 -0
- package/cjs/idx/idx-js/index.js.map +1 -0
- package/cjs/idx/idx-js/interact.js +83 -0
- package/cjs/idx/idx-js/interact.js.map +1 -0
- package/cjs/idx/idx-js/introspect.js +58 -0
- package/cjs/idx/idx-js/introspect.js.map +1 -0
- package/cjs/idx/idx-js/parsers.js +41 -0
- package/cjs/idx/idx-js/parsers.js.map +1 -0
- package/cjs/idx/idx-js/util.js +34 -0
- package/cjs/idx/idx-js/util.js.map +1 -0
- package/cjs/idx/idx-js/v1/actionParser.js +90 -0
- package/cjs/idx/idx-js/v1/actionParser.js.map +1 -0
- package/cjs/idx/idx-js/v1/generateIdxAction.js +117 -0
- package/cjs/idx/idx-js/v1/generateIdxAction.js.map +1 -0
- package/cjs/idx/idx-js/v1/idxResponseParser.js +137 -0
- package/cjs/idx/idx-js/v1/idxResponseParser.js.map +1 -0
- package/cjs/idx/idx-js/v1/makeIdxState.js +64 -0
- package/cjs/idx/idx-js/v1/makeIdxState.js.map +1 -0
- package/cjs/idx/idx-js/v1/parsers.js +24 -0
- package/cjs/idx/idx-js/v1/parsers.js.map +1 -0
- package/cjs/idx/idx-js/v1/remediationParser.js +32 -0
- package/cjs/idx/idx-js/v1/remediationParser.js.map +1 -0
- package/cjs/idx/index.js +121 -109
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +53 -36
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +17 -19
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/poll.js +13 -3
- package/cjs/idx/poll.js.map +1 -1
- package/cjs/idx/proceed.js +4 -7
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +11 -16
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +74 -27
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +12 -4
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +13 -7
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +31 -13
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +67 -31
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +46 -30
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +16 -4
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengeAuthenticator.js +2 -2
- package/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js +2 -2
- package/cjs/idx/remediators/EnrollAuthenticator.js +2 -2
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +18 -9
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollProfile.js +24 -9
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +96 -0
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/cjs/idx/remediators/Identify.js +5 -3
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +6 -3
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/RedirectIdp.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js +2 -2
- package/cjs/idx/remediators/ResetAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +7 -5
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js +2 -2
- package/cjs/idx/remediators/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +72 -0
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -0
- package/cjs/idx/remediators/SelectEnrollProfile.js +2 -2
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +86 -0
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/cjs/idx/remediators/Skip.js +5 -3
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +57 -16
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +18 -3
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +139 -49
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +4 -2
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +82 -69
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +59 -7
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/unlockAccount.js +48 -0
- package/cjs/idx/unlockAccount.js.map +1 -0
- package/cjs/index.js +33 -13
- package/cjs/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +10 -2
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/index.js +5 -3
- package/cjs/oidc/endpoints/index.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +16 -3
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/endpoints/well-known.js +7 -3
- package/cjs/oidc/endpoints/well-known.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +12 -4
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js +12 -6
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getUserInfo.js +7 -3
- package/cjs/oidc/getUserInfo.js.map +1 -1
- package/cjs/oidc/getWithPopup.js +8 -2
- package/cjs/oidc/getWithPopup.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +15 -38
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/getWithoutPrompt.js +8 -2
- package/cjs/oidc/getWithoutPrompt.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +87 -87
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/index.js +4 -2
- package/cjs/oidc/index.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js +9 -3
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +6 -2
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/renewTokensWithRefresh.js +5 -1
- package/cjs/oidc/renewTokensWithRefresh.js.map +1 -1
- package/cjs/oidc/revokeToken.js +34 -31
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/util/browser.js +5 -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 +27 -11
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +10 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js +4 -2
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js +36 -0
- package/cjs/oidc/util/oauthMeta.js.map +1 -0
- package/cjs/oidc/util/pkce.js +11 -3
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +62 -39
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js +3 -1
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/verifyToken.js +13 -4
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options.js +12 -6
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/TokenService.js +3 -0
- package/cjs/services/TokenService.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +18 -9
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js +0 -17
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js +11 -6
- package/cjs/tx/api.js.map +1 -1
- package/cjs/tx/index.js +7 -5
- package/cjs/tx/index.js.map +1 -1
- package/cjs/tx/poll.js +6 -4
- package/cjs/tx/poll.js.map +1 -1
- package/cjs/tx/util.js +5 -1
- package/cjs/tx/util.js.map +1 -1
- package/cjs/types/Transaction.js +10 -2
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/types/index.js +16 -14
- package/cjs/types/index.js.map +1 -1
- package/cjs/util/index.js +7 -18
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/misc.js +5 -1
- package/cjs/util/misc.js.map +1 -1
- package/cjs/util/object.js +16 -6
- package/cjs/util/object.js.map +1 -1
- package/cjs/util/sharedStorage.js +5 -1
- package/cjs/util/sharedStorage.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.LICENSE.txt +0 -12
- 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.LICENSE.txt +0 -12
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +2758 -957
- package/esm/index.js.map +1 -1
- package/lib/AuthStateManager.d.ts +1 -2
- package/lib/OktaAuth.d.ts +10 -13
- package/lib/StorageManager.d.ts +2 -2
- package/lib/TokenManager.d.ts +4 -4
- package/lib/TransactionManager.d.ts +4 -3
- package/lib/browser/fingerprint.d.ts +2 -3
- package/lib/builderUtil.d.ts +1 -2
- package/lib/crypto/base64.d.ts +2 -0
- package/lib/crypto/browser.d.ts +1 -1
- package/lib/crypto/webauthn.d.ts +25 -0
- package/lib/features.d.ts +1 -1
- package/lib/http/headers.d.ts +2 -2
- package/lib/http/request.d.ts +4 -4
- package/lib/idx/authenticate.d.ts +2 -2
- package/lib/idx/authenticator/Authenticator.d.ts +4 -5
- package/lib/idx/authenticator/OktaPassword.d.ts +7 -9
- package/lib/idx/authenticator/SecurityQuestionEnrollment.d.ts +9 -8
- package/lib/idx/authenticator/SecurityQuestionVerification.d.ts +7 -7
- package/lib/idx/authenticator/VerificationCodeAuthenticator.d.ts +6 -2
- package/lib/idx/authenticator/WebauthnEnrollment.d.ts +16 -0
- package/lib/idx/authenticator/WebauthnVerification.d.ts +17 -0
- package/lib/idx/authenticator/getAuthenticator.d.ts +1 -1
- package/lib/idx/authenticator/index.d.ts +9 -0
- package/lib/idx/cancel.d.ts +2 -2
- package/lib/idx/emailVerify.d.ts +26 -0
- package/lib/{util/emailVerify.d.ts → idx/flow/AccountUnlockFlow.d.ts} +2 -6
- package/lib/idx/flow/FlowSpecification.d.ts +3 -2
- package/lib/idx/flow/index.d.ts +1 -0
- package/lib/idx/headers.d.ts +3 -2
- package/lib/idx/idx-js/client.d.ts +36 -0
- package/lib/idx/idx-js/index.d.ts +51 -0
- package/lib/idx/idx-js/interact.d.ts +25 -0
- package/lib/idx/idx-js/introspect.d.ts +20 -0
- package/lib/idx/idx-js/parsers.d.ts +15 -0
- package/lib/idx/idx-js/util.d.ts +12 -0
- package/lib/idx/idx-js/v1/actionParser.d.ts +16 -0
- package/lib/idx/idx-js/v1/generateIdxAction.d.ts +13 -0
- package/lib/idx/idx-js/v1/idxResponseParser.d.ts +20 -0
- package/lib/idx/idx-js/v1/makeIdxState.d.ts +13 -0
- package/lib/idx/idx-js/v1/parsers.d.ts +16 -0
- package/lib/idx/idx-js/v1/remediationParser.d.ts +12 -0
- package/lib/idx/index.d.ts +12 -10
- package/lib/idx/interact.d.ts +7 -13
- package/lib/idx/introspect.d.ts +4 -3
- package/lib/idx/poll.d.ts +2 -2
- package/lib/idx/proceed.d.ts +8 -5
- package/lib/idx/recoverPassword.d.ts +2 -2
- package/lib/idx/register.d.ts +2 -2
- package/lib/idx/remediate.d.ts +10 -4
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +3 -3
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +3 -3
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +8 -7
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +10 -7
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +8 -12
- package/lib/idx/remediators/EnrollPoll.d.ts +1 -1
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -1
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +54 -0
- package/lib/idx/remediators/Identify.d.ts +2 -2
- package/lib/idx/remediators/ReEnrollAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/RedirectIdp.d.ts +3 -3
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +38 -0
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +40 -0
- package/lib/idx/remediators/index.d.ts +3 -0
- package/lib/idx/remediators/util.d.ts +2 -2
- package/lib/idx/run.d.ts +5 -3
- package/lib/idx/startTransaction.d.ts +3 -2
- package/lib/idx/transactionMeta.d.ts +10 -31
- package/lib/idx/types/FlowIdentifier.d.ts +1 -1
- package/lib/idx/types/idx-js.d.ts +44 -1
- package/lib/idx/types/index.d.ts +36 -9
- package/lib/idx/unlockAccount.d.ts +15 -0
- package/lib/index.d.ts +1 -0
- package/lib/oidc/endpoints/well-known.d.ts +3 -3
- package/lib/oidc/exchangeCodeForTokens.d.ts +14 -2
- package/lib/oidc/getToken.d.ts +2 -2
- package/lib/oidc/getWithPopup.d.ts +2 -2
- package/lib/oidc/getWithRedirect.d.ts +2 -2
- package/lib/oidc/getWithoutPrompt.d.ts +2 -2
- package/lib/oidc/handleOAuthResponse.d.ts +2 -2
- package/lib/oidc/parseFromUrl.d.ts +1 -1
- package/lib/oidc/renewToken.d.ts +2 -2
- package/lib/oidc/renewTokens.d.ts +1 -1
- package/lib/oidc/renewTokensWithRefresh.d.ts +2 -2
- package/lib/oidc/revokeToken.d.ts +2 -2
- package/lib/oidc/util/browser.d.ts +3 -3
- package/lib/oidc/util/defaultTokenParams.d.ts +2 -2
- package/lib/oidc/util/errors.d.ts +2 -2
- package/lib/oidc/util/index.d.ts +1 -0
- package/lib/oidc/util/loginRedirect.d.ts +4 -4
- package/lib/oidc/util/oauth.d.ts +4 -11
- package/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/lib/oidc/util/prepareTokenParams.d.ts +5 -2
- package/lib/oidc/util/validateClaims.d.ts +2 -2
- package/lib/oidc/verifyToken.d.ts +2 -2
- package/lib/server/serverStorage.d.ts +1 -1
- package/lib/services/TokenService.d.ts +2 -2
- package/lib/tx/AuthTransaction.d.ts +2 -2
- package/lib/tx/TransactionState.d.ts +11 -1
- package/lib/tx/api.d.ts +6 -6
- package/lib/types/OktaAuthOptions.d.ts +6 -8
- package/lib/types/Storage.d.ts +3 -3
- package/lib/types/Transaction.d.ts +10 -7
- package/lib/types/UserClaims.d.ts +3 -3
- package/lib/types/api.d.ts +44 -20
- package/lib/types/index.d.ts +0 -1
- package/lib/util/console.d.ts +1 -1
- package/lib/util/index.d.ts +0 -1
- package/lib/util/sharedStorage.d.ts +1 -1
- package/lib/util/types.d.ts +1 -1
- package/lib/util/url.d.ts +2 -2
- package/package.json +10 -7
- package/polyfill/index.js +1 -0
- package/cjs/util/emailVerify.js +0 -28
- package/cjs/util/emailVerify.js.map +0 -1
package/lib/idx/run.d.ts
CHANGED
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
import { RemediateOptions } from './remediate';
|
|
12
13
|
import { RemediationFlow } from './flow';
|
|
13
|
-
import {
|
|
14
|
+
import { OktaAuthInterface, IdxTransaction, FlowIdentifier } from '../types';
|
|
14
15
|
import { ProceedOptions } from './proceed';
|
|
15
|
-
export declare type RunOptions = ProceedOptions & {
|
|
16
|
+
export declare type RunOptions = ProceedOptions & RemediateOptions & {
|
|
16
17
|
flow?: FlowIdentifier;
|
|
17
18
|
remediators?: RemediationFlow;
|
|
18
19
|
actions?: string[];
|
|
20
|
+
withCredentials?: boolean;
|
|
19
21
|
};
|
|
20
|
-
export declare function run(authClient:
|
|
22
|
+
export declare function run(authClient: OktaAuthInterface, options?: RunOptions): Promise<IdxTransaction>;
|
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
|
|
12
|
+
import { RunOptions } from './run';
|
|
13
|
+
import { OktaAuthInterface, IdxTransaction } from '../types';
|
|
14
|
+
export declare function startTransaction(authClient: OktaAuthInterface, options?: RunOptions): Promise<IdxTransaction>;
|
|
@@ -9,34 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
export declare function createTransactionMeta(authClient:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
state: string;
|
|
23
|
-
nonce: string;
|
|
24
|
-
urls: {
|
|
25
|
-
issuer: any;
|
|
26
|
-
authorizeUrl: any;
|
|
27
|
-
userinfoUrl: any;
|
|
28
|
-
tokenUrl: any;
|
|
29
|
-
revokeUrl: any;
|
|
30
|
-
logoutUrl: any;
|
|
31
|
-
};
|
|
32
|
-
ignoreSignature: boolean;
|
|
33
|
-
codeVerifier: string;
|
|
34
|
-
codeChallengeMethod: string;
|
|
35
|
-
codeChallenge: string;
|
|
36
|
-
}>;
|
|
37
|
-
export declare function transactionMetaExist(authClient: OktaAuth, options?: TransactionMetaOptions): boolean;
|
|
38
|
-
export declare function getSavedTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): IdxTransactionMeta;
|
|
39
|
-
export declare function getTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
40
|
-
export declare function saveTransactionMeta(authClient: OktaAuth, meta: any): void;
|
|
41
|
-
export declare function clearTransactionMeta(authClient: OktaAuth): void;
|
|
42
|
-
export declare function isTransactionMetaValid(authClient: OktaAuth, meta: any): boolean;
|
|
12
|
+
import { OktaAuthInterface, IdxTransactionMeta, TransactionMetaOptions } from '../types';
|
|
13
|
+
export declare function createTransactionMeta(authClient: OktaAuthInterface, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
14
|
+
export declare function hasSavedInteractionHandle(authClient: OktaAuthInterface, options?: TransactionMetaOptions): boolean;
|
|
15
|
+
export declare function getSavedTransactionMeta(authClient: OktaAuthInterface, options?: TransactionMetaOptions): IdxTransactionMeta | undefined;
|
|
16
|
+
export declare function getTransactionMeta(authClient: OktaAuthInterface, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
17
|
+
export declare function saveTransactionMeta(authClient: OktaAuthInterface, meta: any): void;
|
|
18
|
+
export declare function clearTransactionMeta(authClient: OktaAuthInterface): void;
|
|
19
|
+
export declare function isTransactionMetaValid(meta: any, options?: TransactionMetaOptions): boolean;
|
|
20
|
+
export declare function isTransactionMetaValidForFlow(meta: any, flow: any): boolean;
|
|
21
|
+
export declare function isTransactionMetaValidForOptions(meta: any, options: any, keys: any): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type FlowIdentifier = 'default' | 'proceed' | 'authenticate' | 'login' | 'signin' | 'register' | 'signup' | 'enrollProfile' | 'recoverPassword' | 'resetPassword';
|
|
1
|
+
export declare type FlowIdentifier = 'default' | 'proceed' | 'authenticate' | 'login' | 'signin' | 'register' | 'signup' | 'enrollProfile' | 'recoverPassword' | 'resetPassword' | 'unlockAccount';
|
|
@@ -9,6 +9,39 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
+
export interface ChallengeData {
|
|
13
|
+
challenge: string;
|
|
14
|
+
userVerification: string;
|
|
15
|
+
extensions?: {
|
|
16
|
+
appid: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface ActivationData {
|
|
20
|
+
challenge: string;
|
|
21
|
+
rp: {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
user: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
pubKeyCredParams: {
|
|
30
|
+
type: string;
|
|
31
|
+
alg: number;
|
|
32
|
+
}[];
|
|
33
|
+
attestation?: string;
|
|
34
|
+
authenticatorSelection?: {
|
|
35
|
+
userVerification?: string;
|
|
36
|
+
authenticatorAttachment?: string;
|
|
37
|
+
requireResidentKey?: boolean;
|
|
38
|
+
residentKey?: string;
|
|
39
|
+
};
|
|
40
|
+
excludeCredentials?: {
|
|
41
|
+
id: string;
|
|
42
|
+
type: string;
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
12
45
|
export interface IdxAuthenticatorMethod {
|
|
13
46
|
type: string;
|
|
14
47
|
}
|
|
@@ -38,7 +71,11 @@ export interface IdxAuthenticator {
|
|
|
38
71
|
question: string;
|
|
39
72
|
}[];
|
|
40
73
|
questionKeys?: string[];
|
|
74
|
+
selectedChannel?: string;
|
|
75
|
+
activationData?: ActivationData;
|
|
76
|
+
challengeData?: ChallengeData;
|
|
41
77
|
};
|
|
78
|
+
credentialId?: string;
|
|
42
79
|
}
|
|
43
80
|
export interface IdxForm {
|
|
44
81
|
value: IdxRemediationValue[];
|
|
@@ -54,6 +91,9 @@ export interface IdpConfig {
|
|
|
54
91
|
id: string;
|
|
55
92
|
name: string;
|
|
56
93
|
}
|
|
94
|
+
export interface IdxRemediationValueForm {
|
|
95
|
+
form: IdxForm;
|
|
96
|
+
}
|
|
57
97
|
export interface IdxRemediationValue {
|
|
58
98
|
name: string;
|
|
59
99
|
type?: string;
|
|
@@ -61,7 +101,7 @@ export interface IdxRemediationValue {
|
|
|
61
101
|
secret?: boolean;
|
|
62
102
|
visible?: boolean;
|
|
63
103
|
mutable?: boolean;
|
|
64
|
-
value?: string;
|
|
104
|
+
value?: string | IdxRemediationValueForm;
|
|
65
105
|
label?: string;
|
|
66
106
|
form?: IdxForm;
|
|
67
107
|
options?: IdxOption[];
|
|
@@ -113,6 +153,9 @@ export interface IdxContext {
|
|
|
113
153
|
type: string;
|
|
114
154
|
value: Record<string, unknown>;
|
|
115
155
|
};
|
|
156
|
+
messages?: IdxMessages;
|
|
157
|
+
success?: IdxRemediation;
|
|
158
|
+
failure?: IdxRemediation;
|
|
116
159
|
}
|
|
117
160
|
export interface IdxMessage {
|
|
118
161
|
message: string;
|
package/lib/idx/types/index.d.ts
CHANGED
|
@@ -12,16 +12,21 @@
|
|
|
12
12
|
import { InteractOptions } from '../interact';
|
|
13
13
|
import { IntrospectOptions } from '../introspect';
|
|
14
14
|
import { APIError, Tokens } from '../../types';
|
|
15
|
-
import {
|
|
16
|
-
import { IdxAuthenticator, IdxMessage, IdxOption, IdxResponse } from './idx-js';
|
|
15
|
+
import { PKCETransactionMeta } from '../../types/Transaction';
|
|
16
|
+
import { IdxActions, IdxAuthenticator, IdxContext, IdxForm, IdxMessage, IdxOption, IdxRemediation, IdxResponse, RawIdxResponse } from './idx-js';
|
|
17
17
|
import { FlowIdentifier } from './FlowIdentifier';
|
|
18
|
-
export { IdxMessage } from './idx-js';
|
|
18
|
+
export { IdxMessage, ChallengeData, ActivationData } from './idx-js';
|
|
19
19
|
export { AuthenticationOptions } from '../authenticate';
|
|
20
20
|
export { RegistrationOptions } from '../register';
|
|
21
21
|
export { PasswordRecoveryOptions } from '../recoverPassword';
|
|
22
|
+
export { AccountUnlockOptions } from '../unlockAccount';
|
|
22
23
|
export { ProceedOptions } from '../proceed';
|
|
23
24
|
export { CancelOptions } from '../cancel';
|
|
24
25
|
export { FlowIdentifier };
|
|
26
|
+
export { IdxAuthenticator };
|
|
27
|
+
export { EmailVerifyCallbackResponse } from '../emailVerify';
|
|
28
|
+
export { WebauthnEnrollValues } from '../authenticator/WebauthnEnrollment';
|
|
29
|
+
export { WebauthnVerificationValues } from '../authenticator/WebauthnVerification';
|
|
25
30
|
export declare enum IdxStatus {
|
|
26
31
|
SUCCESS = "SUCCESS",
|
|
27
32
|
PENDING = "PENDING",
|
|
@@ -35,13 +40,18 @@ export declare enum AuthenticatorKey {
|
|
|
35
40
|
PHONE_NUMBER = "phone_number",
|
|
36
41
|
GOOGLE_AUTHENTICATOR = "google_otp",
|
|
37
42
|
SECURITY_QUESTION = "security_question",
|
|
38
|
-
OKTA_VERIFY = "okta_verify"
|
|
43
|
+
OKTA_VERIFY = "okta_verify",
|
|
44
|
+
WEBAUTHN = "webauthn"
|
|
39
45
|
}
|
|
40
46
|
export declare type Input = {
|
|
41
47
|
name: string;
|
|
42
48
|
type?: string;
|
|
43
49
|
label?: string;
|
|
44
|
-
value?: string
|
|
50
|
+
value?: string | {
|
|
51
|
+
form: IdxForm;
|
|
52
|
+
};
|
|
53
|
+
minLength?: number;
|
|
54
|
+
maxLength?: number;
|
|
45
55
|
secret?: boolean;
|
|
46
56
|
required?: boolean;
|
|
47
57
|
};
|
|
@@ -53,11 +63,21 @@ export declare type NextStep = {
|
|
|
53
63
|
inputs?: Input[];
|
|
54
64
|
options?: IdxOption[];
|
|
55
65
|
poll?: IdxPollOptions;
|
|
66
|
+
authenticatorEnrollments?: IdxAuthenticator[];
|
|
56
67
|
};
|
|
57
68
|
export declare enum IdxFeature {
|
|
58
|
-
PASSWORD_RECOVERY =
|
|
59
|
-
REGISTRATION =
|
|
60
|
-
SOCIAL_IDP =
|
|
69
|
+
PASSWORD_RECOVERY = "recover-password",
|
|
70
|
+
REGISTRATION = "enroll-profile",
|
|
71
|
+
SOCIAL_IDP = "redirect-idp",
|
|
72
|
+
ACCOUNT_UNLOCK = "unlock-account"
|
|
73
|
+
}
|
|
74
|
+
export interface IdxTransactionMeta extends PKCETransactionMeta {
|
|
75
|
+
interactionHandle?: string;
|
|
76
|
+
remediations?: string[];
|
|
77
|
+
flow?: FlowIdentifier;
|
|
78
|
+
withCredentials?: boolean;
|
|
79
|
+
activationToken?: string;
|
|
80
|
+
recoveryToken?: string;
|
|
61
81
|
}
|
|
62
82
|
export interface IdxTransaction {
|
|
63
83
|
status: IdxStatus;
|
|
@@ -68,10 +88,17 @@ export interface IdxTransaction {
|
|
|
68
88
|
meta?: IdxTransactionMeta;
|
|
69
89
|
enabledFeatures?: IdxFeature[];
|
|
70
90
|
availableSteps?: NextStep[];
|
|
71
|
-
|
|
91
|
+
proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;
|
|
92
|
+
neededToProceed: IdxRemediation[];
|
|
93
|
+
rawIdxState: RawIdxResponse;
|
|
94
|
+
interactionCode?: string;
|
|
95
|
+
actions: IdxActions;
|
|
96
|
+
context: IdxContext;
|
|
72
97
|
}
|
|
73
98
|
export declare type IdxOptions = InteractOptions & IntrospectOptions & {
|
|
74
99
|
flow?: FlowIdentifier;
|
|
100
|
+
exchangeCodeForTokens?: boolean;
|
|
101
|
+
autoRemediate?: boolean;
|
|
75
102
|
};
|
|
76
103
|
export interface IdxPollOptions {
|
|
77
104
|
required?: boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import { IdentifyValues, SelectAuthenticatorUnlockAccountValues, SelectAuthenticatorAuthenticateValues, ChallengeAuthenticatorValues, AuthenticatorVerificationDataValues } from './remediators';
|
|
13
|
+
import { OktaAuthInterface, IdxOptions, IdxTransaction } from '../types';
|
|
14
|
+
export declare type AccountUnlockOptions = IdxOptions & IdentifyValues & SelectAuthenticatorUnlockAccountValues & SelectAuthenticatorAuthenticateValues & ChallengeAuthenticatorValues & AuthenticatorVerificationDataValues;
|
|
15
|
+
export declare function unlockAccount(authClient: OktaAuthInterface, options?: AccountUnlockOptions): Promise<IdxTransaction>;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getWellKnown(sdk:
|
|
3
|
-
export declare function getKey(sdk:
|
|
1
|
+
import { OktaAuthInterface, WellKnownResponse } from '../../types';
|
|
2
|
+
export declare function getWellKnown(sdk: OktaAuthInterface, issuer?: string): Promise<WellKnownResponse>;
|
|
3
|
+
export declare function getKey(sdk: OktaAuthInterface, issuer: string, kid: string): Promise<string>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
import { CustomUrls, OktaAuthInterface, TokenParams, TokenResponse } from '../types';
|
|
14
|
+
export declare function exchangeCodeForTokens(sdk: OktaAuthInterface, tokenParams: TokenParams, urls?: CustomUrls): Promise<TokenResponse>;
|
package/lib/oidc/getToken.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getToken(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams, PopupParams } from '../types';
|
|
2
|
+
export declare function getToken(sdk: OktaAuthInterface, options: TokenParams & PopupParams): Promise<import("../types").TokenResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getWithPopup(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams, TokenResponse } from '../types';
|
|
2
|
+
export declare function getWithPopup(sdk: OktaAuthInterface, options: TokenParams): Promise<TokenResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getWithRedirect(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams } from '../types';
|
|
2
|
+
export declare function getWithRedirect(sdk: OktaAuthInterface, options?: TokenParams): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getWithoutPrompt(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams, TokenResponse } from '../types';
|
|
2
|
+
export declare function getWithoutPrompt(sdk: OktaAuthInterface, options: TokenParams): Promise<TokenResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function handleOAuthResponse(sdk:
|
|
1
|
+
import { OktaAuthInterface, OAuthResponse, TokenParams, TokenResponse, CustomUrls } from '../types';
|
|
2
|
+
export declare function handleOAuthResponse(sdk: OktaAuthInterface, tokenParams: TokenParams, res: OAuthResponse, urls?: CustomUrls): Promise<TokenResponse>;
|
|
@@ -2,4 +2,4 @@ import { ParseFromUrlOptions, TokenResponse, OAuthResponse } from '../types';
|
|
|
2
2
|
export declare function getResponseMode(sdk: any): 'query' | 'fragment';
|
|
3
3
|
export declare function parseOAuthResponseFromUrl(sdk: any, options: string | ParseFromUrlOptions): OAuthResponse;
|
|
4
4
|
export declare function cleanOAuthResponseFromUrl(sdk: any, options: ParseFromUrlOptions): void;
|
|
5
|
-
export declare function parseFromUrl(sdk: any, options
|
|
5
|
+
export declare function parseFromUrl(sdk: any, options?: string | ParseFromUrlOptions): Promise<TokenResponse>;
|
package/lib/oidc/renewToken.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function renewToken(sdk:
|
|
1
|
+
import { OktaAuthInterface, Token } from '../types';
|
|
2
|
+
export declare function renewToken(sdk: OktaAuthInterface, token: Token): Promise<Token | undefined>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TokenParams, Tokens } from '../types';
|
|
2
|
-
export declare function renewTokens(sdk: any, options
|
|
2
|
+
export declare function renewTokens(sdk: any, options?: TokenParams): Promise<Tokens>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function renewTokensWithRefresh(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams, RefreshToken, Tokens } from '../types';
|
|
2
|
+
export declare function renewTokensWithRefresh(sdk: OktaAuthInterface, tokenParams: TokenParams, refreshTokenObject: RefreshToken): Promise<Tokens>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
14
|
-
export declare function revokeToken(sdk:
|
|
13
|
+
import { OktaAuthInterface, RevocableToken } from '../types';
|
|
14
|
+
export declare function revokeToken(sdk: OktaAuthInterface, token: RevocableToken): Promise<any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OktaAuthInterface } from '../../types';
|
|
2
2
|
export declare function addListener(eventTarget: any, name: any, fn: any): void;
|
|
3
3
|
export declare function removeListener(eventTarget: any, name: any, fn: any): void;
|
|
4
4
|
export declare function loadFrame(src: any): HTMLIFrameElement;
|
|
5
|
-
export declare function loadPopup(src: any, options: any): Window;
|
|
6
|
-
export declare function addPostMessageListener(sdk:
|
|
5
|
+
export declare function loadPopup(src: any, options: any): Window | null;
|
|
6
|
+
export declare function addPostMessageListener(sdk: OktaAuthInterface, timeout: any, state: any): Promise<unknown>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getDefaultTokenParams(sdk:
|
|
1
|
+
import { OktaAuthInterface, TokenParams } from '../../types';
|
|
2
|
+
export declare function getDefaultTokenParams(sdk: OktaAuthInterface): TokenParams;
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { OktaAuthInterface } from '../../types';
|
|
13
13
|
export declare function isInteractionRequiredError(error: Error): boolean;
|
|
14
|
-
export declare function isAuthorizationCodeError(sdk:
|
|
14
|
+
export declare function isAuthorizationCodeError(sdk: OktaAuthInterface, error: Error): boolean | undefined;
|
package/lib/oidc/util/index.d.ts
CHANGED
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { OktaAuthInterface, OktaAuthOptions } from '../../types';
|
|
14
14
|
export declare function hasTokensInHash(hash: string): boolean;
|
|
15
15
|
export declare function hasAuthorizationCode(hashOrSearch: string): boolean;
|
|
16
16
|
export declare function hasInteractionCode(hashOrSearch: string): boolean;
|
|
17
17
|
export declare function hasErrorInUrl(hashOrSearch: string): boolean;
|
|
18
|
-
export declare function isRedirectUri(uri: string, sdk:
|
|
18
|
+
export declare function isRedirectUri(uri: string, sdk: OktaAuthInterface): boolean;
|
|
19
19
|
export declare function isCodeFlow(options: OktaAuthOptions): boolean;
|
|
20
20
|
export declare function getHashOrSearch(options: OktaAuthOptions): string;
|
|
21
21
|
/**
|
|
22
22
|
* Check if tokens or a code have been passed back into the url, which happens in
|
|
23
23
|
* the OIDC (including social auth IDP) redirect flow.
|
|
24
24
|
*/
|
|
25
|
-
export declare function isLoginRedirect(sdk:
|
|
25
|
+
export declare function isLoginRedirect(sdk: OktaAuthInterface): boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Check if error=interaction_required has been passed back in the url, which happens in
|
|
28
28
|
* the social auth IDP redirect flow.
|
|
29
29
|
*/
|
|
30
|
-
export declare function isInteractionRequired(sdk:
|
|
30
|
+
export declare function isInteractionRequired(sdk: OktaAuthInterface, hashOrSearch?: string): boolean;
|
package/lib/oidc/util/oauth.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OktaAuthInterface, CustomUrls } from '../../types';
|
|
2
2
|
export declare function generateState(): string;
|
|
3
3
|
export declare function generateNonce(): string;
|
|
4
|
-
export declare function getOAuthBaseUrl(sdk:
|
|
5
|
-
export declare function getOAuthDomain(sdk:
|
|
6
|
-
export declare function getOAuthUrls(sdk:
|
|
7
|
-
issuer: any;
|
|
8
|
-
authorizeUrl: any;
|
|
9
|
-
userinfoUrl: any;
|
|
10
|
-
tokenUrl: any;
|
|
11
|
-
revokeUrl: any;
|
|
12
|
-
logoutUrl: any;
|
|
13
|
-
};
|
|
4
|
+
export declare function getOAuthBaseUrl(sdk: OktaAuthInterface, options?: CustomUrls): any;
|
|
5
|
+
export declare function getOAuthDomain(sdk: OktaAuthInterface, options?: CustomUrls): any;
|
|
6
|
+
export declare function getOAuthUrls(sdk: OktaAuthInterface, options?: CustomUrls): CustomUrls;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function
|
|
1
|
+
import { OktaAuthInterface, TokenParams } from '../../types';
|
|
2
|
+
export declare function assertPKCESupport(sdk: OktaAuthInterface): void;
|
|
3
|
+
export declare function validateCodeChallengeMethod(sdk: OktaAuthInterface, codeChallengeMethod?: string): Promise<string>;
|
|
4
|
+
export declare function preparePKCE(sdk: OktaAuthInterface, tokenParams: TokenParams): Promise<TokenParams>;
|
|
5
|
+
export declare function prepareTokenParams(sdk: OktaAuthInterface, tokenParams?: TokenParams): Promise<TokenParams>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
14
|
-
export declare function validateClaims(sdk:
|
|
13
|
+
import { OktaAuthInterface, TokenVerifyParams, UserClaims } from '../../types';
|
|
14
|
+
export declare function validateClaims(sdk: OktaAuthInterface, claims: UserClaims, validationParams: TokenVerifyParams): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IDToken,
|
|
2
|
-
export declare function verifyToken(sdk:
|
|
1
|
+
import { IDToken, OktaAuthInterface, TokenVerifyParams } from '../types';
|
|
2
|
+
export declare function verifyToken(sdk: OktaAuthInterface, token: IDToken, validationParams: TokenVerifyParams): Promise<IDToken>;
|
|
@@ -18,7 +18,7 @@ declare class ServerStorage implements StorageUtil {
|
|
|
18
18
|
testStorageType(storageType: StorageType): boolean;
|
|
19
19
|
getStorageByType(storageType: StorageType): SimpleStorage;
|
|
20
20
|
findStorageType(): StorageType;
|
|
21
|
-
getHttpCache():
|
|
21
|
+
getHttpCache(): null;
|
|
22
22
|
getStorage(): SimpleStorage;
|
|
23
23
|
}
|
|
24
24
|
declare const _default: ServerStorage;
|
|
@@ -14,8 +14,8 @@ import { TokenManagerOptions } from '../types';
|
|
|
14
14
|
export declare class TokenService {
|
|
15
15
|
private tokenManager;
|
|
16
16
|
private options;
|
|
17
|
-
private storageListener
|
|
18
|
-
private onTokenExpiredHandler
|
|
17
|
+
private storageListener?;
|
|
18
|
+
private onTokenExpiredHandler?;
|
|
19
19
|
private syncTimeout;
|
|
20
20
|
constructor(tokenManager: TokenManager, options?: TokenManagerOptions);
|
|
21
21
|
start(): void;
|
|
@@ -42,7 +42,7 @@ export declare class AuthTransaction implements TransactionState, AuthTransactio
|
|
|
42
42
|
activate?: AuthTransactionFunction;
|
|
43
43
|
poll?: AuthTransactionFunction;
|
|
44
44
|
prev?: AuthTransactionFunction;
|
|
45
|
-
data
|
|
45
|
+
data?: TransactionState;
|
|
46
46
|
stateToken?: string;
|
|
47
47
|
sessionToken?: string;
|
|
48
48
|
status: string | IdxStatus;
|
|
@@ -53,6 +53,6 @@ export declare class AuthTransaction implements TransactionState, AuthTransactio
|
|
|
53
53
|
scopes?: Array<Record<string, any>>;
|
|
54
54
|
target?: Record<string, any>;
|
|
55
55
|
authentication?: Record<string, any>;
|
|
56
|
-
constructor(sdk: any, res?:
|
|
56
|
+
constructor(sdk: any, res?: TransactionState | null);
|
|
57
57
|
}
|
|
58
58
|
export {};
|
|
@@ -9,8 +9,17 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export interface TransactionLink {
|
|
13
|
+
name?: string;
|
|
14
|
+
type: string;
|
|
15
|
+
href: string;
|
|
16
|
+
hints?: {
|
|
17
|
+
allow?: string[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface TransactionState {
|
|
13
21
|
interactionHandle?: string;
|
|
22
|
+
status: string;
|
|
14
23
|
stateToken?: string;
|
|
15
24
|
type?: string;
|
|
16
25
|
expiresAt?: string;
|
|
@@ -24,4 +33,5 @@ export declare class TransactionState {
|
|
|
24
33
|
profile?: {
|
|
25
34
|
updatePhone?: boolean;
|
|
26
35
|
};
|
|
36
|
+
_links?: Record<string, TransactionLink>;
|
|
27
37
|
}
|
package/lib/tx/api.d.ts
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
import { AuthTransaction } from './AuthTransaction';
|
|
14
|
-
declare function transactionStatus(sdk: any, args: any): Promise<any>;
|
|
15
|
-
declare function resumeTransaction(sdk: any, args: any): any;
|
|
16
|
-
declare function
|
|
17
|
-
declare function
|
|
18
|
-
declare function
|
|
19
|
-
export
|
|
14
|
+
export declare function transactionStatus(sdk: any, args: any): Promise<any>;
|
|
15
|
+
export declare function resumeTransaction(sdk: any, args: any): any;
|
|
16
|
+
export declare function introspectAuthn(sdk: any, args: any): Promise<AuthTransaction>;
|
|
17
|
+
export declare function transactionStep(sdk: any, args: any): Promise<any>;
|
|
18
|
+
export declare function transactionExists(sdk: any): boolean;
|
|
19
|
+
export declare function postToTransaction(sdk: any, url: any, args: any, options?: any): Promise<AuthTransaction>;
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { StorageManagerOptions, StorageUtil } from './Storage';
|
|
12
|
+
import { StorageManagerOptions, StorageUtil, SimpleStorage } from './Storage';
|
|
13
13
|
import { CookieOptions } from './Cookies';
|
|
14
14
|
import { HttpRequestClient } from './http';
|
|
15
15
|
import { AuthState } from './AuthState';
|
|
16
16
|
import { TransactionManagerOptions } from './Transaction';
|
|
17
|
-
import { SimpleStorage } from './Storage';
|
|
18
17
|
import { FlowIdentifier } from '../idx/types';
|
|
19
18
|
import OktaAuth from '../OktaAuth';
|
|
20
19
|
export interface TokenManagerOptions {
|
|
@@ -28,10 +27,6 @@ export interface TokenManagerOptions {
|
|
|
28
27
|
syncStorage?: boolean;
|
|
29
28
|
_storageEventDelay?: number;
|
|
30
29
|
}
|
|
31
|
-
export interface CustomUserAgent {
|
|
32
|
-
template?: string;
|
|
33
|
-
value?: string;
|
|
34
|
-
}
|
|
35
30
|
export interface CustomUrls {
|
|
36
31
|
issuer?: string;
|
|
37
32
|
authorizeUrl?: string;
|
|
@@ -56,16 +51,19 @@ export interface OktaAuthOptions extends CustomUrls {
|
|
|
56
51
|
storageUtil?: StorageUtil;
|
|
57
52
|
ajaxRequest?: object;
|
|
58
53
|
httpRequestClient?: HttpRequestClient;
|
|
59
|
-
userAgent?: CustomUserAgent;
|
|
60
54
|
cookies?: CookieOptions;
|
|
61
55
|
transformErrorXHR?: (xhr: object) => any;
|
|
62
56
|
headers?: object;
|
|
63
57
|
maxClockSkew?: number;
|
|
64
58
|
transformAuthState?: (oktaAuth: OktaAuth, authState: AuthState) => Promise<AuthState>;
|
|
65
|
-
restoreOriginalUri?: (oktaAuth: OktaAuth, originalUri
|
|
59
|
+
restoreOriginalUri?: (oktaAuth: OktaAuth, originalUri?: string) => Promise<void>;
|
|
66
60
|
devMode?: boolean;
|
|
67
61
|
storageManager?: StorageManagerOptions;
|
|
68
62
|
transactionManager?: TransactionManagerOptions;
|
|
69
63
|
flow?: FlowIdentifier;
|
|
64
|
+
codeChallenge?: string;
|
|
65
|
+
codeChallengeMethod?: string;
|
|
66
|
+
recoveryToken?: string;
|
|
67
|
+
activationToken?: string;
|
|
70
68
|
clientSecret?: string;
|
|
71
69
|
}
|