@okta/okta-auth-js 5.8.0 → 5.9.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 +19 -0
- package/cjs/OktaAuth.js +11 -3
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/TransactionManager.js +6 -2
- package/cjs/TransactionManager.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/flow/AuthenticationFlow.js +30 -0
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/AuthenticationFlowMonitor.js +0 -0
- package/cjs/idx/flow/AuthenticationFlowMonitor.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/FlowMonitor.js +0 -0
- package/cjs/idx/flow/FlowMonitor.js.map +1 -0
- package/cjs/idx/flow/FlowSpecification.js +49 -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/cjs/idx/{flowMonitors → flow}/PasswordRecoveryFlowMonitor.js +0 -0
- package/cjs/idx/flow/PasswordRecoveryFlowMonitor.js.map +1 -0
- package/{esm/crypto/browser.js → cjs/idx/flow/RegistrationFlow.js} +15 -12
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -0
- package/cjs/idx/{flowMonitors → flow}/RegistrationFlowMonitor.js +0 -0
- package/cjs/idx/flow/RegistrationFlowMonitor.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 +119 -0
- package/cjs/idx/flow/index.js.map +1 -0
- package/cjs/idx/index.js +26 -0
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js.map +1 -1
- 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 +7 -16
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +13 -13
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/Identify.js +2 -1
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/run.js +18 -12
- 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 +67 -42
- 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.map +1 -1
- package/cjs/idx/types/index.js +16 -0
- 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/types/Transaction.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.umd.js +1 -1
- package/dist/okta-auth-js.umd.js.map +1 -1
- package/esm/index.js +8368 -16
- package/esm/index.js.map +1 -1
- package/lib/TransactionManager.d.ts +1 -0
- package/{esm/crypto/webcrypto.js → lib/idx/flow/AuthenticationFlow.d.ts} +3 -4
- package/lib/idx/{flowMonitors → flow}/AuthenticationFlowMonitor.d.ts +0 -0
- package/lib/idx/{flowMonitors → flow}/FlowMonitor.d.ts +0 -0
- package/lib/idx/flow/FlowSpecification.d.ts +10 -0
- package/{esm/oidc/endpoints/index.js → lib/idx/flow/PasswordRecoveryFlow.d.ts} +3 -5
- package/lib/idx/{flowMonitors → flow}/PasswordRecoveryFlowMonitor.d.ts +0 -0
- package/{esm/tx/TransactionState.js → lib/idx/flow/RegistrationFlow.d.ts} +3 -3
- package/lib/idx/{flowMonitors → flow}/RegistrationFlowMonitor.d.ts +0 -0
- package/{esm/crypto/index.js → lib/idx/flow/RemediationFlow.d.ts} +3 -6
- package/lib/idx/{flowMonitors → flow}/index.d.ts +7 -2
- package/lib/idx/index.d.ts +2 -0
- package/{esm/errors/AuthPollStopError.js → lib/idx/proceed.d.ts} +9 -9
- package/lib/idx/remediators/Identify.d.ts +1 -0
- package/lib/idx/run.d.ts +9 -10
- package/lib/idx/transactionMeta.d.ts +24 -1
- package/lib/idx/types/FlowIdentifier.d.ts +1 -0
- package/lib/idx/types/idx-js.d.ts +3 -0
- package/lib/idx/types/index.d.ts +8 -1
- package/lib/types/OktaAuthOptions.d.ts +2 -0
- package/lib/types/Transaction.d.ts +2 -0
- package/lib/types/api.d.ts +12 -1
- package/package.json +18 -7
- package/cjs/idx/flowMonitors/AuthenticationFlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/FlowMonitor.js.map +0 -1
- package/cjs/idx/flowMonitors/PasswordRecoveryFlowMonitor.js.map +0 -1
- 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 -705
- 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 -190
- 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 -324
- 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 +0 -32
- package/esm/clock.js.map +0 -1
- package/esm/constants.js +0 -36
- 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.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 -86
- package/esm/idx/interact.js.map +0 -1
- package/esm/idx/introspect.js +0 -61
- 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 +0 -38
- 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 -222
- 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 -125
- package/esm/idx/transactionMeta.js.map +0 -1
- package/esm/idx/types/idx-js.js +0 -20
- 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 -61
- 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 -88
- 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 -144
- package/esm/options.js.map +0 -1
- package/esm/server/serverStorage.js +0 -111
- 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 +0 -26
- 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/emailVerify.js +0 -21
- package/esm/util/emailVerify.js.map +0 -1
- package/esm/util/index.js +0 -18
- 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
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
//# sourceMappingURL=webcrypto.js.map
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const AuthenticationFlow: RemediationFlow;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OktaAuth, FlowIdentifier } from '../../types';
|
|
2
|
+
import { FlowMonitor } from './FlowMonitor';
|
|
3
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
4
|
+
export interface FlowSpecification {
|
|
5
|
+
flow: FlowIdentifier;
|
|
6
|
+
remediators: RemediationFlow;
|
|
7
|
+
flowMonitor: FlowMonitor;
|
|
8
|
+
actions?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function getFlowSpecification(oktaAuth: OktaAuth, flow?: FlowIdentifier): FlowSpecification;
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export * from './well-known';
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const PasswordRecoveryFlow: RemediationFlow;
|
|
File without changes
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { RemediationFlow } from './RemediationFlow';
|
|
13
|
+
export declare const RegistrationFlow: RemediationFlow;
|
|
File without changes
|
|
@@ -6,11 +6,8 @@
|
|
|
6
6
|
* Unless required by applicable law or agreed to in writing, software
|
|
7
7
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
export * from './verifyToken';
|
|
15
|
-
export * from './webcrypto';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
import * as remediators from '../remediators';
|
|
13
|
+
export declare type RemediationFlow = Record<string, typeof remediators.Remediator>;
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './RegistrationFlowMonitor';
|
|
12
|
+
export * from './AuthenticationFlow';
|
|
14
13
|
export * from './AuthenticationFlowMonitor';
|
|
14
|
+
export * from './FlowMonitor';
|
|
15
|
+
export * from './FlowSpecification';
|
|
16
|
+
export * from './PasswordRecoveryFlow';
|
|
15
17
|
export * from './PasswordRecoveryFlowMonitor';
|
|
18
|
+
export * from './RegistrationFlow';
|
|
19
|
+
export * from './RegistrationFlowMonitor';
|
|
20
|
+
export * from './RemediationFlow';
|
package/lib/idx/index.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ export * from './authenticate';
|
|
|
13
13
|
export * from './cancel';
|
|
14
14
|
export * from './interact';
|
|
15
15
|
export * from './introspect';
|
|
16
|
+
export * from './proceed';
|
|
16
17
|
export * from './register';
|
|
17
18
|
export * from './recoverPassword';
|
|
18
19
|
export * from './handleInteractionCodeRedirect';
|
|
19
20
|
export * from './startTransaction';
|
|
21
|
+
export * from './transactionMeta';
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
12
|
+
import { OktaAuth, IdxTransaction } from '../types';
|
|
13
|
+
import { AuthenticationOptions } from './authenticate';
|
|
14
|
+
import { RegistrationOptions } from './register';
|
|
15
|
+
import { PasswordRecoveryOptions } from './recoverPassword';
|
|
16
|
+
export declare type ProceedOptions = AuthenticationOptions & RegistrationOptions & PasswordRecoveryOptions;
|
|
17
|
+
export declare function canProceed(authClient: OktaAuth, options?: {
|
|
18
|
+
state?: string;
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function proceed(authClient: OktaAuth, options?: ProceedOptions): Promise<IdxTransaction>;
|
package/lib/idx/run.d.ts
CHANGED
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
import { FlowMonitor } from './
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
export declare type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
actions?: string[];
|
|
12
|
+
import { FlowMonitor, RemediationFlow } from './flow';
|
|
13
|
+
import { OktaAuth, IdxTransaction, FlowIdentifier } from '../types';
|
|
14
|
+
import { ProceedOptions } from './proceed';
|
|
15
|
+
export declare type RunOptions = ProceedOptions & {
|
|
16
|
+
flow?: FlowIdentifier;
|
|
17
|
+
remediators?: RemediationFlow;
|
|
19
18
|
flowMonitor?: FlowMonitor;
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
export declare function run(authClient: OktaAuth, options
|
|
19
|
+
actions?: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare function run(authClient: OktaAuth, options?: RunOptions): Promise<IdxTransaction>;
|
|
@@ -10,7 +10,30 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { OktaAuth, IdxTransactionMeta, TransactionMetaOptions } from '../types';
|
|
13
|
-
export declare function createTransactionMeta(authClient: OktaAuth): Promise<
|
|
13
|
+
export declare function createTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<{
|
|
14
|
+
flow: import("./types/FlowIdentifier").FlowIdentifier;
|
|
15
|
+
issuer: string;
|
|
16
|
+
pkce: boolean;
|
|
17
|
+
clientId: string;
|
|
18
|
+
redirectUri: string;
|
|
19
|
+
responseType: string | string[];
|
|
20
|
+
responseMode: string;
|
|
21
|
+
scopes: string[];
|
|
22
|
+
state: string;
|
|
23
|
+
nonce: string;
|
|
24
|
+
urls: {
|
|
25
|
+
issuer: any;
|
|
26
|
+
authorizeUrl: any;
|
|
27
|
+
userinfoUrl: any;
|
|
28
|
+
tokenUrl: any;
|
|
29
|
+
revokeUrl: any;
|
|
30
|
+
logoutUrl: any;
|
|
31
|
+
};
|
|
32
|
+
ignoreSignature: boolean;
|
|
33
|
+
codeVerifier: string;
|
|
34
|
+
codeChallengeMethod: string;
|
|
35
|
+
codeChallenge: string;
|
|
36
|
+
}>;
|
|
14
37
|
export declare function transactionMetaExist(authClient: OktaAuth, options?: TransactionMetaOptions): boolean;
|
|
15
38
|
export declare function getSavedTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): IdxTransactionMeta;
|
|
16
39
|
export declare function getTransactionMeta(authClient: OktaAuth, options?: TransactionMetaOptions): Promise<IdxTransactionMeta>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type FlowIdentifier = 'default' | 'proceed' | 'authenticate' | 'login' | 'signin' | 'register' | 'signup' | 'enrollProfile' | 'recoverPassword' | 'resetPassword';
|
|
@@ -43,6 +43,8 @@ export interface IdxRemediationValue {
|
|
|
43
43
|
type?: string;
|
|
44
44
|
required?: boolean;
|
|
45
45
|
secret?: boolean;
|
|
46
|
+
visible?: boolean;
|
|
47
|
+
mutable?: boolean;
|
|
46
48
|
value?: string;
|
|
47
49
|
label?: string;
|
|
48
50
|
form?: IdxForm;
|
|
@@ -63,6 +65,7 @@ export interface IdxRemediation {
|
|
|
63
65
|
href?: string;
|
|
64
66
|
method?: string;
|
|
65
67
|
type?: string;
|
|
68
|
+
accepts?: string;
|
|
66
69
|
}
|
|
67
70
|
export interface IdxMessage {
|
|
68
71
|
message: string;
|
package/lib/idx/types/index.d.ts
CHANGED
|
@@ -10,14 +10,18 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { InteractOptions } from '../interact';
|
|
13
|
+
import { IntrospectOptions } from '../introspect';
|
|
13
14
|
import { APIError, Tokens } from '../../types';
|
|
14
15
|
import { IdxTransactionMeta } from '../../types/Transaction';
|
|
15
16
|
import { IdxAuthenticator, IdxMessage, IdxOption, IdxResponse } from './idx-js';
|
|
17
|
+
import { FlowIdentifier } from './FlowIdentifier';
|
|
16
18
|
export { IdxMessage } from './idx-js';
|
|
17
19
|
export { AuthenticationOptions } from '../authenticate';
|
|
18
20
|
export { RegistrationOptions } from '../register';
|
|
19
21
|
export { PasswordRecoveryOptions } from '../recoverPassword';
|
|
22
|
+
export { ProceedOptions } from '../proceed';
|
|
20
23
|
export { CancelOptions } from '../cancel';
|
|
24
|
+
export { FlowIdentifier };
|
|
21
25
|
export declare enum IdxStatus {
|
|
22
26
|
SUCCESS = "SUCCESS",
|
|
23
27
|
PENDING = "PENDING",
|
|
@@ -34,6 +38,7 @@ export declare enum AuthenticatorKey {
|
|
|
34
38
|
}
|
|
35
39
|
export declare type Input = {
|
|
36
40
|
name: string;
|
|
41
|
+
type?: string;
|
|
37
42
|
label?: string;
|
|
38
43
|
value?: string;
|
|
39
44
|
secret?: boolean;
|
|
@@ -63,7 +68,9 @@ export interface IdxTransaction {
|
|
|
63
68
|
availableSteps?: NextStep[];
|
|
64
69
|
_idxResponse?: IdxResponse;
|
|
65
70
|
}
|
|
66
|
-
export declare type IdxOptions = InteractOptions
|
|
71
|
+
export declare type IdxOptions = InteractOptions & IntrospectOptions & {
|
|
72
|
+
flow?: FlowIdentifier;
|
|
73
|
+
};
|
|
67
74
|
export declare type Authenticator = {
|
|
68
75
|
key: string;
|
|
69
76
|
methodType?: string;
|
|
@@ -15,6 +15,7 @@ import { HttpRequestClient } from './http';
|
|
|
15
15
|
import { AuthState } from './AuthState';
|
|
16
16
|
import { TransactionManagerOptions } from './Transaction';
|
|
17
17
|
import { SimpleStorage } from './Storage';
|
|
18
|
+
import { FlowIdentifier } from '../idx/types';
|
|
18
19
|
import OktaAuth from '../OktaAuth';
|
|
19
20
|
export interface TokenManagerOptions {
|
|
20
21
|
autoRenew?: boolean;
|
|
@@ -64,5 +65,6 @@ export interface OktaAuthOptions extends CustomUrls {
|
|
|
64
65
|
devMode?: boolean;
|
|
65
66
|
storageManager?: StorageManagerOptions;
|
|
66
67
|
transactionManager?: TransactionManagerOptions;
|
|
68
|
+
flow?: FlowIdentifier;
|
|
67
69
|
clientSecret?: string;
|
|
68
70
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import StorageManager from '../StorageManager';
|
|
13
13
|
import { CustomUrls } from './OktaAuthOptions';
|
|
14
|
+
import { FlowIdentifier } from '../idx/types';
|
|
14
15
|
export interface TransactionManagerOptions {
|
|
15
16
|
storageManager?: StorageManager;
|
|
16
17
|
enableSharedStorage?: boolean;
|
|
@@ -45,6 +46,7 @@ export interface PKCETransactionMeta extends OAuthTransactionMeta {
|
|
|
45
46
|
export interface IdxTransactionMeta extends PKCETransactionMeta {
|
|
46
47
|
interactionHandle?: string;
|
|
47
48
|
remediations?: string[];
|
|
49
|
+
flow?: FlowIdentifier;
|
|
48
50
|
}
|
|
49
51
|
export declare type CustomAuthTransactionMeta = Record<string, string | undefined>;
|
|
50
52
|
export declare type TransactionMeta = IdxTransactionMeta | PKCETransactionMeta | OAuthTransactionMeta | CustomAuthTransactionMeta;
|
package/lib/types/api.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ import StorageManager from '../StorageManager';
|
|
|
18
18
|
import TransactionManager from '../TransactionManager';
|
|
19
19
|
import { TokenManagerInterface } from './TokenManager';
|
|
20
20
|
import { OktaUserAgent } from '../OktaUserAgent';
|
|
21
|
-
import {
|
|
21
|
+
import { FlowIdentifier } from '../idx/types';
|
|
22
|
+
import { AuthenticationOptions, RegistrationOptions as IdxRegistrationOptions, PasswordRecoveryOptions, ProceedOptions, CancelOptions, IdxOptions, IdxTransaction } from '../idx/types';
|
|
22
23
|
import { InteractOptions, InteractResponse } from '../idx/interact';
|
|
23
24
|
import { IntrospectOptions } from '../idx/introspect';
|
|
24
25
|
import { IdxResponse } from '../idx/types/idx-js';
|
|
@@ -31,6 +32,7 @@ export interface OktaAuth {
|
|
|
31
32
|
storageManager: StorageManager;
|
|
32
33
|
transactionManager: TransactionManager;
|
|
33
34
|
tokenManager: TokenManagerInterface;
|
|
35
|
+
idx: IdxAPI;
|
|
34
36
|
features?: FeaturesAPI;
|
|
35
37
|
token?: TokenAPI;
|
|
36
38
|
}
|
|
@@ -94,6 +96,9 @@ export interface TokenParams extends CustomUrls {
|
|
|
94
96
|
prompt?: string;
|
|
95
97
|
sessionToken?: string;
|
|
96
98
|
timeout?: number;
|
|
99
|
+
extraParams?: {
|
|
100
|
+
[propName: string]: string;
|
|
101
|
+
};
|
|
97
102
|
popupTitle?: string;
|
|
98
103
|
}
|
|
99
104
|
export interface PopupParams {
|
|
@@ -209,8 +214,14 @@ export interface IdxAPI {
|
|
|
209
214
|
introspect: (options?: IntrospectOptions) => Promise<IdxResponse>;
|
|
210
215
|
authenticate: (options?: AuthenticationOptions) => Promise<IdxTransaction>;
|
|
211
216
|
register: (options?: IdxRegistrationOptions) => Promise<IdxTransaction>;
|
|
217
|
+
proceed: (options?: ProceedOptions) => Promise<IdxTransaction>;
|
|
212
218
|
cancel: (options?: CancelOptions) => Promise<IdxTransaction>;
|
|
213
219
|
startTransaction: (options?: IdxOptions) => Promise<IdxTransaction>;
|
|
214
220
|
recoverPassword: (options?: PasswordRecoveryOptions) => Promise<IdxTransaction>;
|
|
215
221
|
handleInteractionCodeRedirect: (url: string) => Promise<void>;
|
|
222
|
+
getFlow(): FlowIdentifier;
|
|
223
|
+
setFlow(flow: FlowIdentifier): void;
|
|
224
|
+
canProceed(options?: {
|
|
225
|
+
state?: string;
|
|
226
|
+
}): boolean;
|
|
216
227
|
}
|
package/package.json
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@okta/okta-auth-js",
|
|
4
4
|
"description": "The Okta Auth SDK",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.9.0",
|
|
6
6
|
"homepage": "https://github.com/okta/okta-auth-js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"main": "cjs/index.js",
|
|
10
10
|
"module": "esm/index.js",
|
|
11
|
-
"browser":
|
|
11
|
+
"browser": {
|
|
12
|
+
"cjs/index.js": "./dist/okta-auth-js.umd.js"
|
|
13
|
+
},
|
|
12
14
|
"types": "lib/index.d.ts",
|
|
13
15
|
"repository": {
|
|
14
16
|
"type": "git",
|
|
@@ -41,8 +43,9 @@
|
|
|
41
43
|
"build:cdn": "cross-env NODE_ENV=production webpack --config webpack.cdn.config.js",
|
|
42
44
|
"build:web": "cross-env NODE_ENV=production webpack --config webpack.config.js",
|
|
43
45
|
"build:cjs": "cross-env babel lib -d build/cjs --config-file ./babel.cjs.js --extensions \".ts\",\".js\" --source-maps",
|
|
44
|
-
"build:esm": "
|
|
46
|
+
"build:esm": "rollup -c",
|
|
45
47
|
"build:polyfill": "cross-env NODE_ENV=production webpack --config webpack.polyfill.config.js",
|
|
48
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
46
49
|
"generate:samples": "yarn workspace @okta/samples build && yarn install --ignore-scripts",
|
|
47
50
|
"dev:samples": "yarn workspace @okta/samples dev",
|
|
48
51
|
"prepare": "",
|
|
@@ -94,6 +97,10 @@
|
|
|
94
97
|
"@babel/plugin-transform-typescript": "^7.10.5",
|
|
95
98
|
"@babel/preset-env": "^7.8.2",
|
|
96
99
|
"@babel/preset-typescript": "^7.10.4",
|
|
100
|
+
"@okta/okta-signin-widget": "5.13.0",
|
|
101
|
+
"@rollup/plugin-alias": "^3.1.8",
|
|
102
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
103
|
+
"@rollup/plugin-replace": "^3.0.0",
|
|
97
104
|
"@types/jest": "^25.2.3",
|
|
98
105
|
"@types/node": "^14.0.3",
|
|
99
106
|
"@typescript-eslint/eslint-plugin": "^2.34.0",
|
|
@@ -116,6 +123,10 @@
|
|
|
116
123
|
"jest-junit": "^9.0.0",
|
|
117
124
|
"json-loader": "0.5.4",
|
|
118
125
|
"lodash": "4.17.20",
|
|
126
|
+
"rollup": "^2.59.0",
|
|
127
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
128
|
+
"rollup-plugin-license": "^2.6.0",
|
|
129
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
119
130
|
"shelljs": "0.8.4",
|
|
120
131
|
"ts-jest": "^26.4.3",
|
|
121
132
|
"ts-loader": "^9.2.6",
|
|
@@ -130,7 +141,7 @@
|
|
|
130
141
|
},
|
|
131
142
|
"workspaces": {
|
|
132
143
|
"packages": [
|
|
133
|
-
"
|
|
144
|
+
".",
|
|
134
145
|
"env",
|
|
135
146
|
"test/apps/*",
|
|
136
147
|
"test/e2e",
|
|
@@ -161,8 +172,8 @@
|
|
|
161
172
|
}
|
|
162
173
|
},
|
|
163
174
|
"okta": {
|
|
164
|
-
"commitSha": "
|
|
165
|
-
"fullVersion": "5.
|
|
166
|
-
"testedSha": "
|
|
175
|
+
"commitSha": "0ec37e24fe7659493073b852c51aa4cb4397bc74",
|
|
176
|
+
"fullVersion": "5.9.0-g0ec37e2",
|
|
177
|
+
"testedSha": "60dd409a7a75b3b829d905ef1967719fe5728d43"
|
|
167
178
|
}
|
|
168
179
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/flowMonitors/AuthenticationFlowMonitor.ts"],"names":["AuthenticationFlowMonitor","FlowMonitor","isRemediatorCandidate","remediator","remediations","values","prevRemediatorName","previousRemediator","getName","remediatorName","includes","some","name"],"mappings":";;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKO,MAAMA,yBAAN,SAAwCC,wBAAxC,CAAoD;AACzDC,EAAAA,qBAAqB,CAACC,UAAD,EAAaC,YAAb,EAA4BC,MAA5B,EAAqC;AAAA;;AACxD,UAAMC,kBAAkB,4BAAG,KAAKC,kBAAR,0DAAG,sBAAyBC,OAAzB,EAA3B;AACA,UAAMC,cAAc,GAAGN,UAAU,CAACK,OAAX,EAAvB;;AAEA,QAAIC,cAAc,KAAK,mCAAnB,IACC,CAAC,mCAAD,EAAsCC,QAAtC,CAA+CJ,kBAA/C,CADL,EACyE;AACvE,aAAO,KAAP;AACD;;AAED,QAAIG,cAAc,KAAK,mCAAnB,IACCL,YAAY,CAACO,IAAb,CAAkB,CAAC;AAAEC,MAAAA;AAAF,KAAD,KAAcA,IAAI,KAAK,yBAAzC,CADL,EAC0E;AACxE,aAAO,KAAP;AACD;;AAED,QAAIH,cAAc,KAAK,6BAAnB,IACC,CACC,6BADD,EAEC,+BAFD,EAGCC,QAHD,CAGUJ,kBAHV,CADL,EAIoC;AAClC,aAAO,KAAP;AACD;;AAED,WAAO,MAAMJ,qBAAN,CAA4BC,UAA5B,EAAwCC,YAAxC,EAAsDC,MAAtD,CAAP;AACD;;AAxBwD","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 { FlowMonitor } from './FlowMonitor';\n\nexport class AuthenticationFlowMonitor extends FlowMonitor {\n isRemediatorCandidate(remediator, remediations?, values?) {\n const prevRemediatorName = this.previousRemediator?.getName();\n const remediatorName = remediator.getName();\n \n if (remediatorName === 'select-authenticator-authenticate' \n && ['select-authenticator-authenticate'].includes(prevRemediatorName)) {\n return false;\n }\n\n if (remediatorName === 'select-authenticator-authenticate' \n && remediations.some(({ name }) => name === 'challenge-authenticator')) {\n return false;\n }\n\n if (remediatorName === 'select-authenticator-enroll' \n && [\n 'select-authenticator-enroll', \n 'authenticator-enrollment-data'\n ].includes(prevRemediatorName)) {\n return false;\n }\n\n return super.isRemediatorCandidate(remediator, remediations, values);\n }\n}\n"],"file":"AuthenticationFlowMonitor.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/flowMonitors/FlowMonitor.ts"],"names":["FlowMonitor","constructor","authClient","loopDetected","remediator","previousRemediator","getName","isRemediatorCandidate","remediations","values","remediatorName","skip","trackRemediations","name","meta","isFinished","Promise","resolve"],"mappings":";;;;AAeA;;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQO,MAAMA,WAAN,CAAkB;AAIvBC,EAAAA,WAAW,CAACC,UAAD,EAAa;AACtB,SAAKA,UAAL,GAAkBA,UAAlB;AACD,GANsB,CAQvB;;;AACAC,EAAAA,YAAY,CAACC,UAAD,EAAkC;AAC5C,QAAI,CAAC,KAAKC,kBAAV,EAA8B;AAC5B,WAAKA,kBAAL,GAA0BD,UAA1B;AACA,aAAO,KAAP;AACD;;AAED,QAAI,KAAKC,kBAAL,CAAwBC,OAAxB,OAAsCF,UAAU,CAACE,OAAX,EAA1C,EAAgE;AAC9D,aAAO,IAAP;AACD;;AAED,SAAKD,kBAAL,GAA0BD,UAA1B;AACA,WAAO,KAAP;AACD;;AAEDG,EAAAA,qBAAqB,EACnB;AACAH,EAAAA,UAFmB,EAEKI,YAFL,EAEsCC,MAFtC,EAGV;AACT,UAAMC,cAAc,GAAGN,UAAU,CAACE,OAAX,EAAvB;;AACA,QAAI,CAACG,MAAM,CAACE,IAAR,IAAgBD,cAAc,KAAK,MAAvC,EAA+C;AAC7C,aAAO,KAAP;AACD;;AACD,QAAID,MAAM,CAACE,IAAP,IAAeD,cAAc,KAAK,MAAtC,EAA8C;AAC5C,aAAO,KAAP;AACD;;AACD,WAAO,IAAP;AACD;;AAEsB,QAAjBE,iBAAiB,CAACC,IAAD,EAAe;AACpC,QAAIC,IAAI,GAAG,MAAM,yCAAmB,KAAKZ,UAAxB,CAAjB;AACA,UAAMM,YAAY,GAAGM,IAAI,CAACN,YAAL,IAAqB,EAA1C;AACAM,IAAAA,IAAI,GAAG,EACL,GAAGA,IADE;AAELN,MAAAA,YAAY,EAAE,CAAC,GAAGA,YAAJ,EAAkBK,IAAlB;AAFT,KAAP;AAIA,8CAAoB,KAAKX,UAAzB,EAAqCY,IAArC;AACD;;AAEDC,EAAAA,UAAU,GAAqB;AAC7B,WAAOC,OAAO,CAACC,OAAR,CAAgB,IAAhB,CAAP;AACD;;AAjDsB","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 { Remediator, RemediationValues, SkipValues } from '../remediators';\nimport { getTransactionMeta, saveTransactionMeta } from '../transactionMeta';\nimport { IdxRemediation } from '../types/idx-js';\n\nexport class FlowMonitor {\n previousRemediator: Remediator;\n authClient: OktaAuth;\n\n constructor(authClient) {\n this.authClient = authClient;\n }\n\n // detect in-memory loop\n loopDetected(remediator: Remediator): boolean {\n if (!this.previousRemediator) {\n this.previousRemediator = remediator;\n return false;\n }\n\n if (this.previousRemediator.getName() === remediator.getName()) {\n return true;\n }\n\n this.previousRemediator = remediator;\n return false;\n }\n\n isRemediatorCandidate(\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n remediator: Remediator, remediations?: IdxRemediation[], values?: RemediationValues & SkipValues\n ): boolean {\n const remediatorName = remediator.getName();\n if (!values.skip && remediatorName === 'skip') {\n return false;\n }\n if (values.skip && remediatorName !== 'skip') {\n return false;\n }\n return true;\n }\n\n async trackRemediations(name: string) {\n let meta = await getTransactionMeta(this.authClient);\n const remediations = meta.remediations || [];\n meta = { \n ...meta, \n remediations: [...remediations, name]\n };\n saveTransactionMeta(this.authClient, meta);\n }\n\n isFinished(): Promise<boolean> {\n return Promise.resolve(true);\n }\n}\n"],"file":"FlowMonitor.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/flowMonitors/PasswordRecoveryFlowMonitor.ts"],"names":["PasswordRecoveryFlowMonitor","FlowMonitor","isRemediatorCandidate","remediator","remediations","values","prevRemediatorName","previousRemediator","getName","remediatorName","includes","some","name","isFinished","authClient"],"mappings":";;;;AAaA;;AACA;;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,MAAMA,2BAAN,SAA0CC,wBAA1C,CAAsD;AAC3DC,EAAAA,qBAAqB,CAACC,UAAD,EAAaC,YAAb,EAA4BC,MAA5B,EAAqC;AAAA;;AACxD,UAAMC,kBAAkB,4BAAG,KAAKC,kBAAR,0DAAG,sBAAyBC,OAAzB,EAA3B;AACA,UAAMC,cAAc,GAAGN,UAAU,CAACK,OAAX,EAAvB;;AAEA,QAAIC,cAAc,KAAK,mCAAnB,IACC,CACD,mCADC,EAED,wBAFC,EAGDC,QAHC,CAGQJ,kBAHR,CADL,EAIkC;AAChC,aAAO,KAAP;AACD;;AAED,QAAIG,cAAc,KAAK,mCAAnB,IACCL,YAAY,CAACO,IAAb,CAAkB,CAAC;AAAEC,MAAAA;AAAF,KAAD,KAAcA,IAAI,KAAK,yBAAzC,CADL,EAC0E;AACxE,aAAO,KAAP;AACD;;AAED,WAAO,MAAMV,qBAAN,CAA4BC,UAA5B,EAAwCC,YAAxC,EAAsDC,MAAtD,CAAP;AACD;;AAEe,QAAVQ,UAAU,GAAG;AACjB,UAAM;AAAET,MAAAA;AAAF,QAAoB,MAAM,yCAAmB,KAAKU,UAAxB,CAAhC;;AACA,QAAI,CAACV,YAAY,CAACM,QAAb,CAAsB,qBAAtB,CAAL,EAAmD;AACjD,aAAO,KAAP;AACD;;AAED,WAAO,MAAM,MAAMG,UAAN,EAAb;AACD;;AA5B0D","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 { FlowMonitor } from './FlowMonitor';\nimport { getTransactionMeta } from '../transactionMeta';\n\nexport class PasswordRecoveryFlowMonitor extends FlowMonitor {\n isRemediatorCandidate(remediator, remediations?, values?) {\n const prevRemediatorName = this.previousRemediator?.getName();\n const remediatorName = remediator.getName();\n \n if (remediatorName === 'select-authenticator-authenticate' \n && [\n 'select-authenticator-authenticate',\n 'reenroll-authenticator'\n ].includes(prevRemediatorName)) {\n return false;\n }\n\n if (remediatorName === 'select-authenticator-authenticate' \n && remediations.some(({ name }) => name === 'challenge-authenticator')) {\n return false;\n }\n\n return super.isRemediatorCandidate(remediator, remediations, values);\n }\n\n async isFinished() {\n const { remediations } = await getTransactionMeta(this.authClient);\n if (!remediations.includes('reset-authenticator')) {\n return false;\n }\n\n return await super.isFinished();\n }\n}\n"],"file":"PasswordRecoveryFlowMonitor.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/flowMonitors/RegistrationFlowMonitor.ts"],"names":["RegistrationFlowMonitor","FlowMonitor","isRemediatorCandidate","remediator","remediations","values","prevRemediatorName","previousRemediator","getName","remediatorName","includes"],"mappings":";;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKO,MAAMA,uBAAN,SAAsCC,wBAAtC,CAAkD;AACvDC,EAAAA,qBAAqB,CAACC,UAAD,EAAaC,YAAb,EAA4BC,MAA5B,EAAqC;AAAA;;AACxD,UAAMC,kBAAkB,4BAAG,KAAKC,kBAAR,0DAAG,sBAAyBC,OAAzB,EAA3B;AACA,UAAMC,cAAc,GAAGN,UAAU,CAACK,OAAX,EAAvB;;AACA,QAAIC,cAAc,KAAK,6BAAnB,IACC,CACC,6BADD,EAEC,+BAFD,EAGCC,QAHD,CAGUJ,kBAHV,CADL,EAIoC;AAClC,aAAO,KAAP;AACD;;AAED,WAAO,MAAMJ,qBAAN,CAA4BC,UAA5B,EAAwCC,YAAxC,EAAsDC,MAAtD,CAAP;AACD;;AAbsD","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 { FlowMonitor } from './FlowMonitor';\n\nexport class RegistrationFlowMonitor extends FlowMonitor {\n isRemediatorCandidate(remediator, remediations?, values?) {\n const prevRemediatorName = this.previousRemediator?.getName();\n const remediatorName = remediator.getName();\n if (remediatorName === 'select-authenticator-enroll' \n && [\n 'select-authenticator-enroll', \n 'authenticator-enrollment-data'\n ].includes(prevRemediatorName)) {\n return false;\n }\n\n return super.isRemediatorCandidate(remediator, remediations, values);\n }\n}\n"],"file":"RegistrationFlowMonitor.js"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _FlowMonitor = require("./FlowMonitor");
|
|
4
|
-
|
|
5
|
-
Object.keys(_FlowMonitor).forEach(function (key) {
|
|
6
|
-
if (key === "default" || key === "__esModule") return;
|
|
7
|
-
if (key in exports && exports[key] === _FlowMonitor[key]) return;
|
|
8
|
-
Object.defineProperty(exports, key, {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () {
|
|
11
|
-
return _FlowMonitor[key];
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
var _RegistrationFlowMonitor = require("./RegistrationFlowMonitor");
|
|
17
|
-
|
|
18
|
-
Object.keys(_RegistrationFlowMonitor).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _RegistrationFlowMonitor[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _RegistrationFlowMonitor[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
var _AuthenticationFlowMonitor = require("./AuthenticationFlowMonitor");
|
|
30
|
-
|
|
31
|
-
Object.keys(_AuthenticationFlowMonitor).forEach(function (key) {
|
|
32
|
-
if (key === "default" || key === "__esModule") return;
|
|
33
|
-
if (key in exports && exports[key] === _AuthenticationFlowMonitor[key]) return;
|
|
34
|
-
Object.defineProperty(exports, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function () {
|
|
37
|
-
return _AuthenticationFlowMonitor[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
var _PasswordRecoveryFlowMonitor = require("./PasswordRecoveryFlowMonitor");
|
|
43
|
-
|
|
44
|
-
Object.keys(_PasswordRecoveryFlowMonitor).forEach(function (key) {
|
|
45
|
-
if (key === "default" || key === "__esModule") return;
|
|
46
|
-
if (key in exports && exports[key] === _PasswordRecoveryFlowMonitor[key]) return;
|
|
47
|
-
Object.defineProperty(exports, key, {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () {
|
|
50
|
-
return _PasswordRecoveryFlowMonitor[key];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/flowMonitors/index.ts"],"names":[],"mappings":";;AAaA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","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 './FlowMonitor';\nexport * from './RegistrationFlowMonitor';\nexport * from './AuthenticationFlowMonitor';\nexport * from './PasswordRecoveryFlowMonitor';\n"],"file":"index.js"}
|