@okta/okta-auth-js 5.9.1 → 6.0.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 +56 -0
- package/README.md +16 -3
- package/cjs/AuthStateManager.js +2 -1
- package/cjs/AuthStateManager.js.map +1 -1
- package/cjs/OktaAuth.js +95 -78
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/OktaUserAgent.js.map +1 -1
- package/cjs/PromiseQueue.js +6 -1
- package/cjs/PromiseQueue.js.map +1 -1
- package/cjs/StorageManager.js +3 -1
- package/cjs/StorageManager.js.map +1 -1
- package/cjs/TokenManager.js +33 -5
- package/cjs/TokenManager.js.map +1 -1
- package/cjs/TransactionManager.js +17 -4
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/browser/browserStorage.js +7 -5
- package/cjs/browser/browserStorage.js.map +1 -1
- package/cjs/browser/fingerprint.js +3 -1
- package/cjs/browser/fingerprint.js.map +1 -1
- package/cjs/builderUtil.js +3 -17
- package/cjs/builderUtil.js.map +1 -1
- package/cjs/crypto/oidcHash.js.map +1 -1
- package/cjs/features.js +9 -3
- package/cjs/features.js.map +1 -1
- package/cjs/fetch/fetchRequest.js +2 -1
- package/cjs/fetch/fetchRequest.js.map +1 -1
- package/cjs/http/request.js +2 -0
- package/cjs/http/request.js.map +1 -1
- package/cjs/idx/authenticate.js +8 -5
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/Authenticator.js +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 +32 -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 +41 -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/emailVerify.js +73 -0
- package/cjs/idx/emailVerify.js.map +1 -0
- package/cjs/idx/flow/AuthenticationFlow.js +4 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/flow/FlowSpecification.js +16 -14
- package/cjs/idx/flow/FlowSpecification.js.map +1 -1
- package/cjs/idx/flow/RegistrationFlow.js +3 -0
- package/cjs/idx/flow/RegistrationFlow.js.map +1 -1
- package/cjs/idx/flow/index.js +0 -52
- package/cjs/idx/flow/index.js.map +1 -1
- package/cjs/idx/handleInteractionCodeRedirect.js +1 -0
- package/cjs/idx/handleInteractionCodeRedirect.js.map +1 -1
- package/cjs/idx/index.js +26 -0
- package/cjs/idx/index.js.map +1 -1
- package/cjs/idx/interact.js +47 -29
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +12 -14
- 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 +4 -7
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js +16 -14
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +55 -92
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +11 -12
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +8 -9
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +48 -35
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +53 -20
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +20 -19
- 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/cjs/idx/remediators/ChallengeAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ChallengePoll.js +26 -0
- package/cjs/idx/remediators/ChallengePoll.js.map +1 -0
- package/cjs/idx/remediators/EnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +55 -0
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -0
- package/cjs/idx/remediators/EnrollProfile.js +4 -1
- package/cjs/idx/remediators/EnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +80 -0
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -0
- package/cjs/idx/remediators/Identify.js +2 -35
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/ReEnrollAuthenticator.js +1 -0
- package/cjs/idx/remediators/ReEnrollAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/ResetAuthenticator.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/SelectAuthenticatorEnroll.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollProfile.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +74 -0
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -0
- package/cjs/idx/remediators/Skip.js +7 -0
- package/cjs/idx/remediators/Skip.js.map +1 -1
- package/cjs/idx/remediators/index.js +52 -0
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/remediators/util.js +7 -2
- package/cjs/idx/remediators/util.js.map +1 -1
- package/cjs/idx/run.js +110 -52
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js +4 -2
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +82 -69
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +21 -4
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/index.js +14 -0
- package/cjs/index.js.map +1 -1
- package/cjs/oidc/endpoints/authorize.js +2 -0
- package/cjs/oidc/endpoints/authorize.js.map +1 -1
- package/cjs/oidc/endpoints/token.js +1 -0
- package/cjs/oidc/endpoints/token.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js +3 -3
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/oidc/getToken.js +3 -1
- package/cjs/oidc/getToken.js.map +1 -1
- package/cjs/oidc/getWithRedirect.js +10 -37
- package/cjs/oidc/getWithRedirect.js.map +1 -1
- package/cjs/oidc/handleOAuthResponse.js +80 -86
- package/cjs/oidc/handleOAuthResponse.js.map +1 -1
- package/cjs/oidc/parseFromUrl.js.map +1 -1
- package/cjs/oidc/renewToken.js.map +1 -1
- package/cjs/oidc/renewTokens.js +1 -1
- package/cjs/oidc/renewTokens.js.map +1 -1
- package/cjs/oidc/revokeToken.js +28 -29
- package/cjs/oidc/revokeToken.js.map +1 -1
- package/cjs/oidc/util/index.js +14 -0
- package/cjs/oidc/util/index.js.map +1 -1
- package/cjs/oidc/util/loginRedirect.js +6 -1
- package/cjs/oidc/util/loginRedirect.js.map +1 -1
- package/cjs/oidc/util/oauth.js.map +1 -1
- package/cjs/oidc/util/oauthMeta.js +36 -0
- package/cjs/oidc/util/oauthMeta.js.map +1 -0
- package/cjs/oidc/util/pkce.js.map +1 -1
- package/cjs/oidc/util/prepareTokenParams.js +57 -36
- package/cjs/oidc/util/prepareTokenParams.js.map +1 -1
- package/cjs/oidc/util/validateClaims.js +2 -0
- package/cjs/oidc/util/validateClaims.js.map +1 -1
- package/cjs/oidc/verifyToken.js +2 -1
- package/cjs/oidc/verifyToken.js.map +1 -1
- package/cjs/options.js +6 -2
- package/cjs/options.js.map +1 -1
- package/cjs/server/serverStorage.js +1 -1
- package/cjs/server/serverStorage.js.map +1 -1
- package/cjs/services/TokenService.js +3 -0
- package/cjs/services/TokenService.js.map +1 -1
- package/cjs/tx/AuthTransaction.js +3 -0
- package/cjs/tx/AuthTransaction.js.map +1 -1
- package/cjs/tx/TransactionState.js +0 -17
- package/cjs/tx/TransactionState.js.map +1 -1
- package/cjs/tx/api.js +3 -2
- package/cjs/tx/api.js.map +1 -1
- package/cjs/types/Token.js.map +1 -1
- package/cjs/types/Transaction.js.map +1 -1
- package/cjs/util/index.js +0 -13
- package/cjs/util/index.js.map +1 -1
- package/cjs/util/url.js.map +1 -1
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.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 +2603 -1814
- package/esm/index.js.map +1 -1
- package/lib/AuthStateManager.d.ts +1 -2
- package/lib/OktaAuth.d.ts +4 -10
- package/lib/StorageManager.d.ts +1 -1
- package/lib/TokenManager.d.ts +4 -2
- package/lib/TransactionManager.d.ts +3 -2
- package/lib/browser/fingerprint.d.ts +1 -1
- package/lib/builderUtil.d.ts +1 -2
- package/lib/crypto/browser.d.ts +1 -1
- package/lib/features.d.ts +1 -1
- package/lib/idx/authenticate.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/lib/idx/cancel.d.ts +1 -1
- package/lib/{util → idx}/emailVerify.d.ts +10 -1
- package/lib/idx/flow/FlowSpecification.d.ts +1 -2
- package/lib/idx/flow/index.d.ts +0 -4
- package/lib/idx/index.d.ts +2 -0
- package/lib/idx/interact.d.ts +5 -11
- package/lib/idx/introspect.d.ts +3 -2
- package/lib/idx/{flow/AuthenticationFlowMonitor.d.ts → poll.d.ts} +3 -5
- package/lib/idx/proceed.d.ts +4 -1
- package/lib/idx/recoverPassword.d.ts +1 -1
- package/lib/idx/register.d.ts +1 -1
- package/lib/idx/remediate.d.ts +10 -4
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +12 -8
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +3 -4
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +13 -8
- package/lib/idx/remediators/Base/Remediator.d.ts +9 -6
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +9 -8
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +10 -5
- package/lib/idx/{flow/RegistrationFlowMonitor.d.ts → remediators/ChallengePoll.d.ts} +3 -3
- package/lib/idx/{flow/PasswordRecoveryFlowMonitor.d.ts → remediators/EnrollPoll.d.ts} +12 -4
- package/lib/idx/remediators/EnrollProfile.d.ts +1 -1
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +53 -0
- package/lib/idx/remediators/Identify.d.ts +2 -5
- package/lib/idx/remediators/ReEnrollAuthenticator.d.ts +2 -2
- package/lib/idx/remediators/RedirectIdp.d.ts +3 -3
- package/lib/idx/remediators/SelectAuthenticatorAuthenticate.d.ts +6 -2
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +39 -0
- package/lib/idx/remediators/Skip.d.ts +3 -0
- package/lib/idx/remediators/index.d.ts +4 -0
- package/lib/idx/remediators/util.d.ts +2 -2
- package/lib/idx/run.d.ts +4 -3
- package/lib/idx/startTransaction.d.ts +3 -2
- package/lib/idx/transactionMeta.d.ts +6 -27
- package/lib/idx/types/idx-js.d.ts +57 -2
- package/lib/idx/types/index.d.ts +25 -8
- package/lib/index.d.ts +1 -0
- package/lib/oidc/exchangeCodeForTokens.d.ts +12 -0
- package/lib/oidc/getWithRedirect.d.ts +1 -1
- package/lib/oidc/handleOAuthResponse.d.ts +1 -1
- package/lib/oidc/parseFromUrl.d.ts +1 -1
- package/lib/oidc/renewToken.d.ts +1 -1
- package/lib/oidc/renewTokens.d.ts +1 -1
- package/lib/oidc/util/browser.d.ts +1 -1
- package/lib/oidc/util/errors.d.ts +1 -1
- package/lib/oidc/util/index.d.ts +1 -0
- package/lib/oidc/util/oauth.d.ts +1 -8
- package/lib/oidc/util/oauthMeta.d.ts +2 -0
- package/lib/oidc/util/prepareTokenParams.d.ts +3 -0
- package/lib/server/serverStorage.d.ts +1 -1
- package/lib/services/TokenService.d.ts +2 -2
- package/lib/tx/AuthTransaction.d.ts +2 -2
- package/lib/tx/TransactionState.d.ts +11 -1
- package/lib/tx/api.d.ts +6 -6
- package/lib/types/OktaAuthOptions.d.ts +6 -6
- package/lib/types/Storage.d.ts +3 -3
- package/lib/types/Token.d.ts +1 -0
- package/lib/types/Transaction.d.ts +11 -0
- package/lib/types/UserClaims.d.ts +3 -3
- package/lib/types/api.d.ts +31 -17
- package/lib/util/console.d.ts +1 -1
- package/lib/util/index.d.ts +0 -1
- package/lib/util/types.d.ts +1 -1
- package/lib/util/url.d.ts +2 -2
- package/package.json +6 -8
- package/cjs/idx/flow/AuthenticationFlowMonitor.js +0 -45
- package/cjs/idx/flow/AuthenticationFlowMonitor.js.map +0 -1
- package/cjs/idx/flow/FlowMonitor.js +0 -69
- package/cjs/idx/flow/FlowMonitor.js.map +0 -1
- package/cjs/idx/flow/PasswordRecoveryFlowMonitor.js +0 -55
- package/cjs/idx/flow/PasswordRecoveryFlowMonitor.js.map +0 -1
- package/cjs/idx/flow/RegistrationFlowMonitor.js +0 -35
- package/cjs/idx/flow/RegistrationFlowMonitor.js.map +0 -1
- package/cjs/util/emailVerify.js +0 -28
- package/cjs/util/emailVerify.js.map +0 -1
- package/lib/idx/flow/FlowMonitor.d.ts +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/ChallengeAuthenticator.ts"],"names":["ChallengeAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/ChallengeAuthenticator.ts"],"names":["ChallengeAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;AAYA;;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMO,MAAMA,sBAAN,SAAqCC,wCAArC,CAAyD;;;8BAAnDD,sB,qBACc,yB","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 { VerifyAuthenticator, VerifyAuthenticatorValues } from './Base/VerifyAuthenticator';\n\nexport type ChallengeAuthenticatorValues = VerifyAuthenticatorValues;\n\nexport class ChallengeAuthenticator extends VerifyAuthenticator {\n static remediationName = 'challenge-authenticator';\n values!: ChallengeAuthenticatorValues;\n}\n"],"file":"ChallengeAuthenticator.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.ChallengePoll = void 0;
|
|
6
|
+
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
|
+
|
|
9
|
+
var _EnrollPoll = require("./EnrollPoll");
|
|
10
|
+
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
13
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
14
|
+
*
|
|
15
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
18
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
*
|
|
20
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
class ChallengePoll extends _EnrollPoll.EnrollPoll {}
|
|
23
|
+
|
|
24
|
+
exports.ChallengePoll = ChallengePoll;
|
|
25
|
+
(0, _defineProperty2.default)(ChallengePoll, "remediationName", 'challenge-poll');
|
|
26
|
+
//# sourceMappingURL=ChallengePoll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/ChallengePoll.ts"],"names":["ChallengePoll","EnrollPoll"],"mappings":";;;;;;;;AAYA;;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIO,MAAMA,aAAN,SAA4BC,sBAA5B,CAAsC;;;8BAAhCD,a,qBACc,gB","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 { EnrollPoll } from './EnrollPoll';\n\nexport class ChallengePoll extends EnrollPoll{\n static remediationName = 'challenge-poll';\n}\n"],"file":"ChallengePoll.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollAuthenticator.ts"],"names":["EnrollAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,mBAAN,SAAkCC,wCAAlC,CAAsD;;;8BAAhDD,mB,qBACc,sB","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 { VerifyAuthenticator, VerifyAuthenticatorValues } from './Base/VerifyAuthenticator';\n\nexport type EnrollAuthenticatorValues = VerifyAuthenticatorValues;\n\nexport class EnrollAuthenticator extends VerifyAuthenticator {\n static remediationName = 'enroll-authenticator';\n values
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollAuthenticator.ts"],"names":["EnrollAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,mBAAN,SAAkCC,wCAAlC,CAAsD;;;8BAAhDD,mB,qBACc,sB","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 { VerifyAuthenticator, VerifyAuthenticatorValues } from './Base/VerifyAuthenticator';\n\nexport type EnrollAuthenticatorValues = VerifyAuthenticatorValues;\n\nexport class EnrollAuthenticator extends VerifyAuthenticator {\n static remediationName = 'enroll-authenticator';\n values!: EnrollAuthenticatorValues;\n}\n"],"file":"EnrollAuthenticator.js"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.EnrollPoll = void 0;
|
|
6
|
+
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
|
+
|
|
9
|
+
var _Remediator = require("./Base/Remediator");
|
|
10
|
+
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
13
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
14
|
+
*
|
|
15
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
18
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
*
|
|
20
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
class EnrollPoll extends _Remediator.Remediator {
|
|
23
|
+
canRemediate() {
|
|
24
|
+
return Boolean(this.values.startPolling);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
getNextStep(context) {
|
|
28
|
+
const common = super.getNextStep(context);
|
|
29
|
+
let authenticator = this.getAuthenticator();
|
|
30
|
+
|
|
31
|
+
if (!authenticator && context !== null && context !== void 0 && context.currentAuthenticator) {
|
|
32
|
+
authenticator = context.currentAuthenticator.value;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return { ...common,
|
|
36
|
+
authenticator,
|
|
37
|
+
poll: {
|
|
38
|
+
required: true,
|
|
39
|
+
refresh: this.remediation.refresh
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
getValuesAfterProceed() {
|
|
45
|
+
let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'startPolling');
|
|
46
|
+
return trimmedValues.reduce((values, valueKey) => ({ ...values,
|
|
47
|
+
[valueKey]: this.values[valueKey]
|
|
48
|
+
}), {});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.EnrollPoll = EnrollPoll;
|
|
54
|
+
(0, _defineProperty2.default)(EnrollPoll, "remediationName", 'enroll-poll');
|
|
55
|
+
//# sourceMappingURL=EnrollPoll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollPoll.ts"],"names":["EnrollPoll","Remediator","canRemediate","Boolean","values","startPolling","getNextStep","context","common","authenticator","getAuthenticator","currentAuthenticator","value","poll","required","refresh","remediation","getValuesAfterProceed","trimmedValues","Object","keys","filter","valueKey","reduce"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAWO,MAAMA,UAAN,SAAyBC,sBAAzB,CAAoC;AAKzCC,EAAAA,YAAY,GAAG;AACb,WAAOC,OAAO,CAAC,KAAKC,MAAL,CAAYC,YAAb,CAAd;AACD;;AAEDC,EAAAA,WAAW,CAACC,OAAD,EAAiC;AAC1C,UAAMC,MAAM,GAAG,MAAMF,WAAN,CAAkBC,OAAlB,CAAf;AACA,QAAIE,aAAa,GAAG,KAAKC,gBAAL,EAApB;;AACA,QAAI,CAACD,aAAD,IAAkBF,OAAlB,aAAkBA,OAAlB,eAAkBA,OAAO,CAAEI,oBAA/B,EAAqD;AACnDF,MAAAA,aAAa,GAAGF,OAAO,CAACI,oBAAR,CAA6BC,KAA7C;AACD;;AACD,WAAO,EACL,GAAGJ,MADE;AAELC,MAAAA,aAFK;AAGLI,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,IADN;AAEJC,QAAAA,OAAO,EAAE,KAAKC,WAAL,CAAiBD;AAFtB;AAHD,KAAP;AAQD;;AAEDE,EAAAA,qBAAqB,GAAqB;AACxC,QAAIC,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKhB,MAAjB,EAAyBiB,MAAzB,CAAgCC,QAAQ,IAAIA,QAAQ,KAAK,cAAzD,CAApB;AACA,WAAOJ,aAAa,CAACK,MAAd,CAAqB,CAACnB,MAAD,EAASkB,QAAT,MAAuB,EAAC,GAAGlB,MAAJ;AAAY,OAACkB,QAAD,GAAY,KAAKlB,MAAL,CAAYkB,QAAZ;AAAxB,KAAvB,CAArB,EAA6F,EAA7F,CAAP;AACD;;AA5BwC;;;8BAA9BtB,U,qBACc,a","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 { Remediator, RemediationValues } from './Base/Remediator';\nimport { NextStep } from '../../types';\nimport { IdxContext } from '../types/idx-js';\n\nexport interface EnrollPollValues extends RemediationValues {\n startPolling?: boolean;\n}\n\nexport class EnrollPoll extends Remediator {\n static remediationName = 'enroll-poll';\n\n values!: EnrollPollValues;\n\n canRemediate() {\n return Boolean(this.values.startPolling);\n }\n\n getNextStep(context?: IdxContext): NextStep {\n const common = super.getNextStep(context);\n let authenticator = this.getAuthenticator();\n if (!authenticator && context?.currentAuthenticator) {\n authenticator = context.currentAuthenticator.value;\n }\n return {\n ...common,\n authenticator,\n poll: {\n required: true,\n refresh: this.remediation.refresh\n },\n };\n }\n\n getValuesAfterProceed(): EnrollPollValues {\n let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'startPolling');\n return trimmedValues.reduce((values, valueKey) => ({...values, [valueKey]: this.values[valueKey]}), {});\n }\n}\n"],"file":"EnrollPoll.js"}
|
|
@@ -8,6 +8,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
8
8
|
|
|
9
9
|
var _Remediator = require("./Base/Remediator");
|
|
10
10
|
|
|
11
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
12
|
+
|
|
11
13
|
/*!
|
|
12
14
|
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
13
15
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -28,7 +30,8 @@ class EnrollProfile extends _Remediator.Remediator {
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
canRemediate() {
|
|
31
|
-
const userProfileFromValues = this.getData().userProfile;
|
|
33
|
+
const userProfileFromValues = this.getData().userProfile; // eslint-disable-next-line max-len
|
|
34
|
+
|
|
32
35
|
const userProfileFromRemediation = this.remediation.value.find(({
|
|
33
36
|
name
|
|
34
37
|
}) => name === 'userProfile');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollProfile.ts"],"names":["EnrollProfile","Remediator","canRemediate","userProfileFromValues","getData","userProfile","userProfileFromRemediation","remediation","value","find","name","form","reduce","curr","required","mapUserProfile","profileAttributes","attributeNames","map","attributeValues","attributeName","values","getInputUserProfile","input","getErrorMessages","errorRemediation","errors","field","messages","push","message"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollProfile.ts"],"names":["EnrollProfile","Remediator","canRemediate","userProfileFromValues","getData","userProfile","userProfileFromRemediation","remediation","value","find","name","form","reduce","curr","required","mapUserProfile","profileAttributes","attributeNames","map","attributeValues","attributeName","values","getInputUserProfile","input","getErrorMessages","errorRemediation","errors","field","messages","push","message"],"mappings":";;;;;;;;AAeA;;AAfA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,MAAMA,aAAN,SAA4BC,sBAA5B,CAAuC;AAAA;AAAA;AAAA,+CAKtC;AACJ,qBAAe;AADX,KALsC;AAAA;;AAS5CC,EAAAA,YAAY,GAAG;AACb,UAAMC,qBAAqB,GAAG,KAAKC,OAAL,GAAeC,WAA7C,CADa,CAEb;;AACA,UAAMC,0BAA0B,GAAG,KAAKC,WAAL,CAAiBC,KAAjB,CAAwBC,IAAxB,CAA6B,CAAC;AAAEC,MAAAA;AAAF,KAAD,KAAcA,IAAI,KAAK,aAApD,CAAnC;AACA,WAAOJ,0BAA0B,CAACK,IAA3B,CAAiCH,KAAjC,CAAuCI,MAAvC,CAA8C,CAACV,YAAD,EAAeW,IAAf,KAAwB;AAC3E,UAAIA,IAAI,CAACC,QAAT,EAAmB;AACjBZ,QAAAA,YAAY,GAAGA,YAAY,IAAI,CAAC,CAACC,qBAAqB,CAACU,IAAI,CAACH,IAAN,CAAtD;AACD;;AACD,aAAOR,YAAP;AACD,KALM,EAKJ,IALI,CAAP;AAMD;;AAEDa,EAAAA,cAAc,CAAC;AAACJ,IAAAA,IAAI,EAAE;AAAEH,MAAAA,KAAK,EAAEQ;AAAT;AAAP,GAAD,EAAuC;AACnD,UAAMC,cAAc,GAAGD,iBAAiB,CAACE,GAAlB,CAAsB,CAAC;AAACR,MAAAA;AAAD,KAAD,KAAYA,IAAlC,CAAvB;AACA,WAAOO,cAAc,CAACL,MAAf,CAAsB,CAACO,eAAD,EAAkBC,aAAlB,KAC3B,KAAKC,MAAL,CAAYD,aAAZ,IAA6B,EAC7B,GAAGD,eAD0B;AAE7B,OAACC,aAAD,GAAiB,KAAKC,MAAL,CAAYD,aAAZ;AAFY,KAA7B,GAGED,eAJG,EAIe,EAJf,CAAP;AAKD;;AAEDG,EAAAA,mBAAmB,CAACC,KAAD,EAAQ;AACzB,WAAO,CAAC,GAAGA,KAAK,CAACZ,IAAN,CAAWH,KAAf,CAAP;AACD;;AAEDgB,EAAAA,gBAAgB,CAACC,gBAAD,EAAmB;AACjC,WAAOA,gBAAgB,CAACjB,KAAjB,CAAuB,CAAvB,EAA0BG,IAA1B,CAA+BH,KAA/B,CAAqCI,MAArC,CAA4C,CAACc,MAAD,EAASC,KAAT,KAAmB;AACpE,UAAIA,KAAK,CAACC,QAAV,EAAoB;AAClBF,QAAAA,MAAM,CAACG,IAAP,CAAYF,KAAK,CAACC,QAAN,CAAepB,KAAf,CAAqB,CAArB,EAAwBsB,OAApC;AACD;;AACD,aAAOJ,MAAP;AACD,KALM,EAKJ,EALI,CAAP;AAMD;;AAzC2C;;;8BAAjC1B,a,qBACc,gB","sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n\nimport { IdxRemediationValue } from '../types/idx-js';\nimport { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface EnrollProfileValues extends RemediationValues {\n firstName?: string;\n lastName?: string;\n email?: string;\n}\n\nexport class EnrollProfile extends Remediator {\n static remediationName = 'enroll-profile';\n\n values!: EnrollProfileValues;\n\n map = {\n 'userProfile': []\n };\n\n canRemediate() {\n const userProfileFromValues = this.getData().userProfile;\n // eslint-disable-next-line max-len\n const userProfileFromRemediation = this.remediation.value!.find(({ name }) => name === 'userProfile') as IdxRemediationValue;\n return userProfileFromRemediation.form!.value.reduce((canRemediate, curr) => {\n if (curr.required) {\n canRemediate = canRemediate && !!userProfileFromValues[curr.name];\n }\n return canRemediate;\n }, true);\n }\n\n mapUserProfile({form: { value: profileAttributes }}) {\n const attributeNames = profileAttributes.map(({name}) => name);\n return attributeNames.reduce((attributeValues, attributeName) => (\n this.values[attributeName] ? {\n ...attributeValues,\n [attributeName]: this.values[attributeName]\n } : attributeValues), {});\n }\n\n getInputUserProfile(input) {\n return [...input.form.value];\n }\n\n getErrorMessages(errorRemediation) {\n return errorRemediation.value[0].form.value.reduce((errors, field) => {\n if (field.messages) {\n errors.push(field.messages.value[0].message);\n }\n return errors;\n }, []);\n }\n}"],"file":"EnrollProfile.js"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.EnrollmentChannelData = void 0;
|
|
6
|
+
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
|
+
|
|
9
|
+
var _Remediator = require("./Base/Remediator");
|
|
10
|
+
|
|
11
|
+
/*!
|
|
12
|
+
* Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
13
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
14
|
+
*
|
|
15
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
18
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
*
|
|
20
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
class EnrollmentChannelData extends _Remediator.Remediator {
|
|
23
|
+
constructor(...args) {
|
|
24
|
+
super(...args);
|
|
25
|
+
(0, _defineProperty2.default)(this, "map", {
|
|
26
|
+
email: [],
|
|
27
|
+
phoneNumber: []
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
getInputEmail() {
|
|
32
|
+
return [{
|
|
33
|
+
name: 'email',
|
|
34
|
+
type: 'string',
|
|
35
|
+
required: true,
|
|
36
|
+
label: 'Email'
|
|
37
|
+
}];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
getInputPhoneNumber() {
|
|
41
|
+
return [{
|
|
42
|
+
name: 'phoneNumber',
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: true,
|
|
45
|
+
label: 'Phone Number'
|
|
46
|
+
}];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
canRemediate() {
|
|
50
|
+
return Boolean(this.values.email || this.values.phoneNumber);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
getNextStep(context) {
|
|
54
|
+
const common = super.getNextStep();
|
|
55
|
+
const authenticator = context.currentAuthenticator.value;
|
|
56
|
+
return { ...common,
|
|
57
|
+
authenticator
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
getData() {
|
|
62
|
+
return {
|
|
63
|
+
stateHandle: this.values.stateHandle,
|
|
64
|
+
email: this.values.email,
|
|
65
|
+
phoneNumber: this.values.phoneNumber
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
getValuesAfterProceed() {
|
|
70
|
+
let trimmedValues = Object.keys(this.values).filter(valueKey => !['email', 'phoneNumber'].includes(valueKey));
|
|
71
|
+
return trimmedValues.reduce((values, valueKey) => ({ ...values,
|
|
72
|
+
[valueKey]: this.values[valueKey]
|
|
73
|
+
}), {});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.EnrollmentChannelData = EnrollmentChannelData;
|
|
79
|
+
(0, _defineProperty2.default)(EnrollmentChannelData, "remediationName", 'enrollment-channel-data');
|
|
80
|
+
//# sourceMappingURL=EnrollmentChannelData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/EnrollmentChannelData.ts"],"names":["EnrollmentChannelData","Remediator","email","phoneNumber","getInputEmail","name","type","required","label","getInputPhoneNumber","canRemediate","Boolean","values","getNextStep","context","common","authenticator","currentAuthenticator","value","getData","stateHandle","getValuesAfterProceed","trimmedValues","Object","keys","filter","valueKey","includes","reduce"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,MAAMA,qBAAN,SAAoCC,sBAApC,CAA+C;AAAA;AAAA;AAAA,+CAK9C;AACJC,MAAAA,KAAK,EAAE,EADH;AAEJC,MAAAA,WAAW,EAAE;AAFT,KAL8C;AAAA;;AAUpDC,EAAAA,aAAa,GAAG;AACd,WAAO,CACL;AAAEC,MAAAA,IAAI,EAAE,OAAR;AAAiBC,MAAAA,IAAI,EAAE,QAAvB;AAAiCC,MAAAA,QAAQ,EAAE,IAA3C;AAAiDC,MAAAA,KAAK,EAAE;AAAxD,KADK,CAAP;AAGD;;AAEDC,EAAAA,mBAAmB,GAAG;AACpB,WAAO,CACL;AAAEJ,MAAAA,IAAI,EAAE,aAAR;AAAuBC,MAAAA,IAAI,EAAE,QAA7B;AAAuCC,MAAAA,QAAQ,EAAE,IAAjD;AAAuDC,MAAAA,KAAK,EAAE;AAA9D,KADK,CAAP;AAGD;;AAEDE,EAAAA,YAAY,GAAG;AACb,WAAOC,OAAO,CAAC,KAAKC,MAAL,CAAYV,KAAZ,IAAqB,KAAKU,MAAL,CAAYT,WAAlC,CAAd;AACD;;AAEDU,EAAAA,WAAW,CAACC,OAAD,EAAsB;AAC/B,UAAMC,MAAM,GAAG,MAAMF,WAAN,EAAf;AACA,UAAMG,aAAa,GAAGF,OAAO,CAACG,oBAAR,CAA6BC,KAAnD;AACA,WAAO,EACL,GAAGH,MADE;AAELC,MAAAA;AAFK,KAAP;AAID;;AAEDG,EAAAA,OAAO,GAAG;AACR,WAAO;AACLC,MAAAA,WAAW,EAAE,KAAKR,MAAL,CAAYQ,WADpB;AAELlB,MAAAA,KAAK,EAAE,KAAKU,MAAL,CAAYV,KAFd;AAGLC,MAAAA,WAAW,EAAE,KAAKS,MAAL,CAAYT;AAHpB,KAAP;AAKD;;AAEDkB,EAAAA,qBAAqB,GAAG;AACtB,QAAIC,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKZ,MAAjB,EAAyBa,MAAzB,CAAgCC,QAAQ,IAAI,CAAC,CAAC,OAAD,EAAU,aAAV,EAAyBC,QAAzB,CAAkCD,QAAlC,CAA7C,CAApB;AACA,WAAOJ,aAAa,CAACM,MAAd,CAAqB,CAAChB,MAAD,EAASc,QAAT,MAAuB,EAAC,GAAGd,MAAJ;AAAY,OAACc,QAAD,GAAY,KAAKd,MAAL,CAAYc,QAAZ;AAAxB,KAAvB,CAArB,EAA6F,EAA7F,CAAP;AACD;;AA9CmD;;;8BAAzC1B,qB,qBACc,yB","sourcesContent":["/*!\n * Copyright (c) 2021-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 { Remediator, RemediationValues } from './Base/Remediator';\nimport { IdxContext } from '../types/idx-js';\n\n\nexport type EnrollmentChannelDataValues = RemediationValues & {\n email?: string;\n phoneNumber?: string;\n};\n\nexport class EnrollmentChannelData extends Remediator {\n static remediationName = 'enrollment-channel-data';\n\n values!: EnrollmentChannelDataValues;\n\n map = {\n email: [],\n phoneNumber: []\n }\n\n getInputEmail() {\n return [\n { name: 'email', type: 'string', required: true, label: 'Email' },\n ];\n }\n\n getInputPhoneNumber() {\n return [\n { name: 'phoneNumber', type: 'string', required: true, label: 'Phone Number' },\n ];\n }\n\n canRemediate() {\n return Boolean(this.values.email || this.values.phoneNumber);\n }\n\n getNextStep(context: IdxContext) {\n const common = super.getNextStep();\n const authenticator = context.currentAuthenticator.value;\n return {\n ...common,\n authenticator,\n };\n }\n\n getData() {\n return {\n stateHandle: this.values.stateHandle,\n email: this.values.email,\n phoneNumber: this.values.phoneNumber\n };\n }\n\n getValuesAfterProceed() {\n let trimmedValues = Object.keys(this.values).filter(valueKey => !['email', 'phoneNumber'].includes(valueKey));\n return trimmedValues.reduce((values, valueKey) => ({...values, [valueKey]: this.values[valueKey]}), {});\n }\n}\n"],"file":"EnrollmentChannelData.js"}
|
|
@@ -8,8 +8,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
8
8
|
|
|
9
9
|
var _Remediator = require("./Base/Remediator");
|
|
10
10
|
|
|
11
|
-
var _types = require("../types");
|
|
12
|
-
|
|
13
11
|
/*!
|
|
14
12
|
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
15
13
|
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
@@ -22,27 +20,13 @@ var _types = require("../types");
|
|
|
22
20
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
23
21
|
*/
|
|
24
22
|
class Identify extends _Remediator.Remediator {
|
|
25
|
-
constructor(
|
|
26
|
-
super(
|
|
27
|
-
|
|
23
|
+
constructor(...args) {
|
|
24
|
+
super(...args);
|
|
28
25
|
(0, _defineProperty2.default)(this, "map", {
|
|
29
26
|
'identifier': ['username'],
|
|
30
27
|
'credentials': [],
|
|
31
28
|
'rememberMe': ['rememberMe']
|
|
32
29
|
});
|
|
33
|
-
const {
|
|
34
|
-
password,
|
|
35
|
-
authenticators
|
|
36
|
-
} = this.values;
|
|
37
|
-
|
|
38
|
-
if (password && !authenticators.some(authenticator => authenticator.type === 'password')) {
|
|
39
|
-
this.values = { ...this.values,
|
|
40
|
-
authenticators: [{
|
|
41
|
-
type: 'password',
|
|
42
|
-
key: _types.AuthenticatorKey.OKTA_PASSWORD
|
|
43
|
-
}, ...authenticators]
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
30
|
}
|
|
47
31
|
|
|
48
32
|
canRemediate() {
|
|
@@ -65,23 +49,6 @@ class Identify extends _Remediator.Remediator {
|
|
|
65
49
|
};
|
|
66
50
|
}
|
|
67
51
|
|
|
68
|
-
getValuesAfterProceed() {
|
|
69
|
-
// Handle username + password scenario
|
|
70
|
-
// remove "password" from authenticator array when remediation is finished
|
|
71
|
-
if (this.remediation.value.some(({
|
|
72
|
-
name
|
|
73
|
-
}) => name === 'credentials')) {
|
|
74
|
-
var _this$values$authenti;
|
|
75
|
-
|
|
76
|
-
const authenticators = (_this$values$authenti = this.values.authenticators) === null || _this$values$authenti === void 0 ? void 0 : _this$values$authenti.filter(authenticator => authenticator.key !== _types.AuthenticatorKey.OKTA_PASSWORD);
|
|
77
|
-
return { ...this.values,
|
|
78
|
-
authenticators
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return super.getValuesAfterProceed();
|
|
83
|
-
}
|
|
84
|
-
|
|
85
52
|
}
|
|
86
53
|
|
|
87
54
|
exports.Identify = Identify;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/Identify.ts"],"names":["Identify","Remediator","
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/Identify.ts"],"names":["Identify","Remediator","canRemediate","identifier","getData","mapCredentials","passcode","values","password","getInputCredentials","input","form","value","name","required"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUO,MAAMA,QAAN,SAAuBC,sBAAvB,CAAkC;AAAA;AAAA;AAAA,+CAKjC;AACJ,oBAAc,CAAC,UAAD,CADV;AAEJ,qBAAe,EAFX;AAGJ,oBAAc,CAAC,YAAD;AAHV,KALiC;AAAA;;AAWvCC,EAAAA,YAAY,GAAG;AACb,UAAM;AAAEC,MAAAA;AAAF,QAAiB,KAAKC,OAAL,EAAvB;AACA,WAAO,CAAC,CAACD,UAAT;AACD;;AAEDE,EAAAA,cAAc,GAAG;AACf,WAAO;AAAEC,MAAAA,QAAQ,EAAE,KAAKC,MAAL,CAAYC;AAAxB,KAAP;AACD;;AAEDC,EAAAA,mBAAmB,CAACC,KAAD,EAAQ;AACzB,WAAO,EACL,GAAGA,KAAK,CAACC,IAAN,CAAWC,KAAX,CAAiB,CAAjB,CADE;AAELC,MAAAA,IAAI,EAAE,UAFD;AAGLC,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAHX,KAAP;AAKD;;AA1BsC;;;8BAA5Bd,Q,qBACc,U","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 { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface IdentifyValues extends RemediationValues {\n username?: string;\n password?: string;\n}\n\nexport class Identify extends Remediator {\n static remediationName = 'identify';\n\n values!: IdentifyValues;\n\n map = {\n 'identifier': ['username'],\n 'credentials': [],\n 'rememberMe': ['rememberMe'],\n };\n\n canRemediate() {\n const { identifier } = this.getData();\n return !!identifier;\n }\n\n mapCredentials() {\n return { passcode: this.values.password };\n }\n\n getInputCredentials(input) {\n return {\n ...input.form.value[0],\n name: 'password',\n required: input.required\n };\n }\n\n}\n"],"file":"Identify.js"}
|
|
@@ -34,6 +34,7 @@ class ReEnrollAuthenticator extends _Remediator.Remediator {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
getInputCredentials(input) {
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
38
|
const challengeType = this.getAuthenticator().type;
|
|
38
39
|
const name = challengeType === 'password' ? 'newPassword' : 'verificationCode';
|
|
39
40
|
return { ...input.form.value[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/ReEnrollAuthenticator.ts"],"names":["ReEnrollAuthenticator","Remediator","mapCredentials","passcode","values","newPassword","getInputCredentials","input","challengeType","getAuthenticator","type","name","form","value"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASO,MAAMA,qBAAN,SAAoCC,sBAApC,CAA+C;AAAA;AAAA;AAAA,+CAK9C;AACJ,qBAAe;AADX,KAL8C;AAAA;;AASpDC,EAAAA,cAAc,GAAG;AACf,WAAO;AACLC,MAAAA,QAAQ,EAAE,KAAKC,MAAL,CAAYC;AADjB,KAAP;AAGD;;AAEDC,EAAAA,mBAAmB,CAACC,KAAD,EAAQ;AACzB,UAAMC,aAAa,GAAG,KAAKC,gBAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/ReEnrollAuthenticator.ts"],"names":["ReEnrollAuthenticator","Remediator","mapCredentials","passcode","values","newPassword","getInputCredentials","input","challengeType","getAuthenticator","type","name","form","value"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASO,MAAMA,qBAAN,SAAoCC,sBAApC,CAA+C;AAAA;AAAA;AAAA,+CAK9C;AACJ,qBAAe;AADX,KAL8C;AAAA;;AASpDC,EAAAA,cAAc,GAAG;AACf,WAAO;AACLC,MAAAA,QAAQ,EAAE,KAAKC,MAAL,CAAYC;AADjB,KAAP;AAGD;;AAEDC,EAAAA,mBAAmB,CAACC,KAAD,EAAQ;AACzB;AACA,UAAMC,aAAa,GAAG,KAAKC,gBAAL,GAAyBC,IAA/C;AACA,UAAMC,IAAI,GAAGH,aAAa,KAAK,UAAlB,GAA+B,aAA/B,GAA+C,kBAA5D;AACA,WAAO,EACL,GAAGD,KAAK,CAACK,IAAN,CAAWC,KAAX,CAAiB,CAAjB,CADE;AAELF,MAAAA;AAFK,KAAP;AAID;;AAvBmD;;;8BAAzCX,qB,qBACc,wB","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 { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface ReEnrollAuthenticatorValues extends RemediationValues {\n newPassword?: string;\n}\n\nexport class ReEnrollAuthenticator extends Remediator {\n static remediationName = 'reenroll-authenticator';\n\n values!: ReEnrollAuthenticatorValues;\n\n map = {\n 'credentials': []\n };\n\n mapCredentials() {\n return { \n passcode: this.values.newPassword,\n };\n }\n\n getInputCredentials(input) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const challengeType = this.getAuthenticator()!.type;\n const name = challengeType === 'password' ? 'newPassword' : 'verificationCode';\n return {\n ...input.form.value[0],\n name\n };\n }\n\n}\n"],"file":"ReEnrollAuthenticator.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/ResetAuthenticator.ts"],"names":["ResetAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,kBAAN,SAAiCC,wCAAjC,CAAqD;;;8BAA/CD,kB,qBACc,qB","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 { VerifyAuthenticator, VerifyAuthenticatorValues } from './Base/VerifyAuthenticator';\n\nexport type ResetAuthenticatorValues = VerifyAuthenticatorValues;\n\nexport class ResetAuthenticator extends VerifyAuthenticator {\n static remediationName = 'reset-authenticator';\n values
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/ResetAuthenticator.ts"],"names":["ResetAuthenticator","VerifyAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,kBAAN,SAAiCC,wCAAjC,CAAqD;;;8BAA/CD,kB,qBACc,qB","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 { VerifyAuthenticator, VerifyAuthenticatorValues } from './Base/VerifyAuthenticator';\n\nexport type ResetAuthenticatorValues = VerifyAuthenticatorValues;\n\nexport class ResetAuthenticator extends VerifyAuthenticator {\n static remediationName = 'reset-authenticator';\n values!: ResetAuthenticatorValues;\n}\n"],"file":"ResetAuthenticator.js"}
|
|
@@ -6,7 +6,11 @@ exports.SelectAuthenticatorAuthenticate = void 0;
|
|
|
6
6
|
|
|
7
7
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
8
|
|
|
9
|
-
var _SelectAuthenticator = require("
|
|
9
|
+
var _SelectAuthenticator = require("./Base/SelectAuthenticator");
|
|
10
|
+
|
|
11
|
+
var _util = require("./util");
|
|
12
|
+
|
|
13
|
+
var _types = require("../types");
|
|
10
14
|
|
|
11
15
|
/*!
|
|
12
16
|
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
@@ -19,7 +23,24 @@ var _SelectAuthenticator = require(".//Base/SelectAuthenticator");
|
|
|
19
23
|
*
|
|
20
24
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
25
|
*/
|
|
22
|
-
class SelectAuthenticatorAuthenticate extends _SelectAuthenticator.SelectAuthenticator {
|
|
26
|
+
class SelectAuthenticatorAuthenticate extends _SelectAuthenticator.SelectAuthenticator {
|
|
27
|
+
constructor(remediation, values = {}) {
|
|
28
|
+
var _getAuthenticatorFrom;
|
|
29
|
+
|
|
30
|
+
super(remediation, values); // Preset password authenticator to trigger recover action
|
|
31
|
+
|
|
32
|
+
const hasPasswordInOptions = (_getAuthenticatorFrom = (0, _util.getAuthenticatorFromRemediation)(remediation).options) === null || _getAuthenticatorFrom === void 0 ? void 0 : _getAuthenticatorFrom.some(({
|
|
33
|
+
relatesTo
|
|
34
|
+
}) => (relatesTo === null || relatesTo === void 0 ? void 0 : relatesTo.key) === _types.AuthenticatorKey.OKTA_PASSWORD);
|
|
35
|
+
|
|
36
|
+
if (hasPasswordInOptions && (this.values.flow === 'recoverPassword' || this.values.password)) {
|
|
37
|
+
this.values.authenticators = [...(this.values.authenticators || []), {
|
|
38
|
+
key: _types.AuthenticatorKey.OKTA_PASSWORD
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
23
44
|
|
|
24
45
|
exports.SelectAuthenticatorAuthenticate = SelectAuthenticatorAuthenticate;
|
|
25
46
|
(0, _defineProperty2.default)(SelectAuthenticatorAuthenticate, "remediationName", 'select-authenticator-authenticate');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/SelectAuthenticatorAuthenticate.ts"],"names":["SelectAuthenticatorAuthenticate","SelectAuthenticator"],"mappings":";;;;;;;;AAaA;;
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/SelectAuthenticatorAuthenticate.ts"],"names":["SelectAuthenticatorAuthenticate","SelectAuthenticator","constructor","remediation","values","hasPasswordInOptions","options","some","relatesTo","key","AuthenticatorKey","OKTA_PASSWORD","flow","password","authenticators"],"mappings":";;;;;;;;AAaA;;AACA;;AAEA;;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYO,MAAMA,+BAAN,SAA8CC,wCAA9C,CAAkE;AAIvEC,EAAAA,WAAW,CAACC,WAAD,EAA8BC,MAAiC,GAAG,EAAlE,EAAsE;AAAA;;AAC/E,UAAMD,WAAN,EAAmBC,MAAnB,EAD+E,CAG/E;;AACA,UAAMC,oBAAoB,4BAAG,2CAAgCF,WAAhC,EAC1BG,OADuB,0DAAG,sBACjBC,IADiB,CACZ,CAAC;AAAEC,MAAAA;AAAF,KAAD,KAAmB,CAAAA,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEC,GAAX,MAAmBC,wBAAiBC,aAD3C,CAA7B;;AAEA,QAAIN,oBAAoB,KAAK,KAAKD,MAAL,CAAYQ,IAAZ,KAAqB,iBAArB,IAA0C,KAAKR,MAAL,CAAYS,QAA3D,CAAxB,EAA8F;AAC5F,WAAKT,MAAL,CAAYU,cAAZ,GAA6B,CAC3B,IAAG,KAAKV,MAAL,CAAYU,cAAZ,IAA8B,EAAjC,CAD2B,EAE3B;AAAEL,QAAAA,GAAG,EAAEC,wBAAiBC;AAAxB,OAF2B,CAA7B;AAID;AACF;;AAhBsE;;;8BAA5DX,+B,qBACc,mC","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 { SelectAuthenticator, SelectAuthenticatorValues } from './Base/SelectAuthenticator';\nimport { getAuthenticatorFromRemediation } from './util';\nimport { IdxRemediation } from '../types/idx-js';\nimport { AuthenticatorKey, Authenticator } from '../types';\n\nexport type SelectAuthenticatorAuthenticateValues = SelectAuthenticatorValues & {\n password?: string;\n};\n\nexport class SelectAuthenticatorAuthenticate extends SelectAuthenticator {\n static remediationName = 'select-authenticator-authenticate';\n values!: SelectAuthenticatorAuthenticateValues;\n\n constructor(remediation: IdxRemediation, values: SelectAuthenticatorValues = {}) {\n super(remediation, values);\n\n // Preset password authenticator to trigger recover action\n const hasPasswordInOptions = getAuthenticatorFromRemediation(remediation)\n .options?.some(({ relatesTo }) => relatesTo?.key === AuthenticatorKey.OKTA_PASSWORD);\n if (hasPasswordInOptions && (this.values.flow === 'recoverPassword' || this.values.password)) {\n this.values.authenticators = [\n ...this.values.authenticators || [],\n { key: AuthenticatorKey.OKTA_PASSWORD }\n ] as Authenticator[];\n }\n }\n}\n"],"file":"SelectAuthenticatorAuthenticate.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/SelectAuthenticatorEnroll.ts"],"names":["SelectAuthenticatorEnroll","SelectAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,yBAAN,SAAwCC,wCAAxC,CAA4D;;;8BAAtDD,yB,qBACc,6B","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 { SelectAuthenticator, SelectAuthenticatorValues } from './Base/SelectAuthenticator';\n\nexport type SelectAuthenticatorEnrollValues = SelectAuthenticatorValues;\n\nexport class SelectAuthenticatorEnroll extends SelectAuthenticator {\n static remediationName = 'select-authenticator-enroll';\n values
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/SelectAuthenticatorEnroll.ts"],"names":["SelectAuthenticatorEnroll","SelectAuthenticator"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOO,MAAMA,yBAAN,SAAwCC,wCAAxC,CAA4D;;;8BAAtDD,yB,qBACc,6B","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 { SelectAuthenticator, SelectAuthenticatorValues } from './Base/SelectAuthenticator';\n\nexport type SelectAuthenticatorEnrollValues = SelectAuthenticatorValues;\n\nexport class SelectAuthenticatorEnroll extends SelectAuthenticator {\n static remediationName = 'select-authenticator-enroll';\n values!: SelectAuthenticatorEnrollValues;\n}\n"],"file":"SelectAuthenticatorEnroll.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/SelectEnrollProfile.ts"],"names":["SelectEnrollProfile","Remediator","canRemediate"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQO,MAAMA,mBAAN,SAAkCC,sBAAlC,CAA6C;AAKlDC,EAAAA,YAAY,GAAG;AACb,WAAO,IAAP;AACD;;AAPiD;;;8BAAvCF,mB,qBACc,uB","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 { Remediator, RemediationValues } from './Base/Remediator';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SelectEnrollProfileValues extends RemediationValues {}\n\nexport class SelectEnrollProfile extends Remediator {\n static remediationName = 'select-enroll-profile';\n\n values
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/SelectEnrollProfile.ts"],"names":["SelectEnrollProfile","Remediator","canRemediate"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQO,MAAMA,mBAAN,SAAkCC,sBAAlC,CAA6C;AAKlDC,EAAAA,YAAY,GAAG;AACb,WAAO,IAAP;AACD;;AAPiD;;;8BAAvCF,mB,qBACc,uB","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 { Remediator, RemediationValues } from './Base/Remediator';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface SelectEnrollProfileValues extends RemediationValues {}\n\nexport class SelectEnrollProfile extends Remediator {\n static remediationName = 'select-enroll-profile';\n\n values!: SelectEnrollProfileValues;\n\n canRemediate() {\n return true;\n }\n}\n"],"file":"SelectEnrollProfile.js"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.SelectEnrollmentChannel = void 0;
|
|
6
|
+
|
|
7
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
8
|
+
|
|
9
|
+
var _Remediator = require("./Base/Remediator");
|
|
10
|
+
|
|
11
|
+
var _util = require("./util");
|
|
12
|
+
|
|
13
|
+
/*!
|
|
14
|
+
* Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
15
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
16
|
+
*
|
|
17
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
20
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
*
|
|
22
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
class SelectEnrollmentChannel extends _Remediator.Remediator {
|
|
25
|
+
canRemediate() {
|
|
26
|
+
return Boolean(this.values.channel);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
getNextStep(context) {
|
|
30
|
+
const common = super.getNextStep();
|
|
31
|
+
const options = this.getChannels();
|
|
32
|
+
const authenticator = context.currentAuthenticator.value;
|
|
33
|
+
return { ...common,
|
|
34
|
+
...(options && {
|
|
35
|
+
options
|
|
36
|
+
}),
|
|
37
|
+
authenticator
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
getChannels() {
|
|
42
|
+
var _remediationValue$for;
|
|
43
|
+
|
|
44
|
+
const authenticator = (0, _util.getAuthenticatorFromRemediation)(this.remediation);
|
|
45
|
+
const remediationValue = authenticator.value;
|
|
46
|
+
return (_remediationValue$for = remediationValue.form.value.find(({
|
|
47
|
+
name
|
|
48
|
+
}) => name === 'channel')) === null || _remediationValue$for === void 0 ? void 0 : _remediationValue$for.options;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getData() {
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
53
|
+
const remediationValue = this.remediation.value[0].value;
|
|
54
|
+
return {
|
|
55
|
+
authenticator: {
|
|
56
|
+
id: remediationValue.form.value[0].value,
|
|
57
|
+
channel: this.values.channel
|
|
58
|
+
},
|
|
59
|
+
stateHandle: this.values.stateHandle
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getValuesAfterProceed() {
|
|
64
|
+
let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'channel');
|
|
65
|
+
return trimmedValues.reduce((values, valueKey) => ({ ...values,
|
|
66
|
+
[valueKey]: this.values[valueKey]
|
|
67
|
+
}), {});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.SelectEnrollmentChannel = SelectEnrollmentChannel;
|
|
73
|
+
(0, _defineProperty2.default)(SelectEnrollmentChannel, "remediationName", 'select-enrollment-channel');
|
|
74
|
+
//# sourceMappingURL=SelectEnrollmentChannel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/SelectEnrollmentChannel.ts"],"names":["SelectEnrollmentChannel","Remediator","canRemediate","Boolean","values","channel","getNextStep","context","common","options","getChannels","authenticator","currentAuthenticator","value","remediation","remediationValue","form","find","name","getData","id","stateHandle","getValuesAfterProceed","trimmedValues","Object","keys","filter","valueKey","reduce"],"mappings":";;;;;;;;AAaA;;AAEA;;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAaO,MAAMA,uBAAN,SAAsCC,sBAAtC,CAAiD;AAKtDC,EAAAA,YAAY,GAAG;AACb,WAAOC,OAAO,CAAC,KAAKC,MAAL,CAAYC,OAAb,CAAd;AACD;;AAEDC,EAAAA,WAAW,CAACC,OAAD,EAAsB;AAC/B,UAAMC,MAAM,GAAG,MAAMF,WAAN,EAAf;AACA,UAAMG,OAAO,GAAG,KAAKC,WAAL,EAAhB;AACA,UAAMC,aAAa,GAAGJ,OAAO,CAACK,oBAAR,CAA6BC,KAAnD;AACA,WAAO,EACL,GAAGL,MADE;AAEL,UAAIC,OAAO,IAAI;AAAEA,QAAAA;AAAF,OAAf,CAFK;AAGLE,MAAAA;AAHK,KAAP;AAKD;;AAEOD,EAAAA,WAAW,GAA4B;AAAA;;AAC7C,UAAMC,aAAkC,GAAG,2CAAgC,KAAKG,WAArC,CAA3C;AACA,UAAMC,gBAAgB,GAAGJ,aAAa,CAACE,KAAvC;AACA,oCAAOE,gBAAgB,CAACC,IAAjB,CAAsBH,KAAtB,CAA4BI,IAA5B,CAAiC,CAAC;AAAEC,MAAAA;AAAF,KAAD,KAAcA,IAAI,KAAK,SAAxD,CAAP,0DAAO,sBAAoET,OAA3E;AACD;;AAEDU,EAAAA,OAAO,GAAG;AACR;AACA,UAAMJ,gBAAgB,GAAG,KAAKD,WAAL,CAAkBD,KAAlB,CAAyB,CAAzB,EAA4BA,KAArD;AACA,WAAO;AACLF,MAAAA,aAAa,EAAE;AACbS,QAAAA,EAAE,EAAEL,gBAAgB,CAACC,IAAjB,CAAsBH,KAAtB,CAA4B,CAA5B,EAA+BA,KADtB;AAEbR,QAAAA,OAAO,EAAE,KAAKD,MAAL,CAAYC;AAFR,OADV;AAKLgB,MAAAA,WAAW,EAAE,KAAKjB,MAAL,CAAYiB;AALpB,KAAP;AAQD;;AAEDC,EAAAA,qBAAqB,GAAG;AACtB,QAAIC,aAAa,GAAGC,MAAM,CAACC,IAAP,CAAY,KAAKrB,MAAjB,EAAyBsB,MAAzB,CAAgCC,QAAQ,IAAIA,QAAQ,KAAK,SAAzD,CAApB;AACA,WAAOJ,aAAa,CAACK,MAAd,CAAqB,CAACxB,MAAD,EAASuB,QAAT,MAAuB,EAAC,GAAGvB,MAAJ;AAAY,OAACuB,QAAD,GAAY,KAAKvB,MAAL,CAAYuB,QAAZ;AAAxB,KAAvB,CAArB,EAA6F,EAA7F,CAAP;AACD;;AA1CqD;;;8BAA3C3B,uB,qBACc,2B","sourcesContent":["/*!\n * Copyright (c) 2021-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 { Remediator, RemediationValues } from './Base/Remediator';\nimport { IdxRemediationValueForm, IdxOption, IdxRemediationValue, IdxContext } from '../types/idx-js';\nimport { getAuthenticatorFromRemediation } from './util';\n\n\n\nexport type SelectEnrollmentChannelValues = RemediationValues & {\n channel?: string;\n};\n\nexport class SelectEnrollmentChannel extends Remediator {\n static remediationName = 'select-enrollment-channel';\n\n values!: SelectEnrollmentChannelValues;\n\n canRemediate() {\n return Boolean(this.values.channel);\n }\n\n getNextStep(context: IdxContext) {\n const common = super.getNextStep();\n const options = this.getChannels();\n const authenticator = context.currentAuthenticator.value;\n return {\n ...common,\n ...(options && { options }),\n authenticator,\n };\n }\n\n private getChannels(): IdxOption[] | undefined {\n const authenticator: IdxRemediationValue = getAuthenticatorFromRemediation(this.remediation);\n const remediationValue = authenticator.value as IdxRemediationValueForm;\n return remediationValue.form.value.find(({ name }) => name === 'channel')?.options;\n }\n\n getData() {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const remediationValue = this.remediation!.value![0].value as IdxRemediationValueForm;\n return {\n authenticator: {\n id: remediationValue.form.value[0].value,\n channel: this.values.channel,\n },\n stateHandle: this.values.stateHandle,\n\n };\n }\n\n getValuesAfterProceed() {\n let trimmedValues = Object.keys(this.values).filter(valueKey => valueKey !== 'channel');\n return trimmedValues.reduce((values, valueKey) => ({...values, [valueKey]: this.values[valueKey]}), {});\n }\n}\n"],"file":"SelectEnrollmentChannel.js"}
|
|
@@ -20,6 +20,13 @@ var _Remediator = require("./Base/Remediator");
|
|
|
20
20
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
21
21
|
*/
|
|
22
22
|
class Skip extends _Remediator.Remediator {
|
|
23
|
+
constructor(...args) {
|
|
24
|
+
super(...args);
|
|
25
|
+
(0, _defineProperty2.default)(this, "map", {
|
|
26
|
+
skip: ['skip']
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
canRemediate() {
|
|
24
31
|
return !!this.values.skip;
|
|
25
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../lib/idx/remediators/Skip.ts"],"names":["Skip","Remediator","
|
|
1
|
+
{"version":3,"sources":["../../../../lib/idx/remediators/Skip.ts"],"names":["Skip","Remediator","skip","canRemediate","values"],"mappings":";;;;;;;;AAaA;;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASO,MAAMA,IAAN,SAAmBC,sBAAnB,CAA8B;AAAA;AAAA;AAAA,+CAK7B;AACJC,MAAAA,IAAI,EAAE,CAAC,MAAD;AADF,KAL6B;AAAA;;AASnCC,EAAAA,YAAY,GAAG;AACb,WAAO,CAAC,CAAC,KAAKC,MAAL,CAAYF,IAArB;AACD;;AAXkC;;;8BAAxBF,I,qBACc,M","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 { Remediator, RemediationValues } from './Base/Remediator';\n\nexport interface SkipValues extends RemediationValues {\n skip?: boolean;\n}\n\nexport class Skip extends Remediator {\n static remediationName = 'skip';\n\n values!: SkipValues;\n\n map = {\n skip: ['skip']\n }\n\n canRemediate() {\n return !!this.values.skip;\n }\n\n}\n"],"file":"Skip.js"}
|
|
@@ -26,6 +26,45 @@ Object.keys(_EnrollAuthenticator).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
var _EnrollPoll = require("./EnrollPoll");
|
|
30
|
+
|
|
31
|
+
Object.keys(_EnrollPoll).forEach(function (key) {
|
|
32
|
+
if (key === "default" || key === "__esModule") return;
|
|
33
|
+
if (key in exports && exports[key] === _EnrollPoll[key]) return;
|
|
34
|
+
Object.defineProperty(exports, key, {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return _EnrollPoll[key];
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
var _SelectEnrollmentChannel = require("./SelectEnrollmentChannel");
|
|
43
|
+
|
|
44
|
+
Object.keys(_SelectEnrollmentChannel).forEach(function (key) {
|
|
45
|
+
if (key === "default" || key === "__esModule") return;
|
|
46
|
+
if (key in exports && exports[key] === _SelectEnrollmentChannel[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () {
|
|
50
|
+
return _SelectEnrollmentChannel[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _EnrollmentChannelData = require("./EnrollmentChannelData");
|
|
56
|
+
|
|
57
|
+
Object.keys(_EnrollmentChannelData).forEach(function (key) {
|
|
58
|
+
if (key === "default" || key === "__esModule") return;
|
|
59
|
+
if (key in exports && exports[key] === _EnrollmentChannelData[key]) return;
|
|
60
|
+
Object.defineProperty(exports, key, {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _EnrollmentChannelData[key];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
29
68
|
var _ChallengeAuthenticator = require("./ChallengeAuthenticator");
|
|
30
69
|
|
|
31
70
|
Object.keys(_ChallengeAuthenticator).forEach(function (key) {
|
|
@@ -39,6 +78,19 @@ Object.keys(_ChallengeAuthenticator).forEach(function (key) {
|
|
|
39
78
|
});
|
|
40
79
|
});
|
|
41
80
|
|
|
81
|
+
var _ChallengePoll = require("./ChallengePoll");
|
|
82
|
+
|
|
83
|
+
Object.keys(_ChallengePoll).forEach(function (key) {
|
|
84
|
+
if (key === "default" || key === "__esModule") return;
|
|
85
|
+
if (key in exports && exports[key] === _ChallengePoll[key]) return;
|
|
86
|
+
Object.defineProperty(exports, key, {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () {
|
|
89
|
+
return _ChallengePoll[key];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
42
94
|
var _ResetAuthenticator = require("./ResetAuthenticator");
|
|
43
95
|
|
|
44
96
|
Object.keys(_ResetAuthenticator).forEach(function (key) {
|