@okta/okta-auth-js 5.11.0 → 6.2.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 +74 -0
- package/README.md +63 -29
- package/cjs/AuthStateManager.js +15 -6
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +168 -108
- 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/ServiceManager.js +195 -0
- package/cjs/ServiceManager.js.map +1 -0
- package/cjs/StorageManager.js +16 -9
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +42 -34
- 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 +36 -20
- 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/node.js +19 -13
- package/cjs/crypto/node.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/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 +52 -9
- 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 +145 -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/browser.js +81 -0
- package/cjs/options/browser.js.map +1 -0
- package/cjs/options/index.js +94 -0
- package/cjs/options/index.js.map +1 -0
- package/cjs/options/node.js +46 -0
- package/cjs/options/node.js.map +1 -0
- package/cjs/server/serverStorage.js +9 -5
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/AutoRenewService.js +94 -0
- package/cjs/services/AutoRenewService.js.map +1 -0
- package/cjs/services/SyncStorageService.js +93 -0
- package/cjs/services/SyncStorageService.js.map +1 -0
- package/cjs/services/index.js +30 -0
- package/cjs/services/index.js.map +1 -0
- 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/Service.js +2 -0
- package/cjs/types/Service.js.map +1 -0
- package/cjs/types/Transaction.js +10 -2
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/types/index.js +29 -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 -20
- 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 +1 -19
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/{index.js → esm.browser.js} +3283 -2698
- package/esm/esm.browser.js.map +1 -0
- package/esm/esm.node.mjs +9277 -0
- package/esm/esm.node.mjs.map +1 -0
- package/lib/AuthStateManager.d.ts +2 -5
- package/lib/OktaAuth.d.ts +14 -16
- package/lib/ServiceManager.d.ts +38 -0
- package/lib/StorageManager.d.ts +2 -2
- package/lib/TokenManager.d.ts +4 -5
- 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 +5 -5
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +10 -10
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +10 -7
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +8 -12
- 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/options/browser.d.ts +16 -0
- package/lib/{options.d.ts → options/index.d.ts} +1 -1
- package/lib/options/node.d.ts +16 -0
- package/lib/server/serverStorage.d.ts +1 -1
- package/lib/services/AutoRenewService.d.ts +27 -0
- package/lib/services/{TokenService.d.ts → SyncStorageService.d.ts} +8 -5
- package/lib/services/index.d.ts +13 -0
- 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 +11 -8
- package/lib/types/Service.d.ts +23 -0
- 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 +49 -22
- package/lib/types/index.d.ts +1 -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 +30 -13
- package/polyfill/index.js +1 -0
- package/cjs/options.js +0 -154
- package/cjs/options.js.map +0 -1
- package/cjs/services/TokenService.js +0 -108
- package/cjs/services/TokenService.js.map +0 -1
- package/cjs/util/emailVerify.js +0 -28
- package/cjs/util/emailVerify.js.map +0 -1
- package/esm/index.js.map +0 -1
|
@@ -11,18 +11,16 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { AuthState, AuthStateLogOptions } from './types';
|
|
13
13
|
import { OktaAuth } from '.';
|
|
14
|
-
declare const
|
|
15
|
-
export declare const INITIAL_AUTH_STATE: any;
|
|
14
|
+
export declare const INITIAL_AUTH_STATE: null;
|
|
16
15
|
export declare class AuthStateManager {
|
|
17
16
|
_sdk: OktaAuth;
|
|
18
17
|
_pending: {
|
|
19
|
-
updateAuthStatePromise:
|
|
18
|
+
updateAuthStatePromise: any;
|
|
20
19
|
canceledTimes: number;
|
|
21
20
|
};
|
|
22
21
|
_authState: AuthState | null;
|
|
23
22
|
_prevAuthState: AuthState | null;
|
|
24
23
|
_logOptions: AuthStateLogOptions;
|
|
25
|
-
_lastEventTimestamp: number;
|
|
26
24
|
constructor(sdk: OktaAuth);
|
|
27
25
|
_setLogOptions(options: any): void;
|
|
28
26
|
getAuthState(): AuthState | null;
|
|
@@ -31,4 +29,3 @@ export declare class AuthStateManager {
|
|
|
31
29
|
subscribe(handler: any): void;
|
|
32
30
|
unsubscribe(handler?: any): void;
|
|
33
31
|
}
|
|
34
|
-
export {};
|
package/lib/OktaAuth.d.ts
CHANGED
|
@@ -9,32 +9,33 @@
|
|
|
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, OktaAuthOptions, AccessToken, RefreshToken, TokenAPI, FeaturesAPI, CryptoAPI, WebauthnAPI, SignoutAPI, FingerprintAPI, UserClaims, SigninWithRedirectOptions, SigninWithCredentialsOptions, SignoutOptions, Tokens, ForgotPasswordOptions, VerifyRecoveryTokenOptions, TransactionAPI, SessionAPI, SigninAPI, PkceAPI, SigninOptions, IdxAPI, SignoutRedirectUrlOptions, HttpAPI, RequestOptions, IsAuthenticatedOptions } from './types';
|
|
13
13
|
import { AuthTransaction } from './tx';
|
|
14
|
-
import { EmailVerifyCallbackResponse } from './util';
|
|
15
14
|
import { TokenManager } from './TokenManager';
|
|
15
|
+
import { ServiceManager } from './ServiceManager';
|
|
16
16
|
import PromiseQueue from './PromiseQueue';
|
|
17
17
|
import { AuthStateManager } from './AuthStateManager';
|
|
18
|
-
import StorageManager from './StorageManager';
|
|
18
|
+
import { StorageManager } from './StorageManager';
|
|
19
19
|
import TransactionManager from './TransactionManager';
|
|
20
20
|
import { OktaUserAgent } from './OktaUserAgent';
|
|
21
|
-
declare
|
|
22
|
-
declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
21
|
+
declare class OktaAuth implements OktaAuthInterface, SigninAPI, SignoutAPI {
|
|
23
22
|
options: OktaAuthOptions;
|
|
24
23
|
storageManager: StorageManager;
|
|
25
24
|
transactionManager: TransactionManager;
|
|
26
25
|
tx: TransactionAPI;
|
|
27
26
|
idx: IdxAPI;
|
|
28
|
-
userAgent: string;
|
|
29
27
|
session: SessionAPI;
|
|
30
28
|
pkce: PkceAPI;
|
|
31
29
|
static features: FeaturesAPI;
|
|
30
|
+
static crypto: CryptoAPI;
|
|
31
|
+
static webauthn: WebauthnAPI;
|
|
32
32
|
features: FeaturesAPI;
|
|
33
33
|
token: TokenAPI;
|
|
34
34
|
_tokenQueue: PromiseQueue;
|
|
35
|
-
emitter:
|
|
35
|
+
emitter: any;
|
|
36
36
|
tokenManager: TokenManager;
|
|
37
37
|
authStateManager: AuthStateManager;
|
|
38
|
+
serviceManager: ServiceManager;
|
|
38
39
|
http: HttpAPI;
|
|
39
40
|
fingerprint: FingerprintAPI;
|
|
40
41
|
_oktaUserAgent: OktaUserAgent;
|
|
@@ -45,20 +46,16 @@ declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
|
45
46
|
start(): void;
|
|
46
47
|
stop(): void;
|
|
47
48
|
setHeaders(headers: any): void;
|
|
48
|
-
isInteractionRequired(hashOrSearch?: string): boolean;
|
|
49
|
-
isInteractionRequiredError(error: Error): boolean;
|
|
50
|
-
isEmailVerifyCallback(urlPath: string): boolean;
|
|
51
|
-
parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse;
|
|
52
49
|
signIn(opts: SigninOptions): Promise<AuthTransaction>;
|
|
53
50
|
signInWithCredentials(opts: SigninWithCredentialsOptions): Promise<AuthTransaction>;
|
|
54
51
|
signInWithRedirect(opts?: SigninWithRedirectOptions): Promise<void>;
|
|
55
|
-
closeSession(): Promise<
|
|
56
|
-
revokeAccessToken(accessToken?: AccessToken): Promise<
|
|
57
|
-
revokeRefreshToken(refreshToken?: RefreshToken): Promise<
|
|
52
|
+
closeSession(): Promise<unknown>;
|
|
53
|
+
revokeAccessToken(accessToken?: AccessToken): Promise<unknown>;
|
|
54
|
+
revokeRefreshToken(refreshToken?: RefreshToken): Promise<unknown>;
|
|
58
55
|
getSignOutRedirectUrl(options?: SignoutRedirectUrlOptions): string;
|
|
59
56
|
signOut(options?: SignoutOptions): Promise<void>;
|
|
60
57
|
webfinger(opts: any): Promise<object>;
|
|
61
|
-
isAuthenticated(): Promise<boolean>;
|
|
58
|
+
isAuthenticated(options?: IsAuthenticatedOptions): Promise<boolean>;
|
|
62
59
|
getUser(): Promise<UserClaims>;
|
|
63
60
|
getIdToken(): string | undefined;
|
|
64
61
|
getAccessToken(): string | undefined;
|
|
@@ -68,7 +65,7 @@ declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
|
68
65
|
*/
|
|
69
66
|
storeTokensFromRedirect(): Promise<void>;
|
|
70
67
|
setOriginalUri(originalUri: string, state?: string): void;
|
|
71
|
-
getOriginalUri(state?: string): string;
|
|
68
|
+
getOriginalUri(state?: string): string | undefined;
|
|
72
69
|
removeOriginalUri(state?: string): void;
|
|
73
70
|
isLoginRedirect(): boolean;
|
|
74
71
|
handleLoginRedirect(tokens?: Tokens, originalUri?: string): Promise<void>;
|
|
@@ -79,5 +76,6 @@ declare class OktaAuth implements SDKInterface, SigninAPI, SignoutAPI {
|
|
|
79
76
|
forgotPassword(opts: any): Promise<AuthTransaction>;
|
|
80
77
|
unlockAccount(opts: ForgotPasswordOptions): Promise<AuthTransaction>;
|
|
81
78
|
verifyRecoveryToken(opts: VerifyRecoveryTokenOptions): Promise<AuthTransaction>;
|
|
79
|
+
invokeApiMethod(options: RequestOptions): Promise<unknown>;
|
|
82
80
|
}
|
|
83
81
|
export default OktaAuth;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { ServiceManagerInterface, ServiceInterface, ServiceManagerOptions } from './types';
|
|
13
|
+
import { OktaAuth } from '.';
|
|
14
|
+
export declare class ServiceManager implements ServiceManagerInterface {
|
|
15
|
+
private sdk;
|
|
16
|
+
private options;
|
|
17
|
+
private services;
|
|
18
|
+
private channel?;
|
|
19
|
+
private elector?;
|
|
20
|
+
private started;
|
|
21
|
+
private static knownServices;
|
|
22
|
+
private static defaultOptions;
|
|
23
|
+
constructor(sdk: OktaAuth, options?: ServiceManagerOptions);
|
|
24
|
+
static canUseLeaderElection(): boolean;
|
|
25
|
+
private onLeader;
|
|
26
|
+
private onLeaderDuplicate;
|
|
27
|
+
isLeader(): boolean;
|
|
28
|
+
hasLeader(): boolean | undefined;
|
|
29
|
+
isLeaderRequired(): boolean;
|
|
30
|
+
start(): void;
|
|
31
|
+
stop(): void;
|
|
32
|
+
getService(name: string): ServiceInterface | undefined;
|
|
33
|
+
private startServices;
|
|
34
|
+
private stopServices;
|
|
35
|
+
private startElector;
|
|
36
|
+
private stopElector;
|
|
37
|
+
private createService;
|
|
38
|
+
}
|
package/lib/StorageManager.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { StorageUtil, StorageProvider, StorageOptions, PKCEStorage, CookieOptions, TransactionStorage, IdxResponseStorage, StorageManagerOptions, SimpleStorage } from './types';
|
|
13
|
-
export
|
|
13
|
+
export declare class StorageManager {
|
|
14
14
|
storageManagerOptions: StorageManagerOptions;
|
|
15
15
|
cookieOptions: CookieOptions;
|
|
16
16
|
storageUtil: StorageUtil;
|
|
@@ -20,7 +20,7 @@ export default class StorageManager {
|
|
|
20
20
|
getTransactionStorage(options?: StorageOptions): TransactionStorage;
|
|
21
21
|
getSharedTansactionStorage(options?: StorageOptions): TransactionStorage;
|
|
22
22
|
getOriginalUriStorage(options?: StorageOptions): TransactionStorage;
|
|
23
|
-
getIdxResponseStorage(options?: StorageOptions): IdxResponseStorage;
|
|
23
|
+
getIdxResponseStorage(options?: StorageOptions): IdxResponseStorage | null;
|
|
24
24
|
getTokenStorage(options?: StorageOptions): StorageProvider;
|
|
25
25
|
getHttpCache(options?: StorageOptions): StorageProvider;
|
|
26
26
|
getLegacyPKCEStorage(options?: StorageOptions): PKCEStorage;
|
package/lib/TokenManager.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Token, Tokens, TokenType, TokenManagerOptions,
|
|
1
|
+
import { Token, Tokens, TokenType, TokenManagerOptions, OktaAuthInterface, TokenManagerErrorEventHandler, TokenManagerEventHandler, TokenManagerInterface, RefreshToken } from './types';
|
|
2
2
|
export declare const EVENT_EXPIRED = "expired";
|
|
3
3
|
export declare const EVENT_RENEWED = "renewed";
|
|
4
4
|
export declare const EVENT_ADDED = "added";
|
|
@@ -11,10 +11,9 @@ export declare class TokenManager implements TokenManagerInterface {
|
|
|
11
11
|
private storage;
|
|
12
12
|
private state;
|
|
13
13
|
private options;
|
|
14
|
-
private service;
|
|
15
14
|
on: (event: string, handler: TokenManagerErrorEventHandler | TokenManagerEventHandler, context?: object) => void;
|
|
16
15
|
off: (event: string, handler?: TokenManagerErrorEventHandler | TokenManagerEventHandler) => void;
|
|
17
|
-
constructor(sdk:
|
|
16
|
+
constructor(sdk: OktaAuthInterface, options?: TokenManagerOptions);
|
|
18
17
|
start(): void;
|
|
19
18
|
stop(): void;
|
|
20
19
|
getOptions(): TokenManagerOptions;
|
|
@@ -40,9 +39,9 @@ export declare class TokenManager implements TokenManagerInterface {
|
|
|
40
39
|
private getTokenType;
|
|
41
40
|
setTokens(tokens: Tokens, accessTokenCb?: Function, idTokenCb?: Function, refreshTokenCb?: Function): void;
|
|
42
41
|
remove(key: any): void;
|
|
43
|
-
renewToken(token: any): Promise<Token>;
|
|
42
|
+
renewToken(token: any): Promise<Token | undefined>;
|
|
44
43
|
validateToken(token: Token): void;
|
|
45
|
-
renew(key: any): Promise<Token>;
|
|
44
|
+
renew(key: any): Promise<Token | undefined>;
|
|
46
45
|
clear(): void;
|
|
47
46
|
clearPendingRemoveTokens(): void;
|
|
48
47
|
getTokensFromStorageValue(value: any): any;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import StorageManager from './StorageManager';
|
|
12
|
+
import { StorageManager } from './StorageManager';
|
|
13
13
|
import { TransactionMeta, PKCETransactionMeta, OAuthTransactionMeta, TransactionMetaOptions, TransactionManagerOptions } from './types';
|
|
14
14
|
import { RawIdxResponse } from './idx/types/idx-js';
|
|
15
15
|
export interface ClearTransactionMetaOptions extends TransactionMetaOptions {
|
|
@@ -23,16 +23,17 @@ export default class TransactionManager {
|
|
|
23
23
|
saveStateCookie: boolean;
|
|
24
24
|
saveParamsCookie: boolean;
|
|
25
25
|
enableSharedStorage: boolean;
|
|
26
|
+
saveLastResponse: boolean;
|
|
26
27
|
constructor(options: TransactionManagerOptions);
|
|
27
28
|
clear(options?: ClearTransactionMetaOptions): void;
|
|
28
29
|
save(meta: TransactionMeta, options?: TransactionMetaOptions): void;
|
|
29
30
|
exists(options?: TransactionMetaOptions): boolean;
|
|
30
|
-
load(options?: TransactionMetaOptions): TransactionMeta;
|
|
31
|
+
load(options?: TransactionMetaOptions): TransactionMeta | null;
|
|
31
32
|
clearLegacyPKCE(): void;
|
|
32
33
|
loadLegacyPKCE(): PKCETransactionMeta;
|
|
33
34
|
clearLegacyOAuthParams(): void;
|
|
34
35
|
loadLegacyOAuthParams(): OAuthTransactionMeta;
|
|
35
36
|
saveIdxResponse(idxResponse: RawIdxResponse): void;
|
|
36
|
-
loadIdxResponse(): RawIdxResponse;
|
|
37
|
+
loadIdxResponse(): RawIdxResponse | null;
|
|
37
38
|
clearIdxResponse(): void;
|
|
38
39
|
}
|
|
@@ -9,6 +9,5 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
export default function fingerprint(sdk: OktaAuth, options: FingerprintOptions): Promise<unknown>;
|
|
12
|
+
import { FingerprintOptions, OktaAuthInterface } from '../types';
|
|
13
|
+
export default function fingerprint(sdk: OktaAuthInterface, options?: FingerprintOptions): Promise<string>;
|
package/lib/builderUtil.d.ts
CHANGED
|
@@ -11,5 +11,4 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { OktaAuthOptions } from './types';
|
|
13
13
|
declare function assertValidConfig(args: OktaAuthOptions): void;
|
|
14
|
-
|
|
15
|
-
export { assertValidConfig, getUserAgent };
|
|
14
|
+
export { assertValidConfig };
|
package/lib/crypto/base64.d.ts
CHANGED
|
@@ -15,3 +15,5 @@ export declare function base64UrlToBase64(b64u: any): any;
|
|
|
15
15
|
export declare function base64UrlToString(b64u: any): any;
|
|
16
16
|
export declare function stringToBuffer(str: any): Uint8Array;
|
|
17
17
|
export declare function base64UrlDecode(str: any): any;
|
|
18
|
+
export declare function base64UrlToBuffer(b64u: any): Uint8Array;
|
|
19
|
+
export declare function bufferToBase64Url(bin: any): any;
|
package/lib/crypto/browser.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
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 { ActivationData, ChallengeData, IdxAuthenticator } from '../idx/types';
|
|
13
|
+
export declare const buildCredentialCreationOptions: (activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]) => CredentialCreationOptions;
|
|
14
|
+
export declare const buildCredentialRequestOptions: (challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]) => CredentialRequestOptions;
|
|
15
|
+
export declare const getAttestation: (credential: PublicKeyCredential) => {
|
|
16
|
+
id: string;
|
|
17
|
+
clientData: any;
|
|
18
|
+
attestation: any;
|
|
19
|
+
};
|
|
20
|
+
export declare const getAssertion: (credential: PublicKeyCredential) => {
|
|
21
|
+
id: string;
|
|
22
|
+
clientData: any;
|
|
23
|
+
authenticatorData: any;
|
|
24
|
+
signatureData: any;
|
|
25
|
+
};
|
package/lib/features.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
export declare function isBrowser(): boolean;
|
|
13
13
|
export declare function isIE11OrLess(): boolean;
|
|
14
14
|
export declare function getUserAgent(): string;
|
|
15
|
-
export declare function isFingerprintSupported(): boolean;
|
|
15
|
+
export declare function isFingerprintSupported(): boolean | "";
|
|
16
16
|
export declare function isPopupPostMessageSupported(): boolean;
|
|
17
17
|
export declare function isTokenVerifySupported(): boolean;
|
|
18
18
|
export declare function hasTextEncoder(): boolean;
|
package/lib/http/headers.d.ts
CHANGED
|
@@ -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 setRequestHeader(authClient:
|
|
13
|
+
import { OktaAuthInterface } from '../types';
|
|
14
|
+
export declare function setRequestHeader(authClient: OktaAuthInterface, headerName: any, headerValue: any): void;
|
package/lib/http/request.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
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 httpRequest(sdk:
|
|
15
|
-
export declare function get(sdk:
|
|
16
|
-
export declare function post(sdk:
|
|
13
|
+
import { OktaAuthInterface, RequestOptions, RequestData } from '../types';
|
|
14
|
+
export declare function httpRequest(sdk: OktaAuthInterface, options: RequestOptions): Promise<any>;
|
|
15
|
+
export declare function get(sdk: OktaAuthInterface, url: string, options?: RequestOptions): Promise<any>;
|
|
16
|
+
export declare function post(sdk: OktaAuthInterface, url: string, args?: RequestData, options?: RequestOptions): Promise<any>;
|
|
@@ -9,7 +9,7 @@
|
|
|
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, IdxOptions, IdxTransaction } from '../types';
|
|
13
13
|
import { IdentifyValues, SelectAuthenticatorAuthenticateValues, ChallengeAuthenticatorValues, ReEnrollAuthenticatorValues, AuthenticatorEnrollmentDataValues, SelectAuthenticatorEnrollValues, EnrollAuthenticatorValues } from './remediators';
|
|
14
14
|
export declare type AuthenticationOptions = IdxOptions & IdentifyValues & SelectAuthenticatorAuthenticateValues & SelectAuthenticatorEnrollValues & ChallengeAuthenticatorValues & ReEnrollAuthenticatorValues & AuthenticatorEnrollmentDataValues & EnrollAuthenticatorValues;
|
|
15
|
-
export declare function authenticate(authClient:
|
|
15
|
+
export declare function authenticate(authClient: OktaAuthInterface, options?: AuthenticationOptions): Promise<IdxTransaction>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { RemediationValues } from '../remediators';
|
|
2
1
|
import { IdxAuthenticator, IdxRemediationValue } from '../types/idx-js';
|
|
3
2
|
export interface Credentials {
|
|
4
|
-
[key: string]: string;
|
|
3
|
+
[key: string]: string | undefined;
|
|
5
4
|
}
|
|
6
|
-
export declare abstract class Authenticator {
|
|
5
|
+
export declare abstract class Authenticator<Values> {
|
|
7
6
|
meta: IdxAuthenticator;
|
|
8
7
|
constructor(authenticator: IdxAuthenticator);
|
|
9
|
-
abstract canVerify(values:
|
|
10
|
-
abstract mapCredentials(values:
|
|
8
|
+
abstract canVerify(values: Values): boolean;
|
|
9
|
+
abstract mapCredentials(values: Values): Credentials;
|
|
11
10
|
abstract getInputs(idxRemediationValue: IdxRemediationValue): any;
|
|
12
11
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Authenticator } from './Authenticator';
|
|
2
|
-
export
|
|
3
|
-
password
|
|
4
|
-
}
|
|
5
|
-
export declare class OktaPassword extends Authenticator {
|
|
6
|
-
canVerify(values:
|
|
7
|
-
mapCredentials(values:
|
|
8
|
-
passcode: any;
|
|
9
|
-
};
|
|
1
|
+
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface OktaPasswordInputValues {
|
|
3
|
+
password?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class OktaPassword extends Authenticator<OktaPasswordInputValues> {
|
|
6
|
+
canVerify(values: OktaPasswordInputValues): boolean;
|
|
7
|
+
mapCredentials(values: OktaPasswordInputValues): Credentials;
|
|
10
8
|
getInputs(idxRemediationValue: any): any;
|
|
11
9
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Authenticator } from './Authenticator';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface SecurityQuestionEnrollValues {
|
|
3
|
+
questionKey?: string;
|
|
4
|
+
question?: string;
|
|
5
|
+
answer?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class SecurityQuestionEnrollment extends Authenticator<SecurityQuestionEnrollValues> {
|
|
8
|
+
canVerify(values: SecurityQuestionEnrollValues): boolean;
|
|
9
|
+
mapCredentials(values: SecurityQuestionEnrollValues): Credentials;
|
|
9
10
|
getInputs(): ({
|
|
10
11
|
name: string;
|
|
11
12
|
type: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Authenticator } from './Authenticator';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface SecurityQuestionVerificationValues {
|
|
3
|
+
answer?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class SecurityQuestionVerification extends Authenticator<SecurityQuestionVerificationValues> {
|
|
6
|
+
canVerify(values: SecurityQuestionVerificationValues): boolean;
|
|
7
|
+
mapCredentials(values: SecurityQuestionVerificationValues): Credentials;
|
|
8
8
|
getInputs(): {
|
|
9
9
|
name: string;
|
|
10
10
|
type: string;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface VerificationCodeValues {
|
|
3
|
+
verificationCode?: string;
|
|
4
|
+
otp?: string;
|
|
5
|
+
}
|
|
2
6
|
interface VerificationCodeCredentials extends Credentials {
|
|
3
7
|
passcode: string;
|
|
4
8
|
}
|
|
5
|
-
export declare class VerificationCodeAuthenticator extends Authenticator {
|
|
6
|
-
canVerify(values:
|
|
9
|
+
export declare class VerificationCodeAuthenticator extends Authenticator<VerificationCodeValues> {
|
|
10
|
+
canVerify(values: VerificationCodeValues): boolean;
|
|
7
11
|
mapCredentials(values: any): VerificationCodeCredentials | Credentials;
|
|
8
12
|
getInputs(idxRemediationValue: any): any;
|
|
9
13
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface WebauthnEnrollValues {
|
|
3
|
+
clientData?: string;
|
|
4
|
+
attestation?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {
|
|
7
|
+
canVerify(values: WebauthnEnrollValues): boolean;
|
|
8
|
+
mapCredentials(values: WebauthnEnrollValues): Credentials;
|
|
9
|
+
getInputs(): {
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
visible: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Authenticator, Credentials } from './Authenticator';
|
|
2
|
+
export interface WebauthnVerificationValues {
|
|
3
|
+
clientData?: string;
|
|
4
|
+
authenticatorData?: string;
|
|
5
|
+
signatureData?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {
|
|
8
|
+
canVerify(values: WebauthnVerificationValues): boolean;
|
|
9
|
+
mapCredentials(values: WebauthnVerificationValues): Credentials;
|
|
10
|
+
getInputs(): {
|
|
11
|
+
name: string;
|
|
12
|
+
type: string;
|
|
13
|
+
label: string;
|
|
14
|
+
required: boolean;
|
|
15
|
+
visible: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Authenticator } from './Authenticator';
|
|
2
2
|
import { IdxRemediation } from '../types/idx-js';
|
|
3
|
-
export declare function getAuthenticator(remediation: IdxRemediation): Authenticator
|
|
3
|
+
export declare function getAuthenticator(remediation: IdxRemediation): Authenticator<any>;
|
|
@@ -4,3 +4,12 @@ export * from './VerificationCodeAuthenticator';
|
|
|
4
4
|
export * from './OktaPassword';
|
|
5
5
|
export * from './SecurityQuestionEnrollment';
|
|
6
6
|
export * from './SecurityQuestionVerification';
|
|
7
|
+
export * from './WebauthnEnrollment';
|
|
8
|
+
export * from './WebauthnVerification';
|
|
9
|
+
import { OktaPasswordInputValues } from './OktaPassword';
|
|
10
|
+
import { SecurityQuestionEnrollValues } from './SecurityQuestionEnrollment';
|
|
11
|
+
import { SecurityQuestionVerificationValues } from './SecurityQuestionVerification';
|
|
12
|
+
import { VerificationCodeValues } from './VerificationCodeAuthenticator';
|
|
13
|
+
import { WebauthnEnrollValues } from './WebauthnEnrollment';
|
|
14
|
+
import { WebauthnVerificationValues } from './WebauthnVerification';
|
|
15
|
+
export declare type AuthenticatorValues = OktaPasswordInputValues & SecurityQuestionEnrollValues & SecurityQuestionVerificationValues & VerificationCodeValues & WebauthnEnrollValues & WebauthnVerificationValues;
|
package/lib/idx/cancel.d.ts
CHANGED
|
@@ -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, IdxOptions } from '../types';
|
|
13
13
|
export declare type CancelOptions = IdxOptions;
|
|
14
|
-
export declare function cancel(authClient:
|
|
14
|
+
export declare function cancel(authClient: OktaAuthInterface, options?: CancelOptions): Promise<import("./types").IdxTransaction>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { OktaAuthInterface } from '../types';
|
|
13
|
+
import CustomError from '../errors/CustomError';
|
|
14
|
+
export interface EmailVerifyCallbackResponse {
|
|
15
|
+
state: string;
|
|
16
|
+
otp: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class EmailVerifyCallbackError extends CustomError {
|
|
19
|
+
state: string;
|
|
20
|
+
otp: string;
|
|
21
|
+
constructor(state: string, otp: string);
|
|
22
|
+
}
|
|
23
|
+
export declare function isEmailVerifyCallbackError(error: Error): boolean;
|
|
24
|
+
export declare function isEmailVerifyCallback(urlPath: string): boolean;
|
|
25
|
+
export declare function parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse;
|
|
26
|
+
export declare function handleEmailVerifyCallback(authClient: OktaAuthInterface, search: string): Promise<import("./types").IdxTransaction | undefined>;
|
|
@@ -9,9 +9,5 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
stateTokenExternalId: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function isEmailVerifyCallback(urlPath: string): boolean;
|
|
17
|
-
export declare function parseEmailVerifyCallback(urlPath: string): EmailVerifyCallbackResponse;
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const AccountUnlockFlow: RemediationFlow;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OktaAuthInterface, FlowIdentifier } from '../../types';
|
|
2
2
|
import { RemediationFlow } from './RemediationFlow';
|
|
3
3
|
export interface FlowSpecification {
|
|
4
4
|
flow: FlowIdentifier;
|
|
5
5
|
remediators: RemediationFlow;
|
|
6
6
|
actions?: string[];
|
|
7
|
+
withCredentials?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function getFlowSpecification(oktaAuth:
|
|
9
|
+
export declare function getFlowSpecification(oktaAuth: OktaAuthInterface, flow?: FlowIdentifier): FlowSpecification;
|
package/lib/idx/flow/index.d.ts
CHANGED
package/lib/idx/headers.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
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 } from '../types';
|
|
14
14
|
export declare function setGlobalRequestInterceptor(fn: any): void;
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function clearGlobalRequestInterceptor(): void;
|
|
16
|
+
export declare function createGlobalRequestInterceptor(sdk: OktaAuthInterface): (requestConfig: any) => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2021-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
|
+
* Reusable interceptor interface
|
|
14
|
+
*/
|
|
15
|
+
export declare class Interceptor {
|
|
16
|
+
handlers: never[];
|
|
17
|
+
use(before: any): void;
|
|
18
|
+
clear(): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Singleton instance of the IdX HTTP Client
|
|
22
|
+
*
|
|
23
|
+
* Invoke the `use` method to add a new interceptor:
|
|
24
|
+
* - client.interceptors.request.use((requestConfig) => { some logic });
|
|
25
|
+
*/
|
|
26
|
+
export declare const HttpClient: {
|
|
27
|
+
interceptors: {
|
|
28
|
+
request: Interceptor;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const request: (target: any, { method, headers, credentials, body }: {
|
|
32
|
+
method?: string | undefined;
|
|
33
|
+
headers?: {} | undefined;
|
|
34
|
+
credentials?: string | undefined;
|
|
35
|
+
body: any;
|
|
36
|
+
}) => Promise<Response>;
|