@okta/okta-auth-js 5.7.0 → 5.10.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 +47 -0
- package/README.md +12 -2
- package/cjs/OktaAuth.js +88 -43
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/StorageManager.js +8 -0
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +24 -2
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +24 -12
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/constants.js +3 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/features.js +1 -1
- package/cjs/features.js.map +1 -1
- package/cjs/idx/authenticate.js +3 -18
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/Authenticator.js +14 -0
- package/cjs/idx/authenticator/Authenticator.js.map +1 -0
- package/cjs/idx/authenticator/OktaPassword.js +31 -0
- package/cjs/idx/authenticator/OktaPassword.js.map +1 -0
- package/cjs/idx/authenticator/OktaVerifyTotp.js +17 -0
- package/cjs/idx/authenticator/OktaVerifyTotp.js.map +1 -0
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js +50 -0
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -0
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +31 -0
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -0
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js +34 -0
- package/cjs/idx/authenticator/VerificationCodeAuthenticator.js.map +1 -0
- package/cjs/idx/authenticator/getAuthenticator.js +42 -0
- package/cjs/idx/authenticator/getAuthenticator.js.map +1 -0
- package/cjs/idx/authenticator/index.js +80 -0
- package/cjs/idx/authenticator/index.js.map +1 -0
- package/cjs/idx/cancel.js +5 -0
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js +32 -0
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js +39 -0
- package/cjs/idx/flow/FlowSpecification.js.map +1 -0
- package/cjs/idx/flow/PasswordRecoveryFlow.js +28 -0
- package/cjs/idx/flow/PasswordRecoveryFlow.js.map +1 -0
- package/{esm/crypto/browser.js → cjs/idx/flow/RegistrationFlow.js} +16 -12
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -0
- package/cjs/idx/flow/RemediationFlow.js +2 -0
- package/{esm/types/Cookies.js.map → cjs/idx/flow/RemediationFlow.js.map} +1 -1
- package/cjs/idx/flow/index.js +67 -0
- package/cjs/idx/flow/index.js.map +1 -0
- package/cjs/idx/index.js +39 -0
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +13 -4
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +24 -7
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/poll.js +59 -0
- package/cjs/idx/poll.js.map +1 -0
- package/cjs/idx/proceed.js +49 -0
- package/cjs/idx/proceed.js.map +1 -0
- package/cjs/idx/recoverPassword.js +3 -17
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +22 -20
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +61 -118
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +9 -12
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +6 -9
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +43 -32
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +51 -20
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +16 -16
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +8 -28
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/{esm/idx/remediators/RedirectIdp.js → cjs/idx/remediators/ChallengePoll.js} +13 -25
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -0
- package/cjs/idx/remediators/EnrollPoll.js +56 -0
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -0
- package/cjs/idx/remediators/Identify.js +4 -36
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js +23 -2
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/Skip.js +7 -0
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +26 -0
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/run.js +36 -16
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +2 -0
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +77 -39
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/FlowIdentifier.js +2 -0
- package/{esm/types/AuthState.js.map → cjs/idx/types/FlowIdentifier.js.map} +1 -1
- package/cjs/idx/types/idx-js.js +5 -0
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +18 -1
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +4 -1
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +2 -6
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +9 -5
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/urlParams.js +1 -1
- package/cjs/oidc/util/urlParams.js.map +1 -1
- package/cjs/options.js +12 -2
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +2 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/types/Token.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/{esm/clock.js → cjs/util/emailVerify.js} +14 -18
- package/cjs/util/emailVerify.js.map +1 -0
- package/cjs/util/index.js +13 -0
- package/cjs/util/index.js.map +1 -1
- package/dist/okta-auth-js.min.js +2 -74
- package/dist/okta-auth-js.min.js.LICENSE.txt +32 -0
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.polyfill.js +2 -18
- package/{esm/crypto/webcrypto.js → dist/okta-auth-js.polyfill.js.LICENSE.txt} +8 -4
- package/dist/okta-auth-js.polyfill.js.map +1 -1
- package/dist/okta-auth-js.umd.js +2 -74
- package/dist/okta-auth-js.umd.js.LICENSE.txt +32 -0
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +8580 -16
- package/esm/index.js.map +1 -1
- package/lib/OktaAuth.d.ts +6 -3
- package/lib/StorageManager.d.ts +1 -0
- package/lib/TokenManager.d.ts +2 -0
- package/lib/TransactionManager.d.ts +5 -1
- package/lib/constants.d.ts +1 -0
- package/lib/crypto/base64.d.ts +2 -2
- package/lib/crypto/oidcHash.d.ts +1 -1
- package/lib/crypto/verifyToken.d.ts +1 -1
- package/lib/idx/authenticator/Authenticator.d.ts +12 -0
- package/lib/idx/authenticator/OktaPassword.d.ts +11 -0
- package/lib/idx/authenticator/OktaVerifyTotp.d.ts +9 -0
- package/lib/idx/authenticator/SecurityQuestionEnrollment.d.ts +28 -0
- package/lib/idx/authenticator/SecurityQuestionVerification.d.ts +14 -0
- package/lib/idx/authenticator/VerificationCodeAuthenticator.d.ts +10 -0
- package/lib/idx/authenticator/getAuthenticator.d.ts +3 -0
- package/lib/idx/authenticator/index.d.ts +6 -0
- package/{esm/oidc/endpoints/index.js → lib/idx/flow/AuthenticationFlow.d.ts} +3 -5
- package/lib/idx/flow/FlowSpecification.d.ts +8 -0
- package/{esm/crypto/index.js → lib/idx/flow/PasswordRecoveryFlow.d.ts} +3 -6
- package/{esm/tx/TransactionState.js → lib/idx/flow/RegistrationFlow.d.ts} +3 -3
- package/lib/idx/flow/RemediationFlow.d.ts +13 -0
- package/lib/idx/{flowMonitors → flow}/index.d.ts +5 -4
- package/lib/idx/index.d.ts +3 -0
- package/lib/idx/interact.d.ts +1 -0
- package/lib/idx/introspect.d.ts +2 -1
- package/lib/idx/poll.d.ts +13 -0
- package/lib/idx/proceed.d.ts +21 -0
- package/lib/idx/register.d.ts +1 -1
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +9 -5
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +0 -1
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +8 -3
- package/lib/idx/remediators/Base/Remediator.d.ts +9 -6
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +5 -4
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +8 -4
- package/lib/idx/remediators/ChallengePoll.d.ts +15 -0
- package/{esm/tx/util.js → lib/idx/remediators/EnrollPoll.d.ts} +11 -13
- package/lib/idx/remediators/Identify.d.ts +1 -3
- package/lib/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +6 -2
- package/lib/idx/remediators/Skip.d.ts +3 -0
- package/lib/idx/remediators/index.d.ts +2 -0
- package/lib/idx/run.d.ts +8 -9
- package/lib/idx/transactionMeta.d.ts +28 -4
- package/lib/idx/types/FlowIdentifier.d.ts +1 -0
- package/lib/idx/types/idx-js.d.ts +53 -1
- package/lib/idx/types/index.d.ts +18 -4
- package/lib/oidc/util/loginRedirect.d.ts +1 -1
- package/lib/types/OktaAuthOptions.d.ts +3 -0
- package/lib/types/Token.d.ts +1 -0
- package/lib/types/Transaction.d.ts +2 -0
- package/lib/types/api.d.ts +15 -2
- package/lib/{idx/flowMonitors/AuthenticationFlowMonitor.d.ts → util/emailVerify.d.ts} +5 -3
- package/lib/util/index.d.ts +1 -0
- package/package.json +22 -13
- package/cjs/idx/flowMonitors/AuthenticationFlowMonitor.js +0 -45
- package/cjs/idx/flowMonitors/AuthenticationFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/FlowMonitor.js +0 -69
- package/cjs/idx/flowMonitors/FlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/PasswordRecoveryFlowMonitor.js +0 -55
- package/cjs/idx/flowMonitors/PasswordRecoveryFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/RegistrationFlowMonitor.js +0 -35
- package/cjs/idx/flowMonitors/RegistrationFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/index.js +0 -54
- package/cjs/idx/flowMonitors/index.js.map +0 -1
- package/esm/AuthStateManager.js +0 -214
- package/esm/AuthStateManager.js.map +0 -1
- package/esm/OktaAuth.js +0 -681
- package/esm/OktaAuth.js.map +0 -1
- package/esm/OktaUserAgent.js +0 -49
- package/esm/OktaUserAgent.js.map +0 -1
- package/esm/PromiseQueue.js +0 -71
- package/esm/PromiseQueue.js.map +0 -1
- package/esm/SavedObject.js +0 -91
- package/esm/SavedObject.js.map +0 -1
- package/esm/StorageManager.js +0 -182
- package/esm/StorageManager.js.map +0 -1
- package/esm/TokenManager.js +0 -455
- package/esm/TokenManager.js.map +0 -1
- package/esm/TransactionManager.js +0 -316
- package/esm/TransactionManager.js.map +0 -1
- package/esm/browser/browserStorage.js +0 -256
- package/esm/browser/browserStorage.js.map +0 -1
- package/esm/browser/fingerprint.js +0 -74
- package/esm/browser/fingerprint.js.map +0 -1
- package/esm/builderUtil.js +0 -56
- package/esm/builderUtil.js.map +0 -1
- package/esm/clock.js.map +0 -1
- package/esm/constants.js +0 -35
- package/esm/constants.js.map +0 -1
- package/esm/crypto/base64.js +0 -66
- package/esm/crypto/base64.js.map +0 -1
- package/esm/crypto/browser.js.map +0 -1
- package/esm/crypto/index.js.map +0 -1
- package/esm/crypto/node.js +0 -54
- package/esm/crypto/node.js.map +0 -1
- package/esm/crypto/oidcHash.js +0 -27
- package/esm/crypto/oidcHash.js.map +0 -1
- package/esm/crypto/verifyToken.js +0 -39
- package/esm/crypto/verifyToken.js.map +0 -1
- package/esm/crypto/webcrypto.js.map +0 -1
- package/esm/errors/AuthApiError.js +0 -30
- package/esm/errors/AuthApiError.js.map +0 -1
- package/esm/errors/AuthPollStopError.js +0 -20
- package/esm/errors/AuthPollStopError.js.map +0 -1
- package/esm/errors/AuthSdkError.js +0 -29
- package/esm/errors/AuthSdkError.js.map +0 -1
- package/esm/errors/CustomError.js +0 -21
- package/esm/errors/CustomError.js.map +0 -1
- package/esm/errors/OAuthError.js +0 -22
- package/esm/errors/OAuthError.js.map +0 -1
- package/esm/errors/index.js +0 -22
- package/esm/errors/index.js.map +0 -1
- package/esm/features.js +0 -64
- package/esm/features.js.map +0 -1
- package/esm/fetch/fetchRequest.js +0 -92
- package/esm/fetch/fetchRequest.js.map +0 -1
- package/esm/http/headers.js +0 -17
- package/esm/http/headers.js.map +0 -1
- package/esm/http/index.js +0 -3
- package/esm/http/index.js.map +0 -1
- package/esm/http/request.js +0 -145
- package/esm/http/request.js.map +0 -1
- package/esm/idx/authenticate.js +0 -47
- package/esm/idx/authenticate.js.map +0 -1
- package/esm/idx/cancel.js +0 -32
- package/esm/idx/cancel.js.map +0 -1
- package/esm/idx/flowMonitors/AuthenticationFlowMonitor.js +0 -41
- package/esm/idx/flowMonitors/AuthenticationFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/FlowMonitor.js +0 -73
- package/esm/idx/flowMonitors/FlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/PasswordRecoveryFlowMonitor.js +0 -57
- package/esm/idx/flowMonitors/PasswordRecoveryFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/RegistrationFlowMonitor.js +0 -28
- package/esm/idx/flowMonitors/RegistrationFlowMonitor.js.map +0 -1
- package/esm/idx/flowMonitors/index.js +0 -16
- package/esm/idx/flowMonitors/index.js.map +0 -1
- package/esm/idx/handleInteractionCodeRedirect.js +0 -64
- package/esm/idx/handleInteractionCodeRedirect.js.map +0 -1
- package/esm/idx/headers.js +0 -39
- package/esm/idx/headers.js.map +0 -1
- package/esm/idx/index.js +0 -20
- package/esm/idx/index.js.map +0 -1
- package/esm/idx/interact.js +0 -83
- package/esm/idx/interact.js.map +0 -1
- package/esm/idx/introspect.js +0 -45
- package/esm/idx/introspect.js.map +0 -1
- package/esm/idx/recoverPassword.js +0 -46
- package/esm/idx/recoverPassword.js.map +0 -1
- package/esm/idx/register.js +0 -63
- package/esm/idx/register.js.map +0 -1
- package/esm/idx/remediate.js +0 -302
- package/esm/idx/remediate.js.map +0 -1
- package/esm/idx/remediators/AuthenticatorEnrollmentData.js +0 -68
- package/esm/idx/remediators/AuthenticatorEnrollmentData.js.map +0 -1
- package/esm/idx/remediators/AuthenticatorVerificationData.js +0 -66
- package/esm/idx/remediators/AuthenticatorVerificationData.js.map +0 -1
- package/esm/idx/remediators/Base/AuthenticatorData.js +0 -105
- package/esm/idx/remediators/Base/AuthenticatorData.js.map +0 -1
- package/esm/idx/remediators/Base/Remediator.js +0 -221
- package/esm/idx/remediators/Base/Remediator.js.map +0 -1
- package/esm/idx/remediators/Base/SelectAuthenticator.js +0 -140
- package/esm/idx/remediators/Base/SelectAuthenticator.js.map +0 -1
- package/esm/idx/remediators/Base/VerifyAuthenticator.js +0 -65
- package/esm/idx/remediators/Base/VerifyAuthenticator.js.map +0 -1
- package/esm/idx/remediators/ChallengeAuthenticator.js +0 -18
- package/esm/idx/remediators/ChallengeAuthenticator.js.map +0 -1
- package/esm/idx/remediators/EnrollAuthenticator.js +0 -18
- package/esm/idx/remediators/EnrollAuthenticator.js.map +0 -1
- package/esm/idx/remediators/EnrollProfile.js +0 -79
- package/esm/idx/remediators/EnrollProfile.js.map +0 -1
- package/esm/idx/remediators/Identify.js +0 -87
- package/esm/idx/remediators/Identify.js.map +0 -1
- package/esm/idx/remediators/ReEnrollAuthenticator.js +0 -45
- package/esm/idx/remediators/ReEnrollAuthenticator.js.map +0 -1
- package/esm/idx/remediators/RedirectIdp.js.map +0 -1
- package/esm/idx/remediators/ResetAuthenticator.js +0 -18
- package/esm/idx/remediators/ResetAuthenticator.js.map +0 -1
- package/esm/idx/remediators/SelectAuthenticatorAuthenticate.js +0 -18
- package/esm/idx/remediators/SelectAuthenticatorAuthenticate.js.map +0 -1
- package/esm/idx/remediators/SelectAuthenticatorEnroll.js +0 -18
- package/esm/idx/remediators/SelectAuthenticatorEnroll.js.map +0 -1
- package/esm/idx/remediators/SelectEnrollProfile.js +0 -24
- package/esm/idx/remediators/SelectEnrollProfile.js.map +0 -1
- package/esm/idx/remediators/Skip.js +0 -23
- package/esm/idx/remediators/Skip.js.map +0 -1
- package/esm/idx/remediators/index.js +0 -26
- package/esm/idx/remediators/index.js.map +0 -1
- package/esm/idx/remediators/util.js +0 -35
- package/esm/idx/remediators/util.js.map +0 -1
- package/esm/idx/run.js +0 -201
- package/esm/idx/run.js.map +0 -1
- package/esm/idx/startTransaction.js +0 -27
- package/esm/idx/startTransaction.js.map +0 -1
- package/esm/idx/transactionMeta.js +0 -114
- package/esm/idx/transactionMeta.js.map +0 -1
- package/esm/idx/types/idx-js.js +0 -17
- package/esm/idx/types/idx-js.js.map +0 -1
- package/esm/idx/types/index.js +0 -44
- package/esm/idx/types/index.js.map +0 -1
- package/esm/oidc/decodeToken.js +0 -31
- package/esm/oidc/decodeToken.js.map +0 -1
- package/esm/oidc/endpoints/authorize.js +0 -61
- package/esm/oidc/endpoints/authorize.js.map +0 -1
- package/esm/oidc/endpoints/index.js.map +0 -1
- package/esm/oidc/endpoints/token.js +0 -97
- package/esm/oidc/endpoints/token.js.map +0 -1
- package/esm/oidc/endpoints/well-known.js +0 -58
- package/esm/oidc/endpoints/well-known.js.map +0 -1
- package/esm/oidc/exchangeCodeForTokens.js +0 -69
- package/esm/oidc/exchangeCodeForTokens.js.map +0 -1
- package/esm/oidc/getToken.js +0 -180
- package/esm/oidc/getToken.js.map +0 -1
- package/esm/oidc/getUserInfo.js +0 -82
- package/esm/oidc/getUserInfo.js.map +0 -1
- package/esm/oidc/getWithPopup.js +0 -34
- package/esm/oidc/getWithPopup.js.map +0 -1
- package/esm/oidc/getWithRedirect.js +0 -65
- package/esm/oidc/getWithRedirect.js.map +0 -1
- package/esm/oidc/getWithoutPrompt.js +0 -29
- package/esm/oidc/getWithoutPrompt.js.map +0 -1
- package/esm/oidc/handleOAuthResponse.js +0 -148
- package/esm/oidc/handleOAuthResponse.js.map +0 -1
- package/esm/oidc/index.js +0 -29
- package/esm/oidc/index.js.map +0 -1
- package/esm/oidc/parseFromUrl.js +0 -144
- package/esm/oidc/parseFromUrl.js.map +0 -1
- package/esm/oidc/renewToken.js +0 -85
- package/esm/oidc/renewToken.js.map +0 -1
- package/esm/oidc/renewTokens.js +0 -74
- package/esm/oidc/renewTokens.js.map +0 -1
- package/esm/oidc/renewTokensWithRefresh.js +0 -55
- package/esm/oidc/renewTokensWithRefresh.js.map +0 -1
- package/esm/oidc/revokeToken.js +0 -57
- package/esm/oidc/revokeToken.js.map +0 -1
- package/esm/oidc/util/browser.js +0 -74
- package/esm/oidc/util/browser.js.map +0 -1
- package/esm/oidc/util/defaultTokenParams.js +0 -42
- package/esm/oidc/util/defaultTokenParams.js.map +0 -1
- package/esm/oidc/util/errors.js +0 -31
- package/esm/oidc/util/errors.js.map +0 -1
- package/esm/oidc/util/index.js +0 -25
- package/esm/oidc/util/index.js.map +0 -1
- package/esm/oidc/util/loginRedirect.js +0 -84
- package/esm/oidc/util/loginRedirect.js.map +0 -1
- package/esm/oidc/util/oauth.js +0 -70
- package/esm/oidc/util/oauth.js.map +0 -1
- package/esm/oidc/util/pkce.js +0 -55
- package/esm/oidc/util/pkce.js.map +0 -1
- package/esm/oidc/util/prepareTokenParams.js +0 -75
- package/esm/oidc/util/prepareTokenParams.js.map +0 -1
- package/esm/oidc/util/refreshToken.js +0 -24
- package/esm/oidc/util/refreshToken.js.map +0 -1
- package/esm/oidc/util/urlParams.js +0 -54
- package/esm/oidc/util/urlParams.js.map +0 -1
- package/esm/oidc/util/validateClaims.js +0 -53
- package/esm/oidc/util/validateClaims.js.map +0 -1
- package/esm/oidc/util/validateToken.js +0 -21
- package/esm/oidc/util/validateToken.js.map +0 -1
- package/esm/oidc/verifyToken.js +0 -78
- package/esm/oidc/verifyToken.js.map +0 -1
- package/esm/options.js +0 -134
- package/esm/options.js.map +0 -1
- package/esm/server/serverStorage.js +0 -110
- package/esm/server/serverStorage.js.map +0 -1
- package/esm/services/TokenService.js +0 -103
- package/esm/services/TokenService.js.map +0 -1
- package/esm/session.js +0 -81
- package/esm/session.js.map +0 -1
- package/esm/tx/AuthTransaction.js +0 -213
- package/esm/tx/AuthTransaction.js.map +0 -1
- package/esm/tx/TransactionState.js.map +0 -1
- package/esm/tx/api.js +0 -87
- package/esm/tx/api.js.map +0 -1
- package/esm/tx/index.js +0 -18
- package/esm/tx/index.js.map +0 -1
- package/esm/tx/poll.js +0 -124
- package/esm/tx/poll.js.map +0 -1
- package/esm/tx/util.js.map +0 -1
- package/esm/types/AuthState.js +0 -3
- package/esm/types/Cookies.js +0 -3
- package/esm/types/EventEmitter.js +0 -3
- package/esm/types/EventEmitter.js.map +0 -1
- package/esm/types/JWT.js +0 -3
- package/esm/types/JWT.js.map +0 -1
- package/esm/types/OAuth.js +0 -3
- package/esm/types/OAuth.js.map +0 -1
- package/esm/types/OktaAuthOptions.js +0 -3
- package/esm/types/OktaAuthOptions.js.map +0 -1
- package/esm/types/Storage.js +0 -3
- package/esm/types/Storage.js.map +0 -1
- package/esm/types/Token.js +0 -29
- package/esm/types/Token.js.map +0 -1
- package/esm/types/TokenManager.js +0 -3
- package/esm/types/TokenManager.js.map +0 -1
- package/esm/types/Transaction.js +0 -57
- package/esm/types/Transaction.js.map +0 -1
- package/esm/types/UserClaims.js +0 -3
- package/esm/types/UserClaims.js.map +0 -1
- package/esm/types/api.js +0 -3
- package/esm/types/api.js.map +0 -1
- package/esm/types/http.js +0 -3
- package/esm/types/http.js.map +0 -1
- package/esm/types/index.js +0 -27
- package/esm/types/index.js.map +0 -1
- package/esm/util/console.js +0 -53
- package/esm/util/console.js.map +0 -1
- package/esm/util/index.js +0 -17
- package/esm/util/index.js.map +0 -1
- package/esm/util/misc.js +0 -33
- package/esm/util/misc.js.map +0 -1
- package/esm/util/object.js +0 -117
- package/esm/util/object.js.map +0 -1
- package/esm/util/sharedStorage.js +0 -43
- package/esm/util/sharedStorage.js.map +0 -1
- package/esm/util/types.js +0 -27
- package/esm/util/types.js.map +0 -1
- package/esm/util/url.js +0 -64
- package/esm/util/url.js.map +0 -1
- package/lib/idx/flowMonitors/FlowMonitor.d.ts +0 -23
- package/lib/idx/flowMonitors/PasswordRecoveryFlowMonitor.d.ts +0 -16
- package/lib/idx/flowMonitors/RegistrationFlowMonitor.d.ts +0 -15
|
@@ -1,74 +0,0 @@
|
|
|
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 { AuthSdkError } from '../errors';
|
|
13
|
-
import { isFingerprintSupported } from '../features';
|
|
14
|
-
import { addListener, removeListener } from '../oidc';
|
|
15
|
-
export default function fingerprint(sdk, options) {
|
|
16
|
-
options = options || {};
|
|
17
|
-
|
|
18
|
-
if (!isFingerprintSupported()) {
|
|
19
|
-
return Promise.reject(new AuthSdkError('Fingerprinting is not supported on this device'));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var timeout;
|
|
23
|
-
var iframe;
|
|
24
|
-
var listener;
|
|
25
|
-
var promise = new Promise(function (resolve, reject) {
|
|
26
|
-
iframe = document.createElement('iframe');
|
|
27
|
-
iframe.style.display = 'none'; // eslint-disable-next-line complexity
|
|
28
|
-
|
|
29
|
-
listener = function listener(e) {
|
|
30
|
-
if (!e || !e.data || e.origin !== sdk.getIssuerOrigin()) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
var msg = JSON.parse(e.data);
|
|
36
|
-
} catch (err) {
|
|
37
|
-
// iframe messages should all be parsable
|
|
38
|
-
// skip not parsable messages come from other sources in same origin (browser extensions)
|
|
39
|
-
// TODO: add namespace flag in okta-core to distinguish messages that come from other sources
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!msg) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (msg.type === 'FingerprintAvailable') {
|
|
48
|
-
return resolve(msg.fingerprint);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (msg.type === 'FingerprintServiceReady') {
|
|
52
|
-
e.source.postMessage(JSON.stringify({
|
|
53
|
-
type: 'GetFingerprint'
|
|
54
|
-
}), e.origin);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
addListener(window, 'message', listener);
|
|
59
|
-
iframe.src = sdk.getIssuerOrigin() + '/auth/services/devicefingerprint';
|
|
60
|
-
document.body.appendChild(iframe);
|
|
61
|
-
timeout = setTimeout(function () {
|
|
62
|
-
reject(new AuthSdkError('Fingerprinting timed out'));
|
|
63
|
-
}, options.timeout || 15000);
|
|
64
|
-
});
|
|
65
|
-
return promise.finally(function () {
|
|
66
|
-
clearTimeout(timeout);
|
|
67
|
-
removeListener(window, 'message', listener);
|
|
68
|
-
|
|
69
|
-
if (document.body.contains(iframe)) {
|
|
70
|
-
iframe.parentElement.removeChild(iframe);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=fingerprint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/browser/fingerprint.ts"],"names":["AuthSdkError","isFingerprintSupported","addListener","removeListener","fingerprint","sdk","options","Promise","reject","timeout","iframe","listener","promise","resolve","document","createElement","style","display","e","data","origin","getIssuerOrigin","msg","JSON","parse","err","type","source","postMessage","stringify","window","src","body","appendChild","setTimeout","finally","clearTimeout","contains","parentElement","removeChild"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,YAAT,QAA6B,WAA7B;AACA,SAASC,sBAAT,QAAuC,aAAvC;AACA,SACEC,WADF,EAEEC,cAFF,QAGO,SAHP;AAMA,eAAe,SAASC,WAAT,CAAqBC,GAArB,EAAoCC,OAApC,EAAiE;AAC9EA,EAAAA,OAAO,GAAGA,OAAO,IAAI,EAArB;;AAEA,MAAI,CAACL,sBAAsB,EAA3B,EAA+B;AAC7B,WAAOM,OAAO,CAACC,MAAR,CAAe,IAAIR,YAAJ,CAAiB,gDAAjB,CAAf,CAAP;AACD;;AAED,MAAIS,OAAJ;AACA,MAAIC,MAAJ;AACA,MAAIC,QAAJ;AACA,MAAIC,OAAO,GAAG,IAAIL,OAAJ,CAAY,UAAUM,OAAV,EAAmBL,MAAnB,EAA2B;AACnDE,IAAAA,MAAM,GAAGI,QAAQ,CAACC,aAAT,CAAuB,QAAvB,CAAT;AACAL,IAAAA,MAAM,CAACM,KAAP,CAAaC,OAAb,GAAuB,MAAvB,CAFmD,CAInD;;AACAN,IAAAA,QAAQ,GAAG,SAASA,QAAT,CAAkBO,CAAlB,EAAqB;AAC9B,UAAI,CAACA,CAAD,IAAM,CAACA,CAAC,CAACC,IAAT,IAAiBD,CAAC,CAACE,MAAF,KAAaf,GAAG,CAACgB,eAAJ,EAAlC,EAAyD;AACvD;AACD;;AAED,UAAI;AACF,YAAIC,GAAG,GAAGC,IAAI,CAACC,KAAL,CAAWN,CAAC,CAACC,IAAb,CAAV;AACD,OAFD,CAEE,OAAOM,GAAP,EAAY;AACZ;AACA;AACA;AACA;AACD;;AAED,UAAI,CAACH,GAAL,EAAU;AAAE;AAAS;;AACrB,UAAIA,GAAG,CAACI,IAAJ,KAAa,sBAAjB,EAAyC;AACvC,eAAOb,OAAO,CAACS,GAAG,CAAClB,WAAL,CAAd;AACD;;AACD,UAAIkB,GAAG,CAACI,IAAJ,KAAa,yBAAjB,EAA4C;AAC1CR,QAAAA,CAAC,CAACS,MAAF,CAASC,WAAT,CAAqBL,IAAI,CAACM,SAAL,CAAe;AAClCH,UAAAA,IAAI,EAAE;AAD4B,SAAf,CAArB,EAEIR,CAAC,CAACE,MAFN;AAGD;AACF,KAvBD;;AAwBAlB,IAAAA,WAAW,CAAC4B,MAAD,EAAS,SAAT,EAAoBnB,QAApB,CAAX;AAEAD,IAAAA,MAAM,CAACqB,GAAP,GAAa1B,GAAG,CAACgB,eAAJ,KAAwB,kCAArC;AACAP,IAAAA,QAAQ,CAACkB,IAAT,CAAcC,WAAd,CAA0BvB,MAA1B;AAEAD,IAAAA,OAAO,GAAGyB,UAAU,CAAC,YAAW;AAC9B1B,MAAAA,MAAM,CAAC,IAAIR,YAAJ,CAAiB,0BAAjB,CAAD,CAAN;AACD,KAFmB,EAEjBM,OAAO,CAACG,OAAR,IAAmB,KAFF,CAApB;AAGD,GArCa,CAAd;AAuCA,SAAOG,OAAO,CAACuB,OAAR,CAAgB,YAAW;AAChCC,IAAAA,YAAY,CAAC3B,OAAD,CAAZ;AACAN,IAAAA,cAAc,CAAC2B,MAAD,EAAS,SAAT,EAAoBnB,QAApB,CAAd;;AACA,QAAIG,QAAQ,CAACkB,IAAT,CAAcK,QAAd,CAAuB3B,MAAvB,CAAJ,EAAoC;AAClCA,MAAAA,MAAM,CAAC4B,aAAP,CAAqBC,WAArB,CAAiC7B,MAAjC;AACD;AACF,GANM,CAAP;AAOD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { OktaAuth } from '../types';\nimport { AuthSdkError } from '../errors';\nimport { isFingerprintSupported } from '../features';\nimport {\n addListener,\n removeListener\n} from '../oidc';\nimport { FingerprintOptions } from '../types';\n\nexport default function fingerprint(sdk: OktaAuth, options: FingerprintOptions) {\n options = options || {};\n\n if (!isFingerprintSupported()) {\n return Promise.reject(new AuthSdkError('Fingerprinting is not supported on this device'));\n }\n\n var timeout;\n var iframe;\n var listener;\n var promise = new Promise(function (resolve, reject) {\n iframe = document.createElement('iframe');\n iframe.style.display = 'none';\n\n // eslint-disable-next-line complexity\n listener = function listener(e) {\n if (!e || !e.data || e.origin !== sdk.getIssuerOrigin()) {\n return;\n }\n\n try {\n var msg = JSON.parse(e.data);\n } catch (err) {\n // iframe messages should all be parsable\n // skip not parsable messages come from other sources in same origin (browser extensions)\n // TODO: add namespace flag in okta-core to distinguish messages that come from other sources\n return;\n }\n\n if (!msg) { return; }\n if (msg.type === 'FingerprintAvailable') {\n return resolve(msg.fingerprint);\n }\n if (msg.type === 'FingerprintServiceReady') {\n e.source.postMessage(JSON.stringify({\n type: 'GetFingerprint'\n }), e.origin);\n }\n };\n addListener(window, 'message', listener);\n\n iframe.src = sdk.getIssuerOrigin() + '/auth/services/devicefingerprint';\n document.body.appendChild(iframe);\n\n timeout = setTimeout(function() {\n reject(new AuthSdkError('Fingerprinting timed out'));\n }, options.timeout || 15000);\n });\n\n return promise.finally(function() {\n clearTimeout(timeout);\n removeListener(window, 'message', listener);\n if (document.body.contains(iframe)) {\n iframe.parentElement.removeChild(iframe);\n }\n });\n}\n"],"file":"fingerprint.js"}
|
package/esm/builderUtil.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2018-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 AuthSdkError from './errors/AuthSdkError';
|
|
13
|
-
|
|
14
|
-
// TODO: use @okta/configuration-validation (move module to this monorepo?)
|
|
15
|
-
// eslint-disable-next-line complexity
|
|
16
|
-
function assertValidConfig(args) {
|
|
17
|
-
args = args || {};
|
|
18
|
-
var scopes = args.scopes;
|
|
19
|
-
|
|
20
|
-
if (scopes && !Array.isArray(scopes)) {
|
|
21
|
-
throw new AuthSdkError('scopes must be a array of strings. ' + 'Required usage: new OktaAuth({scopes: ["openid", "email"]})');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var issuer = args.issuer;
|
|
25
|
-
|
|
26
|
-
if (!issuer) {
|
|
27
|
-
throw new AuthSdkError('No issuer passed to constructor. ' + 'Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var isUrlRegex = new RegExp('^http?s?://.+');
|
|
31
|
-
|
|
32
|
-
if (!isUrlRegex.test(args.issuer)) {
|
|
33
|
-
throw new AuthSdkError('Issuer must be a valid URL. ' + 'Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com/oauth2/{authServerId}"})');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (issuer.indexOf('-admin.') !== -1) {
|
|
37
|
-
throw new AuthSdkError('Issuer URL passed to constructor contains "-admin" in subdomain. ' + 'Required usage: new OktaAuth({issuer: "https://{yourOktaDomain}.com})');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function getUserAgent(args, sdkValue) {
|
|
42
|
-
var userAgent = args.userAgent || {};
|
|
43
|
-
|
|
44
|
-
if (userAgent.value) {
|
|
45
|
-
return userAgent.value;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (userAgent.template) {
|
|
49
|
-
return userAgent.template.replace('$OKTA_AUTH_JS', sdkValue);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return sdkValue;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { assertValidConfig, getUserAgent };
|
|
56
|
-
//# sourceMappingURL=builderUtil.js.map
|
package/esm/builderUtil.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../lib/builderUtil.ts"],"names":["AuthSdkError","assertValidConfig","args","scopes","Array","isArray","issuer","isUrlRegex","RegExp","test","indexOf","getUserAgent","sdkValue","userAgent","value","template","replace"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,YAAP,MAAyB,uBAAzB;;AAGA;AACA;AACA,SAASC,iBAAT,CAA2BC,IAA3B,EAAkD;AAChDA,EAAAA,IAAI,GAAGA,IAAI,IAAI,EAAf;AAEA,MAAIC,MAAM,GAAGD,IAAI,CAACC,MAAlB;;AACA,MAAIA,MAAM,IAAI,CAACC,KAAK,CAACC,OAAN,CAAcF,MAAd,CAAf,EAAsC;AACpC,UAAM,IAAIH,YAAJ,CAAiB,wCACrB,6DADI,CAAN;AAED;;AAED,MAAIM,MAAM,GAAGJ,IAAI,CAACI,MAAlB;;AACA,MAAI,CAACA,MAAL,EAAa;AACX,UAAM,IAAIN,YAAJ,CAAiB,sCACrB,8FADI,CAAN;AAED;;AAED,MAAIO,UAAU,GAAG,IAAIC,MAAJ,CAAW,eAAX,CAAjB;;AACA,MAAI,CAACD,UAAU,CAACE,IAAX,CAAgBP,IAAI,CAACI,MAArB,CAAL,EAAmC;AACjC,UAAM,IAAIN,YAAJ,CAAiB,iCACrB,8FADI,CAAN;AAED;;AAED,MAAIM,MAAM,CAACI,OAAP,CAAe,SAAf,MAA8B,CAAC,CAAnC,EAAsC;AACpC,UAAM,IAAIV,YAAJ,CAAiB,sEACrB,uEADI,CAAN;AAED;AACF;;AAED,SAASW,YAAT,CAAsBT,IAAtB,EAA6CU,QAA7C,EAAuE;AACrE,MAAIC,SAAS,GAAGX,IAAI,CAACW,SAAL,IAAkB,EAAlC;;AAEA,MAAIA,SAAS,CAACC,KAAd,EAAqB;AACnB,WAAOD,SAAS,CAACC,KAAjB;AACD;;AAED,MAAID,SAAS,CAACE,QAAd,EAAwB;AACtB,WAAOF,SAAS,CAACE,QAAV,CAAmBC,OAAnB,CAA2B,eAA3B,EAA4CJ,QAA5C,CAAP;AACD;;AAED,SAAOA,QAAP;AACD;;AAED,SACEX,iBADF,EAEEU,YAFF","sourcesContent":["/*!\n * Copyright (c) 2018-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport AuthSdkError from './errors/AuthSdkError';\nimport { OktaAuthOptions } from './types';\n\n// TODO: use @okta/configuration-validation (move module to this monorepo?)\n// eslint-disable-next-line complexity\nfunction assertValidConfig(args: OktaAuthOptions) {\n args = args || {};\n\n var scopes = args.scopes;\n if (scopes && !Array.isArray(scopes)) {\n throw new AuthSdkError('scopes must be a array of strings. ' +\n 'Required usage: new OktaAuth({scopes: [\"openid\", \"email\"]})');\n }\n\n var issuer = args.issuer;\n if (!issuer) {\n throw new AuthSdkError('No issuer passed to constructor. ' + \n 'Required usage: new OktaAuth({issuer: \"https://{yourOktaDomain}.com/oauth2/{authServerId}\"})');\n }\n\n var isUrlRegex = new RegExp('^http?s?://.+');\n if (!isUrlRegex.test(args.issuer)) {\n throw new AuthSdkError('Issuer must be a valid URL. ' + \n 'Required usage: new OktaAuth({issuer: \"https://{yourOktaDomain}.com/oauth2/{authServerId}\"})');\n }\n\n if (issuer.indexOf('-admin.') !== -1) {\n throw new AuthSdkError('Issuer URL passed to constructor contains \"-admin\" in subdomain. ' +\n 'Required usage: new OktaAuth({issuer: \"https://{yourOktaDomain}.com})');\n }\n}\n\nfunction getUserAgent(args: OktaAuthOptions, sdkValue: string): string {\n var userAgent = args.userAgent || {};\n\n if (userAgent.value) {\n return userAgent.value;\n }\n\n if (userAgent.template) {\n return userAgent.template.replace('$OKTA_AUTH_JS', sdkValue);\n }\n\n return sdkValue;\n}\n\nexport {\n assertValidConfig,\n getUserAgent\n};\n"],"file":"builderUtil.js"}
|
package/esm/clock.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../lib/clock.ts"],"names":["SdkClock","constructor","localOffset","parseInt","create","now","Date"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,eAAe,MAAMA,QAAN,CAAe;AAG5BC,EAAAA,WAAW,CAACC,WAAD,EAAc;AACvB;AACA,SAAKA,WAAL,GAAmBC,QAAQ,CAACD,WAAW,IAAI,CAAhB,CAA3B;AACD,GAN2B,CAQ5B;;;AACa,SAANE,MAAM,GAA+B;AAC1C;AACA,QAAIF,WAAW,GAAG,CAAlB;AACA,WAAO,IAAIF,QAAJ,CAAaE,WAAb,CAAP;AACD,GAb2B,CAe5B;;;AACAG,EAAAA,GAAG,GAAG;AACJ,QAAIA,GAAG,GAAG,CAACC,IAAI,CAACD,GAAL,KAAa,KAAKH,WAAnB,IAAkC,IAA5C;AACA,WAAOG,GAAP;AACD;;AAnB2B","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport default class SdkClock {\n localOffset: number;\n\n constructor(localOffset) {\n // Calculated local clock offset from server time (in milliseconds). Can be positive or negative.\n this.localOffset = parseInt(localOffset || 0);\n }\n\n // factory method. Create an instance of a clock from current context.\n static create(/* sdk, options */): SdkClock {\n // TODO: calculate localOffset\n var localOffset = 0;\n return new SdkClock(localOffset);\n }\n\n // Return the current time (in seconds)\n now() {\n var now = (Date.now() + this.localOffset) / 1000;\n return now;\n }\n}\n"],"file":"clock.js"}
|
package/esm/constants.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
export var STATE_TOKEN_KEY_NAME = 'oktaStateToken';
|
|
13
|
-
export var DEFAULT_POLLING_DELAY = 500;
|
|
14
|
-
export var DEFAULT_MAX_CLOCK_SKEW = 300;
|
|
15
|
-
export var DEFAULT_CACHE_DURATION = 86400;
|
|
16
|
-
export var REDIRECT_OAUTH_PARAMS_NAME = 'okta-oauth-redirect-params';
|
|
17
|
-
export var REDIRECT_STATE_COOKIE_NAME = 'okta-oauth-state';
|
|
18
|
-
export var REDIRECT_NONCE_COOKIE_NAME = 'okta-oauth-nonce';
|
|
19
|
-
export var TOKEN_STORAGE_NAME = 'okta-token-storage';
|
|
20
|
-
export var CACHE_STORAGE_NAME = 'okta-cache-storage';
|
|
21
|
-
export var PKCE_STORAGE_NAME = 'okta-pkce-storage';
|
|
22
|
-
export var TRANSACTION_STORAGE_NAME = 'okta-transaction-storage';
|
|
23
|
-
export var SHARED_TRANSACTION_STORAGE_NAME = 'okta-shared-transaction-storage';
|
|
24
|
-
export var IDX_RESPONSE_STORAGE_NAME = 'okta-idx-response-storage';
|
|
25
|
-
export var ACCESS_TOKEN_STORAGE_KEY = 'accessToken';
|
|
26
|
-
export var ID_TOKEN_STORAGE_KEY = 'idToken';
|
|
27
|
-
export var REFRESH_TOKEN_STORAGE_KEY = 'refreshToken';
|
|
28
|
-
export var REFERRER_PATH_STORAGE_KEY = 'referrerPath'; // Code verifier: Random URL-safe string with a minimum length of 43 characters.
|
|
29
|
-
// Code challenge: Base64 URL-encoded SHA-256 hash of the code verifier.
|
|
30
|
-
|
|
31
|
-
export var MIN_VERIFIER_LENGTH = 43;
|
|
32
|
-
export var MAX_VERIFIER_LENGTH = 128;
|
|
33
|
-
export var DEFAULT_CODE_CHALLENGE_METHOD = 'S256';
|
|
34
|
-
export var IDX_API_VERSION = '1.0.0';
|
|
35
|
-
//# sourceMappingURL=constants.js.map
|
package/esm/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../lib/constants.ts"],"names":["STATE_TOKEN_KEY_NAME","DEFAULT_POLLING_DELAY","DEFAULT_MAX_CLOCK_SKEW","DEFAULT_CACHE_DURATION","REDIRECT_OAUTH_PARAMS_NAME","REDIRECT_STATE_COOKIE_NAME","REDIRECT_NONCE_COOKIE_NAME","TOKEN_STORAGE_NAME","CACHE_STORAGE_NAME","PKCE_STORAGE_NAME","TRANSACTION_STORAGE_NAME","SHARED_TRANSACTION_STORAGE_NAME","IDX_RESPONSE_STORAGE_NAME","ACCESS_TOKEN_STORAGE_KEY","ID_TOKEN_STORAGE_KEY","REFRESH_TOKEN_STORAGE_KEY","REFERRER_PATH_STORAGE_KEY","MIN_VERIFIER_LENGTH","MAX_VERIFIER_LENGTH","DEFAULT_CODE_CHALLENGE_METHOD","IDX_API_VERSION"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,IAAMA,oBAAoB,GAAG,gBAA7B;AACP,OAAO,IAAMC,qBAAqB,GAAG,GAA9B;AACP,OAAO,IAAMC,sBAAsB,GAAG,GAA/B;AACP,OAAO,IAAMC,sBAAsB,GAAG,KAA/B;AACP,OAAO,IAAMC,0BAA0B,GAAG,4BAAnC;AACP,OAAO,IAAMC,0BAA0B,GAAG,kBAAnC;AACP,OAAO,IAAMC,0BAA0B,GAAG,kBAAnC;AACP,OAAO,IAAMC,kBAAkB,GAAG,oBAA3B;AACP,OAAO,IAAMC,kBAAkB,GAAG,oBAA3B;AACP,OAAO,IAAMC,iBAAiB,GAAG,mBAA1B;AACP,OAAO,IAAMC,wBAAwB,GAAG,0BAAjC;AACP,OAAO,IAAMC,+BAA+B,GAAG,iCAAxC;AACP,OAAO,IAAMC,yBAAyB,GAAG,2BAAlC;AACP,OAAO,IAAMC,wBAAwB,GAAG,aAAjC;AACP,OAAO,IAAMC,oBAAoB,GAAI,SAA9B;AACP,OAAO,IAAMC,yBAAyB,GAAI,cAAnC;AACP,OAAO,IAAMC,yBAAyB,GAAG,cAAlC,C,CAEP;AACA;;AACA,OAAO,IAAMC,mBAAmB,GAAG,EAA5B;AACP,OAAO,IAAMC,mBAAmB,GAAG,GAA5B;AACP,OAAO,IAAMC,6BAA6B,GAAG,MAAtC;AAEP,OAAO,IAAMC,eAAe,GAAG,OAAxB","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport const STATE_TOKEN_KEY_NAME = 'oktaStateToken';\nexport const DEFAULT_POLLING_DELAY = 500;\nexport const DEFAULT_MAX_CLOCK_SKEW = 300;\nexport const DEFAULT_CACHE_DURATION = 86400;\nexport const REDIRECT_OAUTH_PARAMS_NAME = 'okta-oauth-redirect-params';\nexport const REDIRECT_STATE_COOKIE_NAME = 'okta-oauth-state';\nexport const REDIRECT_NONCE_COOKIE_NAME = 'okta-oauth-nonce';\nexport const TOKEN_STORAGE_NAME = 'okta-token-storage';\nexport const CACHE_STORAGE_NAME = 'okta-cache-storage';\nexport const PKCE_STORAGE_NAME = 'okta-pkce-storage';\nexport const TRANSACTION_STORAGE_NAME = 'okta-transaction-storage';\nexport const SHARED_TRANSACTION_STORAGE_NAME = 'okta-shared-transaction-storage';\nexport const IDX_RESPONSE_STORAGE_NAME = 'okta-idx-response-storage';\nexport const ACCESS_TOKEN_STORAGE_KEY = 'accessToken';\nexport const ID_TOKEN_STORAGE_KEY = 'idToken';\nexport const REFRESH_TOKEN_STORAGE_KEY = 'refreshToken';\nexport const REFERRER_PATH_STORAGE_KEY = 'referrerPath';\n\n// Code verifier: Random URL-safe string with a minimum length of 43 characters.\n// Code challenge: Base64 URL-encoded SHA-256 hash of the code verifier.\nexport const MIN_VERIFIER_LENGTH = 43;\nexport const MAX_VERIFIER_LENGTH = 128;\nexport const DEFAULT_CODE_CHALLENGE_METHOD = 'S256';\n\nexport const IDX_API_VERSION = '1.0.0';"],"file":"constants.js"}
|
package/esm/crypto/base64.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
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 { AuthSdkError } from '../errors';
|
|
13
|
-
import { atob, btoa } from './webcrypto'; // converts a string to base64 (url/filename safe variant)
|
|
14
|
-
|
|
15
|
-
export function stringToBase64Url(str) {
|
|
16
|
-
var b64 = btoa(str);
|
|
17
|
-
return base64ToBase64Url(b64);
|
|
18
|
-
} // converts a standard base64-encoded string to a "url/filename safe" variant
|
|
19
|
-
|
|
20
|
-
export function base64ToBase64Url(b64) {
|
|
21
|
-
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
22
|
-
} // converts a "url/filename safe" base64 string to a "standard" base64 string
|
|
23
|
-
|
|
24
|
-
export function base64UrlToBase64(b64u) {
|
|
25
|
-
return b64u.replace(/-/g, '+').replace(/_/g, '/');
|
|
26
|
-
}
|
|
27
|
-
export function base64UrlToString(b64u) {
|
|
28
|
-
var b64 = base64UrlToBase64(b64u);
|
|
29
|
-
|
|
30
|
-
switch (b64.length % 4) {
|
|
31
|
-
case 0:
|
|
32
|
-
break;
|
|
33
|
-
|
|
34
|
-
case 2:
|
|
35
|
-
b64 += '==';
|
|
36
|
-
break;
|
|
37
|
-
|
|
38
|
-
case 3:
|
|
39
|
-
b64 += '=';
|
|
40
|
-
break;
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
throw new AuthSdkError('Not a valid Base64Url');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
var utf8 = atob(b64);
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
return decodeURIComponent(escape(utf8));
|
|
50
|
-
} catch (e) {
|
|
51
|
-
return utf8;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
export function stringToBuffer(str) {
|
|
55
|
-
var buffer = new Uint8Array(str.length);
|
|
56
|
-
|
|
57
|
-
for (var i = 0; i < str.length; i++) {
|
|
58
|
-
buffer[i] = str.charCodeAt(i);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return buffer;
|
|
62
|
-
}
|
|
63
|
-
export function base64UrlDecode(str) {
|
|
64
|
-
return atob(base64UrlToBase64(str));
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=base64.js.map
|
package/esm/crypto/base64.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/base64.ts"],"names":["AuthSdkError","atob","btoa","stringToBase64Url","str","b64","base64ToBase64Url","replace","base64UrlToBase64","b64u","base64UrlToString","length","utf8","decodeURIComponent","escape","e","stringToBuffer","buffer","Uint8Array","i","charCodeAt","base64UrlDecode"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,WAA7B;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,aAA3B,C,CAEA;;AACA,OAAO,SAASC,iBAAT,CAA2BC,GAA3B,EAAgC;AACrC,MAAIC,GAAG,GAAGH,IAAI,CAACE,GAAD,CAAd;AACA,SAAOE,iBAAiB,CAACD,GAAD,CAAxB;AACD,C,CAED;;AACA,OAAO,SAASC,iBAAT,CAA2BD,GAA3B,EAAgC;AACrC,SAAOA,GAAG,CAACE,OAAJ,CAAY,KAAZ,EAAmB,GAAnB,EAAwBA,OAAxB,CAAgC,KAAhC,EAAuC,GAAvC,EAA4CA,OAA5C,CAAoD,KAApD,EAA2D,EAA3D,CAAP;AACD,C,CAED;;AACA,OAAO,SAASC,iBAAT,CAA2BC,IAA3B,EAAiC;AACtC,SAAOA,IAAI,CAACF,OAAL,CAAa,IAAb,EAAmB,GAAnB,EAAwBA,OAAxB,CAAgC,IAAhC,EAAsC,GAAtC,CAAP;AACD;AAED,OAAO,SAASG,iBAAT,CAA2BD,IAA3B,EAAiC;AACtC,MAAIJ,GAAG,GAAGG,iBAAiB,CAACC,IAAD,CAA3B;;AACA,UAAQJ,GAAG,CAACM,MAAJ,GAAa,CAArB;AACE,SAAK,CAAL;AACE;;AACF,SAAK,CAAL;AACEN,MAAAA,GAAG,IAAI,IAAP;AACA;;AACF,SAAK,CAAL;AACEA,MAAAA,GAAG,IAAI,GAAP;AACA;;AACF;AACE,YAAM,IAAIL,YAAJ,CAAiB,uBAAjB,CAAN;AAVJ;;AAYA,MAAIY,IAAI,GAAGX,IAAI,CAACI,GAAD,CAAf;;AACA,MAAI;AACF,WAAOQ,kBAAkB,CAACC,MAAM,CAACF,IAAD,CAAP,CAAzB;AACD,GAFD,CAEE,OAAOG,CAAP,EAAU;AACV,WAAOH,IAAP;AACD;AACF;AAED,OAAO,SAASI,cAAT,CAAwBZ,GAAxB,EAA6B;AAClC,MAAIa,MAAM,GAAG,IAAIC,UAAJ,CAAed,GAAG,CAACO,MAAnB,CAAb;;AACA,OAAK,IAAIQ,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGf,GAAG,CAACO,MAAxB,EAAgCQ,CAAC,EAAjC,EAAqC;AACnCF,IAAAA,MAAM,CAACE,CAAD,CAAN,GAAYf,GAAG,CAACgB,UAAJ,CAAeD,CAAf,CAAZ;AACD;;AACD,SAAOF,MAAP;AACD;AAED,OAAO,SAASI,eAAT,CAAyBjB,GAAzB,EAA8B;AACnC,SAAOH,IAAI,CAACO,iBAAiB,CAACJ,GAAD,CAAlB,CAAX;AACD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { AuthSdkError } from '../errors';\nimport { atob, btoa } from './webcrypto';\n\n// converts a string to base64 (url/filename safe variant)\nexport function stringToBase64Url(str) {\n var b64 = btoa(str);\n return base64ToBase64Url(b64);\n}\n\n// converts a standard base64-encoded string to a \"url/filename safe\" variant\nexport function base64ToBase64Url(b64) {\n return b64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '');\n}\n\n// converts a \"url/filename safe\" base64 string to a \"standard\" base64 string\nexport function base64UrlToBase64(b64u) {\n return b64u.replace(/-/g, '+').replace(/_/g, '/');\n}\n\nexport function base64UrlToString(b64u) {\n var b64 = base64UrlToBase64(b64u);\n switch (b64.length % 4) {\n case 0:\n break;\n case 2:\n b64 += '==';\n break;\n case 3:\n b64 += '=';\n break;\n default:\n throw new AuthSdkError('Not a valid Base64Url');\n }\n var utf8 = atob(b64);\n try {\n return decodeURIComponent(escape(utf8));\n } catch (e) {\n return utf8;\n }\n}\n\nexport function stringToBuffer(str) {\n var buffer = new Uint8Array(str.length);\n for (var i = 0; i < str.length; i++) {\n buffer[i] = str.charCodeAt(i);\n }\n return buffer;\n}\n\nexport function base64UrlDecode(str) {\n return atob(base64UrlToBase64(str));\n}\n"],"file":"base64.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/browser.ts"],"names":["a","str","atob","b","btoa","c","crypto","webcrypto"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA,IAAMA,CAAC,GAAG,SAAJA,CAAI,CAASC,GAAT,EAAc;AAAE,SAAOC,IAAI,CAACD,GAAD,CAAX;AAAmB,CAA7C;;AACA,IAAME,CAAC,GAAG,SAAJA,CAAI,CAAUF,GAAV,EAAe;AAAE,SAAOG,IAAI,CAACH,GAAD,CAAX;AAAmB,CAA9C;;AACA,IAAMI,CAAC,GAAG,OAAOC,MAAP,KAAkB,WAAlB,GAAgC,IAAhC,GAAuCA,MAAjD;AAEA,SAASN,CAAC,IAAIE,IAAd,EAAoBC,CAAC,IAAIC,IAAzB,EAA+BC,CAAC,IAAIE,SAApC","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n/* global atob, btoa, crypto */\nconst a = function(str) { return atob(str); };\nconst b = function (str) { return btoa(str); };\nconst c = typeof crypto === 'undefined' ? null : crypto;\n\nexport { a as atob, b as btoa, c as webcrypto };\n"],"file":"browser.js"}
|
package/esm/crypto/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/index.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,eAAd;AACA,cAAc,aAAd","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nexport * from './base64';\nexport * from './oidcHash';\nexport * from './verifyToken';\nexport * from './webcrypto';\n"],"file":"index.js"}
|
package/esm/crypto/node.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
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
|
-
/* global atob, btoa */
|
|
14
|
-
// Ponyfill for NodeJS
|
|
15
|
-
// Webpack config excludes this file
|
|
16
|
-
var a;
|
|
17
|
-
|
|
18
|
-
if (typeof atob !== 'undefined') {
|
|
19
|
-
a = atob;
|
|
20
|
-
} else {
|
|
21
|
-
a = require('atob');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { a as atob };
|
|
25
|
-
var b;
|
|
26
|
-
|
|
27
|
-
if (typeof btoa !== 'undefined') {
|
|
28
|
-
b = btoa;
|
|
29
|
-
} else {
|
|
30
|
-
b = require('btoa');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { b as btoa };
|
|
34
|
-
var crypto;
|
|
35
|
-
|
|
36
|
-
try {
|
|
37
|
-
crypto = require('crypto');
|
|
38
|
-
} catch (err) {// this environment has no crypto module!
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var webcrypto;
|
|
42
|
-
|
|
43
|
-
if (typeof crypto !== 'undefined' && crypto['webcrypto']) {
|
|
44
|
-
webcrypto = crypto['webcrypto'];
|
|
45
|
-
} else {
|
|
46
|
-
var {
|
|
47
|
-
Crypto
|
|
48
|
-
} = require('@peculiar/webcrypto');
|
|
49
|
-
|
|
50
|
-
webcrypto = new Crypto();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { webcrypto };
|
|
54
|
-
//# sourceMappingURL=node.js.map
|
package/esm/crypto/node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/node.ts"],"names":["a","atob","require","b","btoa","crypto","err","webcrypto","Crypto"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AAEA;AACA;AAEA,IAAIA,CAAJ;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/BD,EAAAA,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACLD,EAAAA,CAAC,GAAGE,OAAO,CAAC,MAAD,CAAX;AACD;;AACD,SAASF,CAAC,IAAIC,IAAd;AAGA,IAAIE,CAAJ;;AACA,IAAI,OAAOC,IAAP,KAAgB,WAApB,EAAiC;AAC/BD,EAAAA,CAAC,GAAGC,IAAJ;AACD,CAFD,MAEO;AACLD,EAAAA,CAAC,GAAGD,OAAO,CAAC,MAAD,CAAX;AACD;;AACD,SAASC,CAAC,IAAIC,IAAd;AAEA,IAAIC,MAAJ;;AACA,IAAI;AACFA,EAAAA,MAAM,GAAGH,OAAO,CAAC,QAAD,CAAhB;AACD,CAFD,CAEE,OAAOI,GAAP,EAAY,CACZ;AACD;;AAED,IAAIC,SAAJ;;AACA,IAAI,OAAOF,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAAC,WAAD,CAA3C,EAA0D;AACxDE,EAAAA,SAAS,GAAGF,MAAM,CAAC,WAAD,CAAlB;AACD,CAFD,MAEO;AACL,MAAM;AAAEG,IAAAA;AAAF,MAAaN,OAAO,CAAC,qBAAD,CAA1B;;AACAK,EAAAA,SAAS,GAAG,IAAIC,MAAJ,EAAZ;AACD;;AAED,SAASD,SAAT","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n/* global atob, btoa */\n\n// Ponyfill for NodeJS\n// Webpack config excludes this file\n\nlet a;\nif (typeof atob !== 'undefined') {\n a = atob;\n} else {\n a = require('atob');\n}\nexport { a as atob };\n\n\nlet b;\nif (typeof btoa !== 'undefined') {\n b = btoa;\n} else {\n b = require('btoa');\n}\nexport { b as btoa };\n\nlet crypto;\ntry {\n crypto = require('crypto');\n} catch (err) {\n // this environment has no crypto module!\n}\n\nlet webcrypto;\nif (typeof crypto !== 'undefined' && crypto['webcrypto']) {\n webcrypto = crypto['webcrypto'];\n} else {\n const { Crypto } = require('@peculiar/webcrypto');\n webcrypto = new Crypto();\n}\n\nexport { webcrypto };\n"],"file":"node.js"}
|
package/esm/crypto/oidcHash.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
/* global TextEncoder */
|
|
14
|
-
import { stringToBase64Url } from './base64';
|
|
15
|
-
import { webcrypto } from './webcrypto';
|
|
16
|
-
export function getOidcHash(str) {
|
|
17
|
-
var buffer = new TextEncoder().encode(str);
|
|
18
|
-
return webcrypto.subtle.digest('SHA-256', buffer).then(function (arrayBuffer) {
|
|
19
|
-
var intBuffer = new Uint8Array(arrayBuffer);
|
|
20
|
-
var firstHalf = intBuffer.slice(0, 16);
|
|
21
|
-
var hash = String.fromCharCode.apply(null, firstHalf);
|
|
22
|
-
var b64u = stringToBase64Url(hash); // url-safe base64 variant
|
|
23
|
-
|
|
24
|
-
return b64u;
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=oidcHash.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/oidcHash.ts"],"names":["stringToBase64Url","webcrypto","getOidcHash","str","buffer","TextEncoder","encode","subtle","digest","then","arrayBuffer","intBuffer","Uint8Array","firstHalf","slice","hash","String","fromCharCode","apply","b64u"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,iBAAT,QAAkC,UAAlC;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,SAASC,WAAT,CAAqBC,GAArB,EAA0B;AAC/B,MAAIC,MAAM,GAAG,IAAIC,WAAJ,GAAkBC,MAAlB,CAAyBH,GAAzB,CAAb;AACA,SAAOF,SAAS,CAACM,MAAV,CAAiBC,MAAjB,CAAwB,SAAxB,EAAmCJ,MAAnC,EAA2CK,IAA3C,CAAgD,UAASC,WAAT,EAAsB;AAC3E,QAAIC,SAAS,GAAG,IAAIC,UAAJ,CAAeF,WAAf,CAAhB;AACA,QAAIG,SAAS,GAAGF,SAAS,CAACG,KAAV,CAAgB,CAAhB,EAAmB,EAAnB,CAAhB;AACA,QAAIC,IAAI,GAAGC,MAAM,CAACC,YAAP,CAAoBC,KAApB,CAA0B,IAA1B,EAAgCL,SAAhC,CAAX;AACA,QAAIM,IAAI,GAAGnB,iBAAiB,CAACe,IAAD,CAA5B,CAJ2E,CAIvC;;AACpC,WAAOI,IAAP;AACD,GANM,CAAP;AAOD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/* global TextEncoder */\nimport { stringToBase64Url } from './base64';\nimport { webcrypto } from './webcrypto';\n\nexport function getOidcHash(str) { \n var buffer = new TextEncoder().encode(str);\n return webcrypto.subtle.digest('SHA-256', buffer).then(function(arrayBuffer) {\n var intBuffer = new Uint8Array(arrayBuffer);\n var firstHalf = intBuffer.slice(0, 16);\n var hash = String.fromCharCode.apply(null, firstHalf);\n var b64u = stringToBase64Url(hash); // url-safe base64 variant\n return b64u;\n });\n}\n"],"file":"oidcHash.js"}
|
|
@@ -1,39 +0,0 @@
|
|
|
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 { clone } from '../util';
|
|
13
|
-
import { stringToBuffer, base64UrlDecode } from './base64';
|
|
14
|
-
import { webcrypto } from './webcrypto';
|
|
15
|
-
export function verifyToken(idToken, key) {
|
|
16
|
-
key = clone(key);
|
|
17
|
-
var format = 'jwk';
|
|
18
|
-
var algo = {
|
|
19
|
-
name: 'RSASSA-PKCS1-v1_5',
|
|
20
|
-
hash: {
|
|
21
|
-
name: 'SHA-256'
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var extractable = true;
|
|
25
|
-
var usages = ['verify']; // https://connect.microsoft.com/IE/feedback/details/2242108/webcryptoapi-importing-jwk-with-use-field-fails
|
|
26
|
-
// This is a metadata tag that specifies the intent of how the key should be used.
|
|
27
|
-
// It's not necessary to properly verify the jwt's signature.
|
|
28
|
-
|
|
29
|
-
delete key.use; // @ts-ignore
|
|
30
|
-
|
|
31
|
-
return webcrypto.subtle.importKey(format, key, algo, extractable, usages).then(function (cryptoKey) {
|
|
32
|
-
var jwt = idToken.split('.');
|
|
33
|
-
var payload = stringToBuffer(jwt[0] + '.' + jwt[1]);
|
|
34
|
-
var b64Signature = base64UrlDecode(jwt[2]);
|
|
35
|
-
var signature = stringToBuffer(b64Signature);
|
|
36
|
-
return webcrypto.subtle.verify(algo, cryptoKey, signature, payload);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=verifyToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/verifyToken.ts"],"names":["clone","stringToBuffer","base64UrlDecode","webcrypto","verifyToken","idToken","key","format","algo","name","hash","extractable","usages","use","subtle","importKey","then","cryptoKey","jwt","split","payload","b64Signature","signature","verify"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,KAAT,QAAsB,SAAtB;AACA,SAASC,cAAT,EAAyBC,eAAzB,QAAgD,UAAhD;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,SAASC,WAAT,CAAqBC,OAArB,EAA8BC,GAA9B,EAAmC;AACxCA,EAAAA,GAAG,GAAGN,KAAK,CAACM,GAAD,CAAX;AAEA,MAAIC,MAAM,GAAG,KAAb;AACA,MAAIC,IAAI,GAAG;AACTC,IAAAA,IAAI,EAAE,mBADG;AAETC,IAAAA,IAAI,EAAE;AAAED,MAAAA,IAAI,EAAE;AAAR;AAFG,GAAX;AAIA,MAAIE,WAAW,GAAG,IAAlB;AACA,MAAIC,MAAM,GAAG,CAAC,QAAD,CAAb,CATwC,CAWxC;AACA;AACA;;AACA,SAAON,GAAG,CAACO,GAAX,CAdwC,CAgBxC;;AACA,SAAOV,SAAS,CAACW,MAAV,CAAiBC,SAAjB,CACLR,MADK,EAELD,GAFK,EAGLE,IAHK,EAILG,WAJK,EAKLC,MALK,EAONI,IAPM,CAOD,UAASC,SAAT,EAAoB;AACxB,QAAIC,GAAG,GAAGb,OAAO,CAACc,KAAR,CAAc,GAAd,CAAV;AACA,QAAIC,OAAO,GAAGnB,cAAc,CAACiB,GAAG,CAAC,CAAD,CAAH,GAAS,GAAT,GAAeA,GAAG,CAAC,CAAD,CAAnB,CAA5B;AACA,QAAIG,YAAY,GAAGnB,eAAe,CAACgB,GAAG,CAAC,CAAD,CAAJ,CAAlC;AACA,QAAII,SAAS,GAAGrB,cAAc,CAACoB,YAAD,CAA9B;AAEA,WAAOlB,SAAS,CAACW,MAAV,CAAiBS,MAAjB,CACLf,IADK,EAELS,SAFK,EAGLK,SAHK,EAILF,OAJK,CAAP;AAMD,GAnBM,CAAP;AAoBD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { clone } from '../util';\nimport { stringToBuffer, base64UrlDecode } from './base64';\nimport { webcrypto } from './webcrypto';\n\nexport function verifyToken(idToken, key) {\n key = clone(key);\n\n var format = 'jwk';\n var algo = {\n name: 'RSASSA-PKCS1-v1_5',\n hash: { name: 'SHA-256' }\n };\n var extractable = true;\n var usages = ['verify'];\n\n // https://connect.microsoft.com/IE/feedback/details/2242108/webcryptoapi-importing-jwk-with-use-field-fails\n // This is a metadata tag that specifies the intent of how the key should be used.\n // It's not necessary to properly verify the jwt's signature.\n delete key.use;\n\n // @ts-ignore\n return webcrypto.subtle.importKey(\n format,\n key,\n algo,\n extractable,\n usages\n )\n .then(function(cryptoKey) {\n var jwt = idToken.split('.');\n var payload = stringToBuffer(jwt[0] + '.' + jwt[1]);\n var b64Signature = base64UrlDecode(jwt[2]);\n var signature = stringToBuffer(b64Signature);\n\n return webcrypto.subtle.verify(\n algo,\n cryptoKey,\n signature,\n payload\n );\n });\n}\n\n"],"file":"verifyToken.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/crypto/webcrypto.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA,cAAc,QAAd","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\n// ./node is swapped for ./browser in webpack config\nexport * from './node';"],"file":"webcrypto.js"}
|
|
@@ -1,30 +0,0 @@
|
|
|
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 CustomError from './CustomError';
|
|
13
|
-
export default class AuthApiError extends CustomError {
|
|
14
|
-
constructor(err, xhr) {
|
|
15
|
-
var message = err.errorSummary;
|
|
16
|
-
super(message);
|
|
17
|
-
this.name = 'AuthApiError';
|
|
18
|
-
this.errorSummary = err.errorSummary;
|
|
19
|
-
this.errorCode = err.errorCode;
|
|
20
|
-
this.errorLink = err.errorLink;
|
|
21
|
-
this.errorId = err.errorId;
|
|
22
|
-
this.errorCauses = err.errorCauses;
|
|
23
|
-
|
|
24
|
-
if (xhr) {
|
|
25
|
-
this.xhr = xhr;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=AuthApiError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/errors/AuthApiError.ts"],"names":["CustomError","AuthApiError","constructor","err","xhr","message","errorSummary","name","errorCode","errorLink","errorId","errorCauses"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,WAAP,MAAwB,eAAxB;AAEA,eAAe,MAAMC,YAAN,SAA2BD,WAA3B,CAA2D;AAQxEE,EAAAA,WAAW,CAACC,GAAD,EAAgBC,GAAhB,EAAoC;AAC7C,QAAMC,OAAO,GAAGF,GAAG,CAACG,YAApB;AACA,UAAMD,OAAN;AAEA,SAAKE,IAAL,GAAY,cAAZ;AACA,SAAKD,YAAL,GAAoBH,GAAG,CAACG,YAAxB;AACA,SAAKE,SAAL,GAAiBL,GAAG,CAACK,SAArB;AACA,SAAKC,SAAL,GAAiBN,GAAG,CAACM,SAArB;AACA,SAAKC,OAAL,GAAeP,GAAG,CAACO,OAAnB;AACA,SAAKC,WAAL,GAAmBR,GAAG,CAACQ,WAAvB;;AAEA,QAAIP,GAAJ,EAAS;AACP,WAAKA,GAAL,GAAWA,GAAX;AACD;AACF;;AAtBuE","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport CustomError from './CustomError';\nimport { APIError, HttpResponse } from '../types';\nexport default class AuthApiError extends CustomError implements APIError {\n errorSummary: string;\n errorCode?: string;\n errorLink?: string;\n errorId?: string;\n errorCauses?: string[];\n xhr?: HttpResponse;\n\n constructor(err: APIError, xhr?: HttpResponse) {\n const message = err.errorSummary;\n super(message);\n\n this.name = 'AuthApiError';\n this.errorSummary = err.errorSummary;\n this.errorCode = err.errorCode;\n this.errorLink = err.errorLink;\n this.errorId = err.errorId;\n this.errorCauses = err.errorCauses;\n\n if (xhr) {\n this.xhr = xhr;\n }\n }\n}\n"],"file":"AuthApiError.js"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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 CustomError from './CustomError';
|
|
13
|
-
export default class AuthPollStopError extends CustomError {
|
|
14
|
-
constructor() {
|
|
15
|
-
var message = 'The poll was stopped by the sdk';
|
|
16
|
-
super(message);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=AuthPollStopError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/errors/AuthPollStopError.ts"],"names":["CustomError","AuthPollStopError","constructor","message"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,WAAP,MAAwB,eAAxB;AAEA,eAAe,MAAMC,iBAAN,SAAgCD,WAAhC,CAA4C;AACzDE,EAAAA,WAAW,GAAG;AACZ,QAAMC,OAAO,GAAG,iCAAhB;AACA,UAAMA,OAAN;AACD;;AAJwD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport CustomError from './CustomError';\n\nexport default class AuthPollStopError extends CustomError {\n constructor() {\n const message = 'The poll was stopped by the sdk';\n super(message);\n }\n}\n"],"file":"AuthPollStopError.js"}
|
|
@@ -1,29 +0,0 @@
|
|
|
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 CustomError from './CustomError';
|
|
13
|
-
export default class AuthSdkError extends CustomError {
|
|
14
|
-
constructor(msg, xhr) {
|
|
15
|
-
super(msg);
|
|
16
|
-
this.name = 'AuthSdkError';
|
|
17
|
-
this.errorCode = 'INTERNAL';
|
|
18
|
-
this.errorSummary = msg;
|
|
19
|
-
this.errorLink = 'INTERNAL';
|
|
20
|
-
this.errorId = 'INTERNAL';
|
|
21
|
-
this.errorCauses = [];
|
|
22
|
-
|
|
23
|
-
if (xhr) {
|
|
24
|
-
this.xhr = xhr;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=AuthSdkError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/errors/AuthSdkError.ts"],"names":["CustomError","AuthSdkError","constructor","msg","xhr","name","errorCode","errorSummary","errorLink","errorId","errorCauses"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,WAAP,MAAwB,eAAxB;AAGA,eAAe,MAAMC,YAAN,SAA2BD,WAA3B,CAA2D;AAQxEE,EAAAA,WAAW,CAACC,GAAD,EAAcC,GAAd,EAAoC;AAC7C,UAAMD,GAAN;AACA,SAAKE,IAAL,GAAY,cAAZ;AACA,SAAKC,SAAL,GAAiB,UAAjB;AACA,SAAKC,YAAL,GAAoBJ,GAApB;AACA,SAAKK,SAAL,GAAiB,UAAjB;AACA,SAAKC,OAAL,GAAe,UAAf;AACA,SAAKC,WAAL,GAAmB,EAAnB;;AACA,QAAIN,GAAJ,EAAS;AACP,WAAKA,GAAL,GAAWA,GAAX;AACD;AACF;;AAnBuE","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport CustomError from './CustomError';\nimport { APIError } from '../types';\n\nexport default class AuthSdkError extends CustomError implements APIError {\n errorSummary: string;\n errorCode: string;\n errorLink: string;\n errorId: string;\n errorCauses: string[];\n xhr?: XMLHttpRequest;\n\n constructor(msg: string, xhr?: XMLHttpRequest) {\n super(msg);\n this.name = 'AuthSdkError';\n this.errorCode = 'INTERNAL';\n this.errorSummary = msg;\n this.errorLink = 'INTERNAL';\n this.errorId = 'INTERNAL';\n this.errorCauses = [];\n if (xhr) {\n this.xhr = xhr;\n }\n }\n}\n"],"file":"AuthSdkError.js"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
export default class CustomError extends Error {
|
|
13
|
-
constructor(message) {
|
|
14
|
-
// https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
15
|
-
super(message); // 'Error' breaks prototype chain here
|
|
16
|
-
|
|
17
|
-
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=CustomError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/errors/CustomError.ts"],"names":["CustomError","Error","constructor","message","Object","setPrototypeOf","new","target","prototype"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,eAAe,MAAMA,WAAN,SAA0BC,KAA1B,CAAgC;AAC7CC,EAAAA,WAAW,CAACC,OAAD,EAAkB;AAC3B;AACA,UAAMA,OAAN,EAF2B,CAEX;;AAChBC,IAAAA,MAAM,CAACC,cAAP,CAAsB,IAAtB,EAA4BC,GAAG,CAACC,MAAJ,CAAWC,SAAvC,EAH2B,CAGwB;AACpD;;AAL4C","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport default class CustomError extends Error {\n constructor(message: string) {\n // https://stackoverflow.com/questions/41102060/typescript-extending-error-class\n super(message); // 'Error' breaks prototype chain here\n Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain\n }\n}\n"],"file":"CustomError.js"}
|
package/esm/errors/OAuthError.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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 CustomError from './CustomError';
|
|
13
|
-
export default class OAuthError extends CustomError {
|
|
14
|
-
constructor(errorCode, summary) {
|
|
15
|
-
super(summary);
|
|
16
|
-
this.name = 'OAuthError';
|
|
17
|
-
this.errorCode = errorCode;
|
|
18
|
-
this.errorSummary = summary;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=OAuthError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/errors/OAuthError.ts"],"names":["CustomError","OAuthError","constructor","errorCode","summary","name","errorSummary"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAOA,WAAP,MAAwB,eAAxB;AAEA,eAAe,MAAMC,UAAN,SAAyBD,WAAzB,CAAqC;AAIlDE,EAAAA,WAAW,CAACC,SAAD,EAAoBC,OAApB,EAAqC;AAC9C,UAAMA,OAAN;AAEA,SAAKC,IAAL,GAAY,YAAZ;AACA,SAAKF,SAAL,GAAiBA,SAAjB;AACA,SAAKG,YAAL,GAAoBF,OAApB;AACD;;AAViD","sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport CustomError from './CustomError';\n\nexport default class OAuthError extends CustomError {\n errorCode: string;\n errorSummary: string;\n\n constructor(errorCode: string, summary: string) {\n super(summary);\n\n this.name = 'OAuthError';\n this.errorCode = errorCode;\n this.errorSummary = summary;\n }\n}\n\n"],"file":"OAuthError.js"}
|