@okta/okta-auth-js 6.4.1 → 6.5.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 +25 -0
- package/README.md +1 -1
- package/cjs/OktaAuth.js.map +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/TransactionManager.js +25 -13
- package/cjs/TransactionManager.js.map +1 -1
- package/cjs/crypto/node.js +11 -16
- package/cjs/crypto/node.js.map +1 -1
- package/cjs/errors/AuthApiError.js.map +1 -1
- package/cjs/errors/AuthSdkError.js.map +1 -1
- package/cjs/idx/authenticate.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js +1 -1
- package/cjs/idx/authenticator/SecurityQuestionEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js +12 -1
- package/cjs/idx/authenticator/SecurityQuestionVerification.js.map +1 -1
- package/cjs/idx/cancel.js.map +1 -1
- package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
- package/cjs/idx/idxState/v1/generateIdxAction.js +0 -2
- package/cjs/idx/idxState/v1/generateIdxAction.js.map +1 -1
- package/cjs/idx/idxState/v1/idxResponseParser.js +10 -5
- package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
- package/cjs/idx/idxState/v1/makeIdxState.js +6 -0
- package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
- package/cjs/idx/interact.js +16 -16
- package/cjs/idx/interact.js.map +1 -1
- package/cjs/idx/introspect.js +1 -1
- package/cjs/idx/introspect.js.map +1 -1
- package/cjs/idx/proceed.js.map +1 -1
- package/cjs/idx/recoverPassword.js.map +1 -1
- package/cjs/idx/register.js.map +1 -1
- package/cjs/idx/remediate.js +21 -21
- package/cjs/idx/remediate.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +17 -8
- package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js +2 -1
- package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
- package/cjs/idx/remediators/Base/AuthenticatorData.js +4 -3
- package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
- package/cjs/idx/remediators/Base/Remediator.js +1 -1
- package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
- package/cjs/idx/remediators/Base/SelectAuthenticator.js +20 -7
- package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js +2 -2
- package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
- package/cjs/idx/remediators/EnrollPoll.js +2 -2
- package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
- package/cjs/idx/remediators/EnrollmentChannelData.js +2 -2
- package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +103 -0
- package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
- package/cjs/idx/remediators/GenericRemediator/index.js +17 -0
- package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -0
- package/cjs/idx/remediators/GenericRemediator/util.js +81 -0
- package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -0
- package/cjs/idx/remediators/Identify.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +1 -1
- package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
- package/cjs/idx/remediators/SelectEnrollmentChannel.js +3 -2
- package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
- package/cjs/idx/remediators/index.js +13 -0
- package/cjs/idx/remediators/index.js.map +1 -1
- package/cjs/idx/run.js +54 -16
- package/cjs/idx/run.js.map +1 -1
- package/cjs/idx/startTransaction.js.map +1 -1
- package/cjs/idx/transactionMeta.js +4 -2
- package/cjs/idx/transactionMeta.js.map +1 -1
- package/cjs/idx/types/api.js +42 -0
- package/cjs/idx/types/api.js.map +1 -0
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js +27 -51
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/types/options.js +2 -0
- package/cjs/idx/types/options.js.map +1 -0
- package/cjs/idx/unlockAccount.js.map +1 -1
- package/cjs/idx/util.js +58 -10
- package/cjs/idx/util.js.map +1 -1
- package/cjs/oidc/exchangeCodeForTokens.js.map +1 -1
- package/cjs/options/index.js +6 -0
- package/cjs/options/index.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/esm.browser.js +567 -301
- package/esm/esm.browser.js.map +1 -1
- package/esm/esm.node.mjs +567 -301
- package/esm/esm.node.mjs.map +1 -1
- package/lib/OktaAuth.d.ts +2 -2
- package/lib/TransactionManager.d.ts +4 -3
- package/lib/errors/AuthApiError.d.ts +2 -2
- package/lib/errors/AuthSdkError.d.ts +2 -2
- package/lib/idx/authenticate.d.ts +1 -3
- package/lib/idx/authenticator/SecurityQuestionVerification.d.ts +1 -0
- package/lib/idx/cancel.d.ts +2 -3
- package/lib/idx/emailVerify.d.ts +1 -1
- package/lib/idx/idxState/v1/generateIdxAction.d.ts +2 -2
- package/lib/idx/interact.d.ts +2 -16
- package/lib/idx/introspect.d.ts +1 -7
- package/lib/idx/proceed.d.ts +1 -9
- package/lib/idx/recoverPassword.d.ts +1 -3
- package/lib/idx/register.d.ts +1 -3
- package/lib/idx/remediate.d.ts +3 -10
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +1 -11
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +2 -2
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +5 -1
- package/lib/idx/remediators/Base/Remediator.d.ts +5 -4
- package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +8 -3
- package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +2 -1
- package/lib/idx/remediators/EnrollPoll.d.ts +2 -2
- package/lib/idx/remediators/EnrollmentChannelData.d.ts +8 -4
- package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +9 -0
- package/lib/idx/remediators/GenericRemediator/index.d.ts +1 -0
- package/lib/idx/remediators/GenericRemediator/util.d.ts +3 -0
- package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +1 -1
- package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +8 -4
- package/lib/idx/remediators/index.d.ts +1 -0
- package/lib/idx/run.d.ts +1 -10
- package/lib/idx/startTransaction.d.ts +2 -3
- package/lib/idx/types/api.d.ts +104 -0
- package/lib/idx/types/idx-js.d.ts +16 -5
- package/lib/idx/types/index.d.ts +4 -110
- package/lib/idx/types/options.d.ts +46 -0
- package/lib/idx/unlockAccount.d.ts +1 -3
- package/lib/idx/util.d.ts +4 -3
- package/lib/types/OAuth.d.ts +2 -0
- package/lib/types/OktaAuthOptions.d.ts +28 -11
- package/lib/types/Storage.d.ts +2 -1
- package/lib/types/Transaction.d.ts +8 -28
- package/lib/types/api.d.ts +12 -36
- package/package.json +6 -5
package/esm/esm.browser.js
CHANGED
|
@@ -58,11 +58,11 @@ import _Number$isInteger from '@babel/runtime-corejs3/core-js-stable/number/is-i
|
|
|
58
58
|
import _URL2 from '@babel/runtime-corejs3/core-js-stable/url';
|
|
59
59
|
import Emitter from 'tiny-emitter';
|
|
60
60
|
|
|
61
|
-
function _createSuper$
|
|
62
|
-
function _isNativeReflectConstruct$
|
|
61
|
+
function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
62
|
+
function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
63
63
|
var CustomError = function (_Error) {
|
|
64
64
|
_inherits(CustomError, _Error);
|
|
65
|
-
var _super = _createSuper$
|
|
65
|
+
var _super = _createSuper$y(CustomError);
|
|
66
66
|
function CustomError(message) {
|
|
67
67
|
var _this;
|
|
68
68
|
_classCallCheck(this, CustomError);
|
|
@@ -73,11 +73,11 @@ var CustomError = function (_Error) {
|
|
|
73
73
|
return CustomError;
|
|
74
74
|
}( _wrapNativeSuper(Error));
|
|
75
75
|
|
|
76
|
-
function _createSuper$
|
|
77
|
-
function _isNativeReflectConstruct$
|
|
76
|
+
function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
77
|
+
function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
78
78
|
var AuthApiError = function (_CustomError) {
|
|
79
79
|
_inherits(AuthApiError, _CustomError);
|
|
80
|
-
var _super = _createSuper$
|
|
80
|
+
var _super = _createSuper$x(AuthApiError);
|
|
81
81
|
function AuthApiError(err, xhr) {
|
|
82
82
|
var _this;
|
|
83
83
|
_classCallCheck(this, AuthApiError);
|
|
@@ -97,11 +97,11 @@ var AuthApiError = function (_CustomError) {
|
|
|
97
97
|
return AuthApiError;
|
|
98
98
|
}(CustomError);
|
|
99
99
|
|
|
100
|
-
function _createSuper$
|
|
101
|
-
function _isNativeReflectConstruct$
|
|
100
|
+
function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
101
|
+
function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
102
102
|
var AuthPollStopError = function (_CustomError) {
|
|
103
103
|
_inherits(AuthPollStopError, _CustomError);
|
|
104
|
-
var _super = _createSuper$
|
|
104
|
+
var _super = _createSuper$w(AuthPollStopError);
|
|
105
105
|
function AuthPollStopError() {
|
|
106
106
|
_classCallCheck(this, AuthPollStopError);
|
|
107
107
|
var message = 'The poll was stopped by the sdk';
|
|
@@ -110,11 +110,11 @@ var AuthPollStopError = function (_CustomError) {
|
|
|
110
110
|
return AuthPollStopError;
|
|
111
111
|
}(CustomError);
|
|
112
112
|
|
|
113
|
-
function _createSuper$
|
|
114
|
-
function _isNativeReflectConstruct$
|
|
113
|
+
function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
114
|
+
function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
115
115
|
var AuthSdkError = function (_CustomError) {
|
|
116
116
|
_inherits(AuthSdkError, _CustomError);
|
|
117
|
-
var _super = _createSuper$
|
|
117
|
+
var _super = _createSuper$v(AuthSdkError);
|
|
118
118
|
function AuthSdkError(msg, xhr) {
|
|
119
119
|
var _this;
|
|
120
120
|
_classCallCheck(this, AuthSdkError);
|
|
@@ -133,11 +133,11 @@ var AuthSdkError = function (_CustomError) {
|
|
|
133
133
|
return AuthSdkError;
|
|
134
134
|
}(CustomError);
|
|
135
135
|
|
|
136
|
-
function _createSuper$
|
|
137
|
-
function _isNativeReflectConstruct$
|
|
136
|
+
function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
137
|
+
function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
138
138
|
var OAuthError = function (_CustomError) {
|
|
139
139
|
_inherits(OAuthError, _CustomError);
|
|
140
|
-
var _super = _createSuper$
|
|
140
|
+
var _super = _createSuper$u(OAuthError);
|
|
141
141
|
function OAuthError(errorCode, summary) {
|
|
142
142
|
var _this;
|
|
143
143
|
_classCallCheck(this, OAuthError);
|
|
@@ -4233,13 +4233,15 @@ var TransactionManager = function () {
|
|
|
4233
4233
|
var transactionStorage = this.storageManager.getTransactionStorage();
|
|
4234
4234
|
var meta = transactionStorage.getStorage();
|
|
4235
4235
|
transactionStorage.clearStorage();
|
|
4236
|
-
this.clearIdxResponse();
|
|
4237
4236
|
if (this.enableSharedStorage && options.clearSharedStorage !== false) {
|
|
4238
4237
|
var state = options.state || (meta === null || meta === void 0 ? void 0 : meta.state);
|
|
4239
4238
|
if (state) {
|
|
4240
4239
|
clearTransactionFromSharedStorage(this.storageManager, state);
|
|
4241
4240
|
}
|
|
4242
4241
|
}
|
|
4242
|
+
if (options.clearIdxResponse !== false) {
|
|
4243
|
+
this.clearIdxResponse();
|
|
4244
|
+
}
|
|
4243
4245
|
if (!this.legacyWidgetSupport) {
|
|
4244
4246
|
return;
|
|
4245
4247
|
}
|
|
@@ -4435,9 +4437,7 @@ var TransactionManager = function () {
|
|
|
4435
4437
|
}
|
|
4436
4438
|
}, {
|
|
4437
4439
|
key: "saveIdxResponse",
|
|
4438
|
-
value: function saveIdxResponse(
|
|
4439
|
-
var rawIdxResponse = _ref.rawIdxResponse,
|
|
4440
|
-
requestDidSucceed = _ref.requestDidSucceed;
|
|
4440
|
+
value: function saveIdxResponse(data) {
|
|
4441
4441
|
if (!this.saveLastResponse) {
|
|
4442
4442
|
return;
|
|
4443
4443
|
}
|
|
@@ -4445,14 +4445,11 @@ var TransactionManager = function () {
|
|
|
4445
4445
|
if (!storage) {
|
|
4446
4446
|
return;
|
|
4447
4447
|
}
|
|
4448
|
-
storage.setStorage(
|
|
4449
|
-
rawIdxResponse: rawIdxResponse,
|
|
4450
|
-
requestDidSucceed: requestDidSucceed
|
|
4451
|
-
});
|
|
4448
|
+
storage.setStorage(data);
|
|
4452
4449
|
}
|
|
4453
4450
|
}, {
|
|
4454
4451
|
key: "loadIdxResponse",
|
|
4455
|
-
value: function loadIdxResponse() {
|
|
4452
|
+
value: function loadIdxResponse(options) {
|
|
4456
4453
|
if (!this.saveLastResponse) {
|
|
4457
4454
|
return null;
|
|
4458
4455
|
}
|
|
@@ -4464,6 +4461,16 @@ var TransactionManager = function () {
|
|
|
4464
4461
|
if (!storedValue || !isRawIdxResponse(storedValue.rawIdxResponse)) {
|
|
4465
4462
|
return null;
|
|
4466
4463
|
}
|
|
4464
|
+
if (options) {
|
|
4465
|
+
var stateHandle = options.stateHandle,
|
|
4466
|
+
interactionHandle = options.interactionHandle;
|
|
4467
|
+
if (stateHandle && storedValue.stateHandle !== stateHandle) {
|
|
4468
|
+
return null;
|
|
4469
|
+
}
|
|
4470
|
+
if (interactionHandle && storedValue.interactionHandle !== interactionHandle) {
|
|
4471
|
+
return null;
|
|
4472
|
+
}
|
|
4473
|
+
}
|
|
4467
4474
|
return storedValue;
|
|
4468
4475
|
}
|
|
4469
4476
|
}, {
|
|
@@ -4651,6 +4658,7 @@ function mergeOptions(options, args) {
|
|
|
4651
4658
|
}
|
|
4652
4659
|
function buildOptions() {
|
|
4653
4660
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4661
|
+
var _a;
|
|
4654
4662
|
assertValidConfig(args);
|
|
4655
4663
|
args = mergeOptions(getDefaultOptions(), args);
|
|
4656
4664
|
return removeNils({
|
|
@@ -4684,6 +4692,9 @@ function buildOptions() {
|
|
|
4684
4692
|
codeChallengeMethod: args.codeChallengeMethod,
|
|
4685
4693
|
recoveryToken: args.recoveryToken,
|
|
4686
4694
|
activationToken: args.activationToken,
|
|
4695
|
+
idx: {
|
|
4696
|
+
useGenericRemediator: !!((_a = args.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator)
|
|
4697
|
+
},
|
|
4687
4698
|
ignoreSignature: !!args.ignoreSignature,
|
|
4688
4699
|
clientSecret: args.clientSecret
|
|
4689
4700
|
});
|
|
@@ -4706,6 +4717,8 @@ function _createTransactionMeta() {
|
|
|
4706
4717
|
activationToken,
|
|
4707
4718
|
_Object$assign2$recov,
|
|
4708
4719
|
recoveryToken,
|
|
4720
|
+
_Object$assign2$maxAg,
|
|
4721
|
+
maxAge,
|
|
4709
4722
|
meta,
|
|
4710
4723
|
_args = arguments;
|
|
4711
4724
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -4718,12 +4731,13 @@ function _createTransactionMeta() {
|
|
|
4718
4731
|
case 3:
|
|
4719
4732
|
tokenParams = _context.sent;
|
|
4720
4733
|
pkceMeta = createOAuthMeta(authClient, tokenParams);
|
|
4721
|
-
_Object$assign2 = _Object$assign(_Object$assign({}, authClient.options), options), _Object$assign2$flow = _Object$assign2.flow, flow = _Object$assign2$flow === void 0 ? 'default' : _Object$assign2$flow, _Object$assign2$withC = _Object$assign2.withCredentials, withCredentials = _Object$assign2$withC === void 0 ? true : _Object$assign2$withC, _Object$assign2$activ = _Object$assign2.activationToken, activationToken = _Object$assign2$activ === void 0 ? undefined : _Object$assign2$activ, _Object$assign2$recov = _Object$assign2.recoveryToken, recoveryToken = _Object$assign2$recov === void 0 ? undefined : _Object$assign2$recov;
|
|
4734
|
+
_Object$assign2 = _Object$assign(_Object$assign({}, authClient.options), options), _Object$assign2$flow = _Object$assign2.flow, flow = _Object$assign2$flow === void 0 ? 'default' : _Object$assign2$flow, _Object$assign2$withC = _Object$assign2.withCredentials, withCredentials = _Object$assign2$withC === void 0 ? true : _Object$assign2$withC, _Object$assign2$activ = _Object$assign2.activationToken, activationToken = _Object$assign2$activ === void 0 ? undefined : _Object$assign2$activ, _Object$assign2$recov = _Object$assign2.recoveryToken, recoveryToken = _Object$assign2$recov === void 0 ? undefined : _Object$assign2$recov, _Object$assign2$maxAg = _Object$assign2.maxAge, maxAge = _Object$assign2$maxAg === void 0 ? undefined : _Object$assign2$maxAg;
|
|
4722
4735
|
meta = _Object$assign(_Object$assign({}, pkceMeta), {
|
|
4723
4736
|
flow: flow,
|
|
4724
4737
|
withCredentials: withCredentials,
|
|
4725
4738
|
activationToken: activationToken,
|
|
4726
|
-
recoveryToken: recoveryToken
|
|
4739
|
+
recoveryToken: recoveryToken,
|
|
4740
|
+
maxAge: maxAge
|
|
4727
4741
|
});
|
|
4728
4742
|
return _context.abrupt("return", meta);
|
|
4729
4743
|
case 8:
|
|
@@ -4851,6 +4865,7 @@ function _interact() {
|
|
|
4851
4865
|
codeChallengeMethod,
|
|
4852
4866
|
activationToken,
|
|
4853
4867
|
recoveryToken,
|
|
4868
|
+
maxAge,
|
|
4854
4869
|
clientSecret,
|
|
4855
4870
|
url,
|
|
4856
4871
|
params,
|
|
@@ -4877,31 +4892,30 @@ function _interact() {
|
|
|
4877
4892
|
case 7:
|
|
4878
4893
|
meta = _context.sent;
|
|
4879
4894
|
baseUrl = getOAuthBaseUrl(authClient);
|
|
4880
|
-
_meta = meta, clientId = _meta.clientId, redirectUri = _meta.redirectUri, state = _meta.state, scopes = _meta.scopes, withCredentials = _meta.withCredentials, codeChallenge = _meta.codeChallenge, codeChallengeMethod = _meta.codeChallengeMethod, activationToken = _meta.activationToken, recoveryToken = _meta.recoveryToken;
|
|
4895
|
+
_meta = meta, clientId = _meta.clientId, redirectUri = _meta.redirectUri, state = _meta.state, scopes = _meta.scopes, withCredentials = _meta.withCredentials, codeChallenge = _meta.codeChallenge, codeChallengeMethod = _meta.codeChallengeMethod, activationToken = _meta.activationToken, recoveryToken = _meta.recoveryToken, maxAge = _meta.maxAge;
|
|
4881
4896
|
clientSecret = options.clientSecret || authClient.options.clientSecret;
|
|
4882
4897
|
withCredentials = withCredentials !== null && withCredentials !== void 0 ? withCredentials : true;
|
|
4883
4898
|
url = "".concat(baseUrl, "/v1/interact");
|
|
4884
|
-
params = {
|
|
4899
|
+
params = _Object$assign(_Object$assign(_Object$assign(_Object$assign({
|
|
4885
4900
|
client_id: clientId,
|
|
4886
4901
|
scope: scopes.join(' '),
|
|
4887
4902
|
redirect_uri: redirectUri,
|
|
4888
4903
|
code_challenge: codeChallenge,
|
|
4889
4904
|
code_challenge_method: codeChallengeMethod,
|
|
4890
4905
|
state: state
|
|
4891
|
-
}
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
}
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
}
|
|
4906
|
+
}, activationToken && {
|
|
4907
|
+
activation_token: activationToken
|
|
4908
|
+
}), recoveryToken && {
|
|
4909
|
+
recovery_token: recoveryToken
|
|
4910
|
+
}), clientSecret && {
|
|
4911
|
+
client_secret: clientSecret
|
|
4912
|
+
}), maxAge && {
|
|
4913
|
+
max_age: maxAge
|
|
4914
|
+
});
|
|
4901
4915
|
headers = {
|
|
4902
4916
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
4903
4917
|
};
|
|
4904
|
-
_context.next =
|
|
4918
|
+
_context.next = 17;
|
|
4905
4919
|
return httpRequest(authClient, {
|
|
4906
4920
|
method: 'POST',
|
|
4907
4921
|
url: url,
|
|
@@ -4909,7 +4923,7 @@ function _interact() {
|
|
|
4909
4923
|
withCredentials: withCredentials,
|
|
4910
4924
|
args: params
|
|
4911
4925
|
});
|
|
4912
|
-
case
|
|
4926
|
+
case 17:
|
|
4913
4927
|
resp = _context.sent;
|
|
4914
4928
|
interactionHandle = resp.interaction_handle;
|
|
4915
4929
|
newMeta = _Object$assign(_Object$assign({}, meta), {
|
|
@@ -4922,7 +4936,7 @@ function _interact() {
|
|
|
4922
4936
|
});
|
|
4923
4937
|
saveTransactionMeta(authClient, newMeta);
|
|
4924
4938
|
return _context.abrupt("return", getResponse(newMeta));
|
|
4925
|
-
case
|
|
4939
|
+
case 22:
|
|
4926
4940
|
case "end":
|
|
4927
4941
|
return _context.stop();
|
|
4928
4942
|
}
|
|
@@ -5170,11 +5184,14 @@ var expandRelatesTo = function expandRelatesTo(idxResponse, value) {
|
|
|
5170
5184
|
});
|
|
5171
5185
|
};
|
|
5172
5186
|
var convertRemediationAction = function convertRemediationAction(authClient, remediation, toPersist) {
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5187
|
+
if (remediation.rel) {
|
|
5188
|
+
var remediationActions = generateRemediationFunctions(authClient, [remediation], toPersist);
|
|
5189
|
+
var actionFn = remediationActions[remediation.name];
|
|
5190
|
+
return _Object$assign(_Object$assign({}, remediation), {
|
|
5191
|
+
action: actionFn
|
|
5192
|
+
});
|
|
5193
|
+
}
|
|
5194
|
+
return remediation;
|
|
5178
5195
|
};
|
|
5179
5196
|
var parseIdxResponse = function parseIdxResponse(authClient, idxResponse) {
|
|
5180
5197
|
var toPersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -5208,6 +5225,7 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5208
5225
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(remediationChoice) {
|
|
5209
5226
|
var paramsFromUser,
|
|
5210
5227
|
remediationChoiceObject,
|
|
5228
|
+
actionFn,
|
|
5211
5229
|
_args = arguments;
|
|
5212
5230
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
5213
5231
|
while (1) {
|
|
@@ -5223,8 +5241,15 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5223
5241
|
}
|
|
5224
5242
|
return _context.abrupt("return", _Promise.reject("Unknown remediation choice: [".concat(remediationChoice, "]")));
|
|
5225
5243
|
case 4:
|
|
5244
|
+
actionFn = remediationChoiceObject.action;
|
|
5245
|
+
if (!(typeof actionFn !== 'function')) {
|
|
5246
|
+
_context.next = 7;
|
|
5247
|
+
break;
|
|
5248
|
+
}
|
|
5249
|
+
return _context.abrupt("return", _Promise.reject("Current remediation cannot make form submit action: [".concat(remediationChoice, "]")));
|
|
5250
|
+
case 7:
|
|
5226
5251
|
return _context.abrupt("return", remediationChoiceObject.action(paramsFromUser));
|
|
5227
|
-
case
|
|
5252
|
+
case 8:
|
|
5228
5253
|
case "end":
|
|
5229
5254
|
return _context.stop();
|
|
5230
5255
|
}
|
|
@@ -5312,7 +5337,7 @@ function _introspect() {
|
|
|
5312
5337
|
switch (_context.prev = _context.next) {
|
|
5313
5338
|
case 0:
|
|
5314
5339
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
5315
|
-
savedIdxResponse = authClient.transactionManager.loadIdxResponse();
|
|
5340
|
+
savedIdxResponse = authClient.transactionManager.loadIdxResponse(options);
|
|
5316
5341
|
if (savedIdxResponse) {
|
|
5317
5342
|
rawIdxResponse = savedIdxResponse.rawIdxResponse;
|
|
5318
5343
|
requestDidSucceed = savedIdxResponse.requestDidSucceed;
|
|
@@ -5555,7 +5580,7 @@ var Remediator = function () {
|
|
|
5555
5580
|
}
|
|
5556
5581
|
}, {
|
|
5557
5582
|
key: "getNextStep",
|
|
5558
|
-
value: function getNextStep(_context) {
|
|
5583
|
+
value: function getNextStep(_authClient, _context) {
|
|
5559
5584
|
var name = this.getName();
|
|
5560
5585
|
var inputs = this.getInputs();
|
|
5561
5586
|
var authenticator = this.getAuthenticator();
|
|
@@ -5692,11 +5717,11 @@ var Authenticator = function Authenticator(authenticator) {
|
|
|
5692
5717
|
this.meta = authenticator;
|
|
5693
5718
|
};
|
|
5694
5719
|
|
|
5695
|
-
function _createSuper$
|
|
5696
|
-
function _isNativeReflectConstruct$
|
|
5720
|
+
function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5721
|
+
function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5697
5722
|
var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
5698
5723
|
_inherits(VerificationCodeAuthenticator, _Authenticator);
|
|
5699
|
-
var _super = _createSuper$
|
|
5724
|
+
var _super = _createSuper$t(VerificationCodeAuthenticator);
|
|
5700
5725
|
function VerificationCodeAuthenticator() {
|
|
5701
5726
|
_classCallCheck(this, VerificationCodeAuthenticator);
|
|
5702
5727
|
return _super.apply(this, arguments);
|
|
@@ -5733,11 +5758,11 @@ var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
|
5733
5758
|
return VerificationCodeAuthenticator;
|
|
5734
5759
|
}(Authenticator);
|
|
5735
5760
|
|
|
5736
|
-
function _createSuper$
|
|
5737
|
-
function _isNativeReflectConstruct$
|
|
5761
|
+
function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5762
|
+
function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5738
5763
|
var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
5739
5764
|
_inherits(OktaVerifyTotp, _VerificationCodeAuth);
|
|
5740
|
-
var _super = _createSuper$
|
|
5765
|
+
var _super = _createSuper$s(OktaVerifyTotp);
|
|
5741
5766
|
function OktaVerifyTotp() {
|
|
5742
5767
|
_classCallCheck(this, OktaVerifyTotp);
|
|
5743
5768
|
return _super.apply(this, arguments);
|
|
@@ -5757,11 +5782,11 @@ var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
|
5757
5782
|
return OktaVerifyTotp;
|
|
5758
5783
|
}(VerificationCodeAuthenticator);
|
|
5759
5784
|
|
|
5760
|
-
function _createSuper$
|
|
5761
|
-
function _isNativeReflectConstruct$
|
|
5785
|
+
function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5786
|
+
function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5762
5787
|
var OktaPassword = function (_Authenticator) {
|
|
5763
5788
|
_inherits(OktaPassword, _Authenticator);
|
|
5764
|
-
var _super = _createSuper$
|
|
5789
|
+
var _super = _createSuper$r(OktaPassword);
|
|
5765
5790
|
function OktaPassword() {
|
|
5766
5791
|
_classCallCheck(this, OktaPassword);
|
|
5767
5792
|
return _super.apply(this, arguments);
|
|
@@ -5797,11 +5822,11 @@ var OktaPassword = function (_Authenticator) {
|
|
|
5797
5822
|
return OktaPassword;
|
|
5798
5823
|
}(Authenticator);
|
|
5799
5824
|
|
|
5800
|
-
function _createSuper$
|
|
5801
|
-
function _isNativeReflectConstruct$
|
|
5825
|
+
function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5826
|
+
function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5802
5827
|
var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
5803
5828
|
_inherits(SecurityQuestionEnrollment, _Authenticator);
|
|
5804
|
-
var _super = _createSuper$
|
|
5829
|
+
var _super = _createSuper$q(SecurityQuestionEnrollment);
|
|
5805
5830
|
function SecurityQuestionEnrollment() {
|
|
5806
5831
|
_classCallCheck(this, SecurityQuestionEnrollment);
|
|
5807
5832
|
return _super.apply(this, arguments);
|
|
@@ -5824,7 +5849,7 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
|
5824
5849
|
var questionKey = values.questionKey,
|
|
5825
5850
|
question = values.question,
|
|
5826
5851
|
answer = values.answer;
|
|
5827
|
-
if (!
|
|
5852
|
+
if (!answer || !questionKey && !question) {
|
|
5828
5853
|
return;
|
|
5829
5854
|
}
|
|
5830
5855
|
return {
|
|
@@ -5855,11 +5880,11 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
|
5855
5880
|
return SecurityQuestionEnrollment;
|
|
5856
5881
|
}(Authenticator);
|
|
5857
5882
|
|
|
5858
|
-
function _createSuper$
|
|
5859
|
-
function _isNativeReflectConstruct$
|
|
5883
|
+
function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5884
|
+
function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5860
5885
|
var SecurityQuestionVerification = function (_Authenticator) {
|
|
5861
5886
|
_inherits(SecurityQuestionVerification, _Authenticator);
|
|
5862
|
-
var _super = _createSuper$
|
|
5887
|
+
var _super = _createSuper$p(SecurityQuestionVerification);
|
|
5863
5888
|
function SecurityQuestionVerification() {
|
|
5864
5889
|
_classCallCheck(this, SecurityQuestionVerification);
|
|
5865
5890
|
return _super.apply(this, arguments);
|
|
@@ -5867,7 +5892,12 @@ var SecurityQuestionVerification = function (_Authenticator) {
|
|
|
5867
5892
|
_createClass(SecurityQuestionVerification, [{
|
|
5868
5893
|
key: "canVerify",
|
|
5869
5894
|
value: function canVerify(values) {
|
|
5870
|
-
|
|
5895
|
+
var credentials = values.credentials;
|
|
5896
|
+
if (credentials && credentials.answer) {
|
|
5897
|
+
return true;
|
|
5898
|
+
}
|
|
5899
|
+
var answer = values.answer;
|
|
5900
|
+
return !!answer;
|
|
5871
5901
|
}
|
|
5872
5902
|
}, {
|
|
5873
5903
|
key: "mapCredentials",
|
|
@@ -5895,11 +5925,11 @@ var SecurityQuestionVerification = function (_Authenticator) {
|
|
|
5895
5925
|
return SecurityQuestionVerification;
|
|
5896
5926
|
}(Authenticator);
|
|
5897
5927
|
|
|
5898
|
-
function _createSuper$
|
|
5899
|
-
function _isNativeReflectConstruct$
|
|
5928
|
+
function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5929
|
+
function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5900
5930
|
var WebauthnEnrollment = function (_Authenticator) {
|
|
5901
5931
|
_inherits(WebauthnEnrollment, _Authenticator);
|
|
5902
|
-
var _super = _createSuper$
|
|
5932
|
+
var _super = _createSuper$o(WebauthnEnrollment);
|
|
5903
5933
|
function WebauthnEnrollment() {
|
|
5904
5934
|
_classCallCheck(this, WebauthnEnrollment);
|
|
5905
5935
|
return _super.apply(this, arguments);
|
|
@@ -5945,11 +5975,11 @@ var WebauthnEnrollment = function (_Authenticator) {
|
|
|
5945
5975
|
return WebauthnEnrollment;
|
|
5946
5976
|
}(Authenticator);
|
|
5947
5977
|
|
|
5948
|
-
function _createSuper$
|
|
5949
|
-
function _isNativeReflectConstruct$
|
|
5978
|
+
function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5979
|
+
function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5950
5980
|
var WebauthnVerification = function (_Authenticator) {
|
|
5951
5981
|
_inherits(WebauthnVerification, _Authenticator);
|
|
5952
|
-
var _super = _createSuper$
|
|
5982
|
+
var _super = _createSuper$n(WebauthnVerification);
|
|
5953
5983
|
function WebauthnVerification() {
|
|
5954
5984
|
_classCallCheck(this, WebauthnVerification);
|
|
5955
5985
|
return _super.apply(this, arguments);
|
|
@@ -6030,11 +6060,11 @@ function getAuthenticator(remediation) {
|
|
|
6030
6060
|
}
|
|
6031
6061
|
}
|
|
6032
6062
|
|
|
6033
|
-
function _createSuper$
|
|
6034
|
-
function _isNativeReflectConstruct$
|
|
6063
|
+
function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6064
|
+
function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6035
6065
|
var VerifyAuthenticator = function (_Remediator) {
|
|
6036
6066
|
_inherits(VerifyAuthenticator, _Remediator);
|
|
6037
|
-
var _super = _createSuper$
|
|
6067
|
+
var _super = _createSuper$m(VerifyAuthenticator);
|
|
6038
6068
|
function VerifyAuthenticator(remediation) {
|
|
6039
6069
|
var _this;
|
|
6040
6070
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6045,9 +6075,9 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6045
6075
|
}
|
|
6046
6076
|
_createClass(VerifyAuthenticator, [{
|
|
6047
6077
|
key: "getNextStep",
|
|
6048
|
-
value: function getNextStep(context) {
|
|
6078
|
+
value: function getNextStep(authClient, context) {
|
|
6049
6079
|
var _a;
|
|
6050
|
-
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, context);
|
|
6080
|
+
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6051
6081
|
var authenticatorEnrollments = (_a = context === null || context === void 0 ? void 0 : context.authenticatorEnrollments) === null || _a === void 0 ? void 0 : _a.value;
|
|
6052
6082
|
return _Object$assign(_Object$assign({}, nextStep), {
|
|
6053
6083
|
authenticatorEnrollments: authenticatorEnrollments
|
|
@@ -6085,11 +6115,11 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6085
6115
|
return VerifyAuthenticator;
|
|
6086
6116
|
}(Remediator);
|
|
6087
6117
|
|
|
6088
|
-
function _createSuper$
|
|
6089
|
-
function _isNativeReflectConstruct$
|
|
6118
|
+
function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6119
|
+
function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6090
6120
|
var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
6091
6121
|
_inherits(EnrollAuthenticator, _VerifyAuthenticator);
|
|
6092
|
-
var _super = _createSuper$
|
|
6122
|
+
var _super = _createSuper$l(EnrollAuthenticator);
|
|
6093
6123
|
function EnrollAuthenticator() {
|
|
6094
6124
|
_classCallCheck(this, EnrollAuthenticator);
|
|
6095
6125
|
return _super.apply(this, arguments);
|
|
@@ -6098,11 +6128,11 @@ var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6098
6128
|
}(VerifyAuthenticator);
|
|
6099
6129
|
EnrollAuthenticator.remediationName = 'enroll-authenticator';
|
|
6100
6130
|
|
|
6101
|
-
function _createSuper$
|
|
6102
|
-
function _isNativeReflectConstruct$
|
|
6131
|
+
function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6132
|
+
function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6103
6133
|
var EnrollPoll = function (_Remediator) {
|
|
6104
6134
|
_inherits(EnrollPoll, _Remediator);
|
|
6105
|
-
var _super = _createSuper$
|
|
6135
|
+
var _super = _createSuper$k(EnrollPoll);
|
|
6106
6136
|
function EnrollPoll() {
|
|
6107
6137
|
_classCallCheck(this, EnrollPoll);
|
|
6108
6138
|
return _super.apply(this, arguments);
|
|
@@ -6114,8 +6144,8 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6114
6144
|
}
|
|
6115
6145
|
}, {
|
|
6116
6146
|
key: "getNextStep",
|
|
6117
|
-
value: function getNextStep(context) {
|
|
6118
|
-
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, context);
|
|
6147
|
+
value: function getNextStep(authClient, context) {
|
|
6148
|
+
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6119
6149
|
var authenticator = this.getAuthenticator();
|
|
6120
6150
|
if (!authenticator && (context === null || context === void 0 ? void 0 : context.currentAuthenticator)) {
|
|
6121
6151
|
authenticator = context.currentAuthenticator.value;
|
|
@@ -6145,11 +6175,11 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6145
6175
|
}(Remediator);
|
|
6146
6176
|
EnrollPoll.remediationName = 'enroll-poll';
|
|
6147
6177
|
|
|
6148
|
-
function _createSuper$
|
|
6149
|
-
function _isNativeReflectConstruct$
|
|
6178
|
+
function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6179
|
+
function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6150
6180
|
var SelectEnrollmentChannel = function (_Remediator) {
|
|
6151
6181
|
_inherits(SelectEnrollmentChannel, _Remediator);
|
|
6152
|
-
var _super = _createSuper$
|
|
6182
|
+
var _super = _createSuper$j(SelectEnrollmentChannel);
|
|
6153
6183
|
function SelectEnrollmentChannel() {
|
|
6154
6184
|
_classCallCheck(this, SelectEnrollmentChannel);
|
|
6155
6185
|
return _super.apply(this, arguments);
|
|
@@ -6161,8 +6191,8 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6161
6191
|
}
|
|
6162
6192
|
}, {
|
|
6163
6193
|
key: "getNextStep",
|
|
6164
|
-
value: function getNextStep(context) {
|
|
6165
|
-
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this);
|
|
6194
|
+
value: function getNextStep(authClient, context) {
|
|
6195
|
+
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6166
6196
|
var options = this.getChannels();
|
|
6167
6197
|
var authenticator = context.currentAuthenticator.value;
|
|
6168
6198
|
return _Object$assign(_Object$assign(_Object$assign({}, common), options && {
|
|
@@ -6212,11 +6242,11 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6212
6242
|
}(Remediator);
|
|
6213
6243
|
SelectEnrollmentChannel.remediationName = 'select-enrollment-channel';
|
|
6214
6244
|
|
|
6215
|
-
function _createSuper$
|
|
6216
|
-
function _isNativeReflectConstruct$
|
|
6245
|
+
function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6246
|
+
function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6217
6247
|
var EnrollmentChannelData = function (_Remediator) {
|
|
6218
6248
|
_inherits(EnrollmentChannelData, _Remediator);
|
|
6219
|
-
var _super = _createSuper$
|
|
6249
|
+
var _super = _createSuper$i(EnrollmentChannelData);
|
|
6220
6250
|
function EnrollmentChannelData() {
|
|
6221
6251
|
_classCallCheck(this, EnrollmentChannelData);
|
|
6222
6252
|
return _super.apply(this, arguments);
|
|
@@ -6248,8 +6278,8 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6248
6278
|
}
|
|
6249
6279
|
}, {
|
|
6250
6280
|
key: "getNextStep",
|
|
6251
|
-
value: function getNextStep(context) {
|
|
6252
|
-
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this);
|
|
6281
|
+
value: function getNextStep(authClient, context) {
|
|
6282
|
+
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6253
6283
|
var authenticator = context.currentAuthenticator.value;
|
|
6254
6284
|
return _Object$assign(_Object$assign({}, common), {
|
|
6255
6285
|
authenticator: authenticator
|
|
@@ -6282,11 +6312,11 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6282
6312
|
}(Remediator);
|
|
6283
6313
|
EnrollmentChannelData.remediationName = 'enrollment-channel-data';
|
|
6284
6314
|
|
|
6285
|
-
function _createSuper$
|
|
6286
|
-
function _isNativeReflectConstruct$
|
|
6315
|
+
function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6316
|
+
function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6287
6317
|
var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
6288
6318
|
_inherits(ChallengeAuthenticator, _VerifyAuthenticator);
|
|
6289
|
-
var _super = _createSuper$
|
|
6319
|
+
var _super = _createSuper$h(ChallengeAuthenticator);
|
|
6290
6320
|
function ChallengeAuthenticator() {
|
|
6291
6321
|
_classCallCheck(this, ChallengeAuthenticator);
|
|
6292
6322
|
return _super.apply(this, arguments);
|
|
@@ -6295,11 +6325,11 @@ var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6295
6325
|
}(VerifyAuthenticator);
|
|
6296
6326
|
ChallengeAuthenticator.remediationName = 'challenge-authenticator';
|
|
6297
6327
|
|
|
6298
|
-
function _createSuper$
|
|
6299
|
-
function _isNativeReflectConstruct$
|
|
6328
|
+
function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6329
|
+
function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6300
6330
|
var ChallengePoll = function (_EnrollPoll) {
|
|
6301
6331
|
_inherits(ChallengePoll, _EnrollPoll);
|
|
6302
|
-
var _super = _createSuper$
|
|
6332
|
+
var _super = _createSuper$g(ChallengePoll);
|
|
6303
6333
|
function ChallengePoll() {
|
|
6304
6334
|
_classCallCheck(this, ChallengePoll);
|
|
6305
6335
|
return _super.apply(this, arguments);
|
|
@@ -6314,11 +6344,11 @@ var ChallengePoll = function (_EnrollPoll) {
|
|
|
6314
6344
|
}(EnrollPoll);
|
|
6315
6345
|
ChallengePoll.remediationName = 'challenge-poll';
|
|
6316
6346
|
|
|
6317
|
-
function _createSuper$
|
|
6318
|
-
function _isNativeReflectConstruct$
|
|
6347
|
+
function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6348
|
+
function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6319
6349
|
var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
6320
6350
|
_inherits(ResetAuthenticator, _VerifyAuthenticator);
|
|
6321
|
-
var _super = _createSuper$
|
|
6351
|
+
var _super = _createSuper$f(ResetAuthenticator);
|
|
6322
6352
|
function ResetAuthenticator() {
|
|
6323
6353
|
_classCallCheck(this, ResetAuthenticator);
|
|
6324
6354
|
return _super.apply(this, arguments);
|
|
@@ -6327,11 +6357,11 @@ var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6327
6357
|
}(VerifyAuthenticator);
|
|
6328
6358
|
ResetAuthenticator.remediationName = 'reset-authenticator';
|
|
6329
6359
|
|
|
6330
|
-
function _createSuper$
|
|
6331
|
-
function _isNativeReflectConstruct$
|
|
6360
|
+
function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6361
|
+
function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6332
6362
|
var EnrollProfile = function (_Remediator) {
|
|
6333
6363
|
_inherits(EnrollProfile, _Remediator);
|
|
6334
|
-
var _super = _createSuper$
|
|
6364
|
+
var _super = _createSuper$e(EnrollProfile);
|
|
6335
6365
|
function EnrollProfile() {
|
|
6336
6366
|
_classCallCheck(this, EnrollProfile);
|
|
6337
6367
|
return _super.apply(this, arguments);
|
|
@@ -6393,11 +6423,11 @@ var EnrollProfile = function (_Remediator) {
|
|
|
6393
6423
|
}(Remediator);
|
|
6394
6424
|
EnrollProfile.remediationName = 'enroll-profile';
|
|
6395
6425
|
|
|
6396
|
-
function _createSuper$
|
|
6397
|
-
function _isNativeReflectConstruct$
|
|
6426
|
+
function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6427
|
+
function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6398
6428
|
var Identify = function (_Remediator) {
|
|
6399
6429
|
_inherits(Identify, _Remediator);
|
|
6400
|
-
var _super = _createSuper$
|
|
6430
|
+
var _super = _createSuper$d(Identify);
|
|
6401
6431
|
function Identify() {
|
|
6402
6432
|
var _this;
|
|
6403
6433
|
_classCallCheck(this, Identify);
|
|
@@ -6440,11 +6470,11 @@ var Identify = function (_Remediator) {
|
|
|
6440
6470
|
}(Remediator);
|
|
6441
6471
|
Identify.remediationName = 'identify';
|
|
6442
6472
|
|
|
6443
|
-
function _createSuper$
|
|
6444
|
-
function _isNativeReflectConstruct$
|
|
6473
|
+
function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6474
|
+
function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6445
6475
|
var ReEnrollAuthenticator = function (_Remediator) {
|
|
6446
6476
|
_inherits(ReEnrollAuthenticator, _Remediator);
|
|
6447
|
-
var _super = _createSuper$
|
|
6477
|
+
var _super = _createSuper$c(ReEnrollAuthenticator);
|
|
6448
6478
|
function ReEnrollAuthenticator() {
|
|
6449
6479
|
_classCallCheck(this, ReEnrollAuthenticator);
|
|
6450
6480
|
return _super.apply(this, arguments);
|
|
@@ -6474,11 +6504,11 @@ var ReEnrollAuthenticator = function (_Remediator) {
|
|
|
6474
6504
|
}(Remediator);
|
|
6475
6505
|
ReEnrollAuthenticator.remediationName = 'reenroll-authenticator';
|
|
6476
6506
|
|
|
6477
|
-
function _createSuper$
|
|
6478
|
-
function _isNativeReflectConstruct$
|
|
6507
|
+
function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6508
|
+
function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6479
6509
|
var RedirectIdp = function (_Remediator) {
|
|
6480
6510
|
_inherits(RedirectIdp, _Remediator);
|
|
6481
|
-
var _super = _createSuper$
|
|
6511
|
+
var _super = _createSuper$b(RedirectIdp);
|
|
6482
6512
|
function RedirectIdp() {
|
|
6483
6513
|
_classCallCheck(this, RedirectIdp);
|
|
6484
6514
|
return _super.apply(this, arguments);
|
|
@@ -6509,13 +6539,13 @@ var RedirectIdp = function (_Remediator) {
|
|
|
6509
6539
|
RedirectIdp.remediationName = 'redirect-idp';
|
|
6510
6540
|
|
|
6511
6541
|
function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6512
|
-
function _unsupportedIterableToArray$2(o, minLen) { var
|
|
6542
|
+
function _unsupportedIterableToArray$2(o, minLen) { var _context5; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = _sliceInstanceProperty(_context5 = Object.prototype.toString.call(o)).call(_context5, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
|
|
6513
6543
|
function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
6514
|
-
function _createSuper$
|
|
6515
|
-
function _isNativeReflectConstruct$
|
|
6544
|
+
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6545
|
+
function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6516
6546
|
var SelectAuthenticator = function (_Remediator) {
|
|
6517
6547
|
_inherits(SelectAuthenticator, _Remediator);
|
|
6518
|
-
var _super = _createSuper$
|
|
6548
|
+
var _super = _createSuper$a(SelectAuthenticator);
|
|
6519
6549
|
function SelectAuthenticator() {
|
|
6520
6550
|
_classCallCheck(this, SelectAuthenticator);
|
|
6521
6551
|
return _super.apply(this, arguments);
|
|
@@ -6571,9 +6601,9 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6571
6601
|
}
|
|
6572
6602
|
}, {
|
|
6573
6603
|
key: "getNextStep",
|
|
6574
|
-
value: function getNextStep() {
|
|
6604
|
+
value: function getNextStep(authClient) {
|
|
6575
6605
|
var _context;
|
|
6576
|
-
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this);
|
|
6606
|
+
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this, authClient);
|
|
6577
6607
|
var authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation);
|
|
6578
6608
|
var options = _mapInstanceProperty(_context = authenticatorFromRemediation.options).call(_context, function (option) {
|
|
6579
6609
|
var label = option.label,
|
|
@@ -6612,19 +6642,29 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6612
6642
|
}
|
|
6613
6643
|
}, {
|
|
6614
6644
|
key: "getInputAuthenticator",
|
|
6615
|
-
value: function getInputAuthenticator() {
|
|
6645
|
+
value: function getInputAuthenticator(remediation) {
|
|
6646
|
+
var _context3;
|
|
6647
|
+
var options = _mapInstanceProperty(_context3 = remediation.options).call(_context3, function (_ref3) {
|
|
6648
|
+
var label = _ref3.label,
|
|
6649
|
+
relatesTo = _ref3.relatesTo;
|
|
6650
|
+
return {
|
|
6651
|
+
label: label,
|
|
6652
|
+
value: relatesTo.key
|
|
6653
|
+
};
|
|
6654
|
+
});
|
|
6616
6655
|
return {
|
|
6617
6656
|
name: 'authenticator',
|
|
6618
|
-
|
|
6657
|
+
type: 'string',
|
|
6658
|
+
options: options
|
|
6619
6659
|
};
|
|
6620
6660
|
}
|
|
6621
6661
|
}, {
|
|
6622
6662
|
key: "getValuesAfterProceed",
|
|
6623
6663
|
value: function getValuesAfterProceed() {
|
|
6624
|
-
var
|
|
6664
|
+
var _context4,
|
|
6625
6665
|
_this = this;
|
|
6626
6666
|
this.values = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getValuesAfterProceed", this).call(this);
|
|
6627
|
-
var authenticators = _filterInstanceProperty(
|
|
6667
|
+
var authenticators = _filterInstanceProperty(_context4 = _valuesInstanceProperty(this).authenticators).call(_context4, function (authenticator) {
|
|
6628
6668
|
return compareAuthenticators(authenticator, _this.selectedAuthenticator) !== true;
|
|
6629
6669
|
});
|
|
6630
6670
|
return _Object$assign(_Object$assign({}, _valuesInstanceProperty(this)), {
|
|
@@ -6635,11 +6675,11 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6635
6675
|
return SelectAuthenticator;
|
|
6636
6676
|
}(Remediator);
|
|
6637
6677
|
|
|
6638
|
-
function _createSuper$
|
|
6639
|
-
function _isNativeReflectConstruct$
|
|
6678
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6679
|
+
function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6640
6680
|
var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
6641
6681
|
_inherits(SelectAuthenticatorAuthenticate, _SelectAuthenticator);
|
|
6642
|
-
var _super = _createSuper$
|
|
6682
|
+
var _super = _createSuper$9(SelectAuthenticatorAuthenticate);
|
|
6643
6683
|
function SelectAuthenticatorAuthenticate(remediation) {
|
|
6644
6684
|
var _this;
|
|
6645
6685
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6664,11 +6704,11 @@ var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
|
6664
6704
|
}(SelectAuthenticator);
|
|
6665
6705
|
SelectAuthenticatorAuthenticate.remediationName = 'select-authenticator-authenticate';
|
|
6666
6706
|
|
|
6667
|
-
function _createSuper$
|
|
6668
|
-
function _isNativeReflectConstruct$
|
|
6707
|
+
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6708
|
+
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6669
6709
|
var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
6670
6710
|
_inherits(SelectAuthenticatorEnroll, _SelectAuthenticator);
|
|
6671
|
-
var _super = _createSuper$
|
|
6711
|
+
var _super = _createSuper$8(SelectAuthenticatorEnroll);
|
|
6672
6712
|
function SelectAuthenticatorEnroll() {
|
|
6673
6713
|
_classCallCheck(this, SelectAuthenticatorEnroll);
|
|
6674
6714
|
return _super.apply(this, arguments);
|
|
@@ -6677,11 +6717,11 @@ var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
|
6677
6717
|
}(SelectAuthenticator);
|
|
6678
6718
|
SelectAuthenticatorEnroll.remediationName = 'select-authenticator-enroll';
|
|
6679
6719
|
|
|
6680
|
-
function _createSuper$
|
|
6681
|
-
function _isNativeReflectConstruct$
|
|
6720
|
+
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6721
|
+
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6682
6722
|
var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
6683
6723
|
_inherits(SelectAuthenticatorUnlockAccount, _SelectAuthenticator);
|
|
6684
|
-
var _super = _createSuper$
|
|
6724
|
+
var _super = _createSuper$7(SelectAuthenticatorUnlockAccount);
|
|
6685
6725
|
function SelectAuthenticatorUnlockAccount() {
|
|
6686
6726
|
var _this;
|
|
6687
6727
|
_classCallCheck(this, SelectAuthenticatorUnlockAccount);
|
|
@@ -6720,7 +6760,7 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6720
6760
|
value: function getInputUsername() {
|
|
6721
6761
|
return {
|
|
6722
6762
|
name: 'username',
|
|
6723
|
-
|
|
6763
|
+
type: 'string'
|
|
6724
6764
|
};
|
|
6725
6765
|
}
|
|
6726
6766
|
}]);
|
|
@@ -6728,11 +6768,11 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6728
6768
|
}(SelectAuthenticator);
|
|
6729
6769
|
SelectAuthenticatorUnlockAccount.remediationName = 'select-authenticator-unlock-account';
|
|
6730
6770
|
|
|
6731
|
-
function _createSuper$
|
|
6732
|
-
function _isNativeReflectConstruct$
|
|
6771
|
+
function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6772
|
+
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6733
6773
|
var SelectEnrollProfile = function (_Remediator) {
|
|
6734
6774
|
_inherits(SelectEnrollProfile, _Remediator);
|
|
6735
|
-
var _super = _createSuper$
|
|
6775
|
+
var _super = _createSuper$6(SelectEnrollProfile);
|
|
6736
6776
|
function SelectEnrollProfile() {
|
|
6737
6777
|
_classCallCheck(this, SelectEnrollProfile);
|
|
6738
6778
|
return _super.apply(this, arguments);
|
|
@@ -6747,11 +6787,11 @@ var SelectEnrollProfile = function (_Remediator) {
|
|
|
6747
6787
|
}(Remediator);
|
|
6748
6788
|
SelectEnrollProfile.remediationName = 'select-enroll-profile';
|
|
6749
6789
|
|
|
6750
|
-
function _createSuper$
|
|
6751
|
-
function _isNativeReflectConstruct$
|
|
6790
|
+
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6791
|
+
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6752
6792
|
var AuthenticatorData = function (_Remediator) {
|
|
6753
6793
|
_inherits(AuthenticatorData, _Remediator);
|
|
6754
|
-
var _super = _createSuper$
|
|
6794
|
+
var _super = _createSuper$5(AuthenticatorData);
|
|
6755
6795
|
function AuthenticatorData(remediation) {
|
|
6756
6796
|
var _this;
|
|
6757
6797
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6800,8 +6840,8 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6800
6840
|
}
|
|
6801
6841
|
}, {
|
|
6802
6842
|
key: "getNextStep",
|
|
6803
|
-
value: function getNextStep() {
|
|
6804
|
-
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this);
|
|
6843
|
+
value: function getNextStep(authClient) {
|
|
6844
|
+
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this, authClient);
|
|
6805
6845
|
var options = this.getMethodTypes();
|
|
6806
6846
|
return _Object$assign(_Object$assign({}, common), options && {
|
|
6807
6847
|
options: options
|
|
@@ -6865,11 +6905,11 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6865
6905
|
return AuthenticatorData;
|
|
6866
6906
|
}(Remediator);
|
|
6867
6907
|
|
|
6868
|
-
function _createSuper$
|
|
6869
|
-
function _isNativeReflectConstruct$
|
|
6908
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6909
|
+
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6870
6910
|
var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
6871
6911
|
_inherits(AuthenticatorVerificationData, _AuthenticatorData);
|
|
6872
|
-
var _super = _createSuper$
|
|
6912
|
+
var _super = _createSuper$4(AuthenticatorVerificationData);
|
|
6873
6913
|
function AuthenticatorVerificationData(remediation) {
|
|
6874
6914
|
var _this;
|
|
6875
6915
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6920,7 +6960,8 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
6920
6960
|
return {
|
|
6921
6961
|
name: 'methodType',
|
|
6922
6962
|
type: 'string',
|
|
6923
|
-
required: true
|
|
6963
|
+
required: true,
|
|
6964
|
+
options: methodType.options
|
|
6924
6965
|
};
|
|
6925
6966
|
}
|
|
6926
6967
|
var inputs = _toConsumableArray(authenticator.form.value);
|
|
@@ -6944,11 +6985,11 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
6944
6985
|
}(AuthenticatorData);
|
|
6945
6986
|
AuthenticatorVerificationData.remediationName = 'authenticator-verification-data';
|
|
6946
6987
|
|
|
6947
|
-
function _createSuper$
|
|
6948
|
-
function _isNativeReflectConstruct$
|
|
6988
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6989
|
+
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
6949
6990
|
var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
6950
6991
|
_inherits(AuthenticatorEnrollmentData, _AuthenticatorData);
|
|
6951
|
-
var _super = _createSuper$
|
|
6992
|
+
var _super = _createSuper$3(AuthenticatorEnrollmentData);
|
|
6952
6993
|
function AuthenticatorEnrollmentData() {
|
|
6953
6994
|
_classCallCheck(this, AuthenticatorEnrollmentData);
|
|
6954
6995
|
return _super.apply(this, arguments);
|
|
@@ -6970,17 +7011,22 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
6970
7011
|
}
|
|
6971
7012
|
}, {
|
|
6972
7013
|
key: "getInputAuthenticator",
|
|
6973
|
-
value: function getInputAuthenticator() {
|
|
6974
|
-
|
|
7014
|
+
value: function getInputAuthenticator(remediation) {
|
|
7015
|
+
var _context2;
|
|
7016
|
+
return _mapInstanceProperty(_context2 = [{
|
|
6975
7017
|
name: 'methodType',
|
|
6976
|
-
type: 'string'
|
|
6977
|
-
required: true
|
|
7018
|
+
type: 'string'
|
|
6978
7019
|
}, {
|
|
6979
7020
|
name: 'phoneNumber',
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
7021
|
+
label: 'Phone Number',
|
|
7022
|
+
type: 'string'
|
|
7023
|
+
}]).call(_context2, function (item) {
|
|
7024
|
+
var _context3;
|
|
7025
|
+
var value = _findInstanceProperty(_context3 = remediation.form.value).call(_context3, function (val) {
|
|
7026
|
+
return val.name === item.name;
|
|
7027
|
+
});
|
|
7028
|
+
return _Object$assign(_Object$assign({}, value), item);
|
|
7029
|
+
});
|
|
6984
7030
|
}
|
|
6985
7031
|
}, {
|
|
6986
7032
|
key: "mapAuthenticatorDataFromValues",
|
|
@@ -6999,11 +7045,11 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
6999
7045
|
}(AuthenticatorData);
|
|
7000
7046
|
AuthenticatorEnrollmentData.remediationName = 'authenticator-enrollment-data';
|
|
7001
7047
|
|
|
7002
|
-
function _createSuper$
|
|
7003
|
-
function _isNativeReflectConstruct$
|
|
7048
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7049
|
+
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7004
7050
|
var Skip = function (_Remediator) {
|
|
7005
7051
|
_inherits(Skip, _Remediator);
|
|
7006
|
-
var _super = _createSuper$
|
|
7052
|
+
var _super = _createSuper$2(Skip);
|
|
7007
7053
|
function Skip() {
|
|
7008
7054
|
_classCallCheck(this, Skip);
|
|
7009
7055
|
return _super.apply(this, arguments);
|
|
@@ -7018,6 +7064,197 @@ var Skip = function (_Remediator) {
|
|
|
7018
7064
|
}(Remediator);
|
|
7019
7065
|
Skip.remediationName = 'skip';
|
|
7020
7066
|
|
|
7067
|
+
function unwrapFormValue(remediation) {
|
|
7068
|
+
var res = {};
|
|
7069
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(remediation); _i < _Object$entries$1.length; _i++) {
|
|
7070
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 2),
|
|
7071
|
+
key = _Object$entries$_i[0],
|
|
7072
|
+
value = _Object$entries$_i[1];
|
|
7073
|
+
if (value === null || typeof value === 'undefined') {
|
|
7074
|
+
continue;
|
|
7075
|
+
}
|
|
7076
|
+
if (Array.isArray(value)) {
|
|
7077
|
+
res[key] = _mapInstanceProperty(value).call(value, unwrapFormValue);
|
|
7078
|
+
} else if (_typeof(value) === 'object') {
|
|
7079
|
+
var _context, _context2;
|
|
7080
|
+
var formKeys = _Object$keys(value);
|
|
7081
|
+
if (_includesInstanceProperty(_context = ['value', 'form']).call(_context, key) && formKeys.length === 1 && _includesInstanceProperty(_context2 = ['value', 'form']).call(_context2, formKeys[0])) {
|
|
7082
|
+
var unwrappedForm = unwrapFormValue(value);
|
|
7083
|
+
_Object$entries(unwrappedForm).forEach(function (_ref) {
|
|
7084
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
7085
|
+
key = _ref2[0],
|
|
7086
|
+
value = _ref2[1];
|
|
7087
|
+
res[key] = value;
|
|
7088
|
+
});
|
|
7089
|
+
} else {
|
|
7090
|
+
res[key] = unwrapFormValue(value);
|
|
7091
|
+
}
|
|
7092
|
+
} else {
|
|
7093
|
+
res[key] = value;
|
|
7094
|
+
}
|
|
7095
|
+
}
|
|
7096
|
+
return res;
|
|
7097
|
+
}
|
|
7098
|
+
function hasValidInputValue(input, values) {
|
|
7099
|
+
var fn = function fn(input, values, requiredTracker) {
|
|
7100
|
+
var name = input.name,
|
|
7101
|
+
value = input.value,
|
|
7102
|
+
required = input.required;
|
|
7103
|
+
var isRequired = required || requiredTracker
|
|
7104
|
+
|| name === 'authenticator';
|
|
7105
|
+
if (!isRequired) {
|
|
7106
|
+
return true;
|
|
7107
|
+
}
|
|
7108
|
+
if (Array.isArray(value)) {
|
|
7109
|
+
return _reduceInstanceProperty(value).call(value, function (acc, item) {
|
|
7110
|
+
return acc && fn(item, values[name], isRequired);
|
|
7111
|
+
}, true);
|
|
7112
|
+
} else {
|
|
7113
|
+
return !!(values && values[name]);
|
|
7114
|
+
}
|
|
7115
|
+
};
|
|
7116
|
+
return fn(input, values, false);
|
|
7117
|
+
}
|
|
7118
|
+
|
|
7119
|
+
function canProceed(authClient) {
|
|
7120
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7121
|
+
var meta = getSavedTransactionMeta(authClient, options);
|
|
7122
|
+
return !!(meta || options.stateHandle);
|
|
7123
|
+
}
|
|
7124
|
+
function proceed(_x) {
|
|
7125
|
+
return _proceed.apply(this, arguments);
|
|
7126
|
+
}
|
|
7127
|
+
function _proceed() {
|
|
7128
|
+
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
7129
|
+
var options,
|
|
7130
|
+
flow,
|
|
7131
|
+
state,
|
|
7132
|
+
meta,
|
|
7133
|
+
_args = arguments;
|
|
7134
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7135
|
+
while (1) {
|
|
7136
|
+
switch (_context.prev = _context.next) {
|
|
7137
|
+
case 0:
|
|
7138
|
+
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
7139
|
+
if (canProceed(authClient, options)) {
|
|
7140
|
+
_context.next = 3;
|
|
7141
|
+
break;
|
|
7142
|
+
}
|
|
7143
|
+
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
7144
|
+
case 3:
|
|
7145
|
+
flow = options.flow, state = options.state;
|
|
7146
|
+
if (!flow) {
|
|
7147
|
+
meta = getSavedTransactionMeta(authClient, {
|
|
7148
|
+
state: state
|
|
7149
|
+
});
|
|
7150
|
+
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
7151
|
+
}
|
|
7152
|
+
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
7153
|
+
flow: flow
|
|
7154
|
+
})));
|
|
7155
|
+
case 6:
|
|
7156
|
+
case "end":
|
|
7157
|
+
return _context.stop();
|
|
7158
|
+
}
|
|
7159
|
+
}
|
|
7160
|
+
}, _callee);
|
|
7161
|
+
}));
|
|
7162
|
+
return _proceed.apply(this, arguments);
|
|
7163
|
+
}
|
|
7164
|
+
|
|
7165
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7166
|
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7167
|
+
var GenericRemediator = function (_Remediator) {
|
|
7168
|
+
_inherits(GenericRemediator, _Remediator);
|
|
7169
|
+
var _super = _createSuper$1(GenericRemediator);
|
|
7170
|
+
function GenericRemediator() {
|
|
7171
|
+
_classCallCheck(this, GenericRemediator);
|
|
7172
|
+
return _super.apply(this, arguments);
|
|
7173
|
+
}
|
|
7174
|
+
_createClass(GenericRemediator, [{
|
|
7175
|
+
key: "canRemediate",
|
|
7176
|
+
value: function canRemediate() {
|
|
7177
|
+
var _this = this;
|
|
7178
|
+
if (typeof this.remediation.action !== 'function') {
|
|
7179
|
+
return false;
|
|
7180
|
+
}
|
|
7181
|
+
var inputs = this.getInputs();
|
|
7182
|
+
var res = _reduceInstanceProperty(inputs).call(inputs, function (acc, input) {
|
|
7183
|
+
return acc && hasValidInputValue(input, _valuesInstanceProperty(_this));
|
|
7184
|
+
}, true);
|
|
7185
|
+
return res;
|
|
7186
|
+
}
|
|
7187
|
+
}, {
|
|
7188
|
+
key: "getData",
|
|
7189
|
+
value: function getData() {
|
|
7190
|
+
var _context2,
|
|
7191
|
+
_this2 = this;
|
|
7192
|
+
var data = _reduceInstanceProperty(_context2 = this.getInputs()).call(_context2, function (acc, _ref) {
|
|
7193
|
+
var name = _ref.name;
|
|
7194
|
+
acc[name] = _valuesInstanceProperty(_this2)[name];
|
|
7195
|
+
return acc;
|
|
7196
|
+
}, {});
|
|
7197
|
+
return data;
|
|
7198
|
+
}
|
|
7199
|
+
}, {
|
|
7200
|
+
key: "getNextStep",
|
|
7201
|
+
value: function getNextStep(authClient, _context) {
|
|
7202
|
+
var name = this.getName();
|
|
7203
|
+
var inputs = this.getInputs();
|
|
7204
|
+
var _a = this.remediation;
|
|
7205
|
+
_a.href;
|
|
7206
|
+
_a.method;
|
|
7207
|
+
_a.rel;
|
|
7208
|
+
_a.accepts;
|
|
7209
|
+
_a.produces;
|
|
7210
|
+
_a.value;
|
|
7211
|
+
var action = _a.action,
|
|
7212
|
+
rest = __rest(_a, ["href", "method", "rel", "accepts", "produces", "value", "action"]);
|
|
7213
|
+
if (action) {
|
|
7214
|
+
return _Object$assign(_Object$assign(_Object$assign({}, rest), !!inputs.length && {
|
|
7215
|
+
inputs: inputs
|
|
7216
|
+
}), {
|
|
7217
|
+
action: function () {
|
|
7218
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7219
|
+
return _regeneratorRuntime.wrap(function _callee$(_context3) {
|
|
7220
|
+
while (1) {
|
|
7221
|
+
switch (_context3.prev = _context3.next) {
|
|
7222
|
+
case 0:
|
|
7223
|
+
return _context3.abrupt("return", proceed(authClient, _Object$assign({
|
|
7224
|
+
step: name
|
|
7225
|
+
}, params)));
|
|
7226
|
+
case 1:
|
|
7227
|
+
case "end":
|
|
7228
|
+
return _context3.stop();
|
|
7229
|
+
}
|
|
7230
|
+
}
|
|
7231
|
+
}, _callee);
|
|
7232
|
+
}));
|
|
7233
|
+
function action(_x) {
|
|
7234
|
+
return _action.apply(this, arguments);
|
|
7235
|
+
}
|
|
7236
|
+
return action;
|
|
7237
|
+
}()
|
|
7238
|
+
});
|
|
7239
|
+
}
|
|
7240
|
+
return _Object$assign({}, this.remediation);
|
|
7241
|
+
}
|
|
7242
|
+
}, {
|
|
7243
|
+
key: "getInputs",
|
|
7244
|
+
value: function getInputs() {
|
|
7245
|
+
var _context4, _context5, _context6;
|
|
7246
|
+
return _mapInstanceProperty(_context4 = _mapInstanceProperty(_context5 = _filterInstanceProperty(_context6 = this.remediation.value || []).call(_context6, function (_ref2) {
|
|
7247
|
+
var name = _ref2.name;
|
|
7248
|
+
return name !== 'stateHandle';
|
|
7249
|
+
})).call(_context5, unwrapFormValue)).call(_context4, function (input) {
|
|
7250
|
+
input.type = input.type || 'string';
|
|
7251
|
+
return input;
|
|
7252
|
+
});
|
|
7253
|
+
}
|
|
7254
|
+
}]);
|
|
7255
|
+
return GenericRemediator;
|
|
7256
|
+
}(Remediator);
|
|
7257
|
+
|
|
7021
7258
|
var remediators = /*#__PURE__*/Object.freeze({
|
|
7022
7259
|
__proto__: null,
|
|
7023
7260
|
Remediator: Remediator,
|
|
@@ -7038,11 +7275,12 @@ var remediators = /*#__PURE__*/Object.freeze({
|
|
|
7038
7275
|
SelectEnrollProfile: SelectEnrollProfile,
|
|
7039
7276
|
AuthenticatorVerificationData: AuthenticatorVerificationData,
|
|
7040
7277
|
AuthenticatorEnrollmentData: AuthenticatorEnrollmentData,
|
|
7041
|
-
Skip: Skip
|
|
7278
|
+
Skip: Skip,
|
|
7279
|
+
GenericRemediator: GenericRemediator
|
|
7042
7280
|
});
|
|
7043
7281
|
|
|
7044
7282
|
function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
7045
|
-
function _unsupportedIterableToArray$1(o, minLen) { var
|
|
7283
|
+
function _unsupportedIterableToArray$1(o, minLen) { var _context13; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty(_context13 = Object.prototype.toString.call(o)).call(_context13, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
|
|
7046
7284
|
function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
7047
7285
|
function isTerminalResponse(idxResponse) {
|
|
7048
7286
|
var neededToProceed = idxResponse.neededToProceed,
|
|
@@ -7160,7 +7398,7 @@ function getEnabledFeatures(idxResponse) {
|
|
|
7160
7398
|
}
|
|
7161
7399
|
return res;
|
|
7162
7400
|
}
|
|
7163
|
-
function getAvailableSteps(idxResponse) {
|
|
7401
|
+
function getAvailableSteps(authClient, idxResponse, useGenericRemediator) {
|
|
7164
7402
|
var _context9;
|
|
7165
7403
|
var res = [];
|
|
7166
7404
|
var remediatorMap = _reduceInstanceProperty(_context9 = _Object$values(remediators)).call(_context9, function (map, remediatorClass) {
|
|
@@ -7174,10 +7412,13 @@ function getAvailableSteps(idxResponse) {
|
|
|
7174
7412
|
try {
|
|
7175
7413
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7176
7414
|
var remediation = _step2.value;
|
|
7177
|
-
var T =
|
|
7415
|
+
var T = getRemediatorClass(remediation, {
|
|
7416
|
+
useGenericRemediator: useGenericRemediator,
|
|
7417
|
+
remediators: remediatorMap
|
|
7418
|
+
});
|
|
7178
7419
|
if (T) {
|
|
7179
7420
|
var remediator = new T(remediation);
|
|
7180
|
-
res.push(remediator.getNextStep(idxResponse.context));
|
|
7421
|
+
res.push(remediator.getNextStep(authClient, idxResponse.context));
|
|
7181
7422
|
}
|
|
7182
7423
|
}
|
|
7183
7424
|
} catch (err) {
|
|
@@ -7185,10 +7426,44 @@ function getAvailableSteps(idxResponse) {
|
|
|
7185
7426
|
} finally {
|
|
7186
7427
|
_iterator2.f();
|
|
7187
7428
|
}
|
|
7429
|
+
var _loop = function _loop() {
|
|
7430
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 1),
|
|
7431
|
+
name = _Object$entries$_i[0];
|
|
7432
|
+
res.push({
|
|
7433
|
+
name: name,
|
|
7434
|
+
action: function () {
|
|
7435
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7436
|
+
return _regeneratorRuntime.wrap(function _callee$(_context10) {
|
|
7437
|
+
while (1) {
|
|
7438
|
+
switch (_context10.prev = _context10.next) {
|
|
7439
|
+
case 0:
|
|
7440
|
+
return _context10.abrupt("return", proceed(authClient, {
|
|
7441
|
+
actions: [{
|
|
7442
|
+
name: name,
|
|
7443
|
+
params: params
|
|
7444
|
+
}]
|
|
7445
|
+
}));
|
|
7446
|
+
case 1:
|
|
7447
|
+
case "end":
|
|
7448
|
+
return _context10.stop();
|
|
7449
|
+
}
|
|
7450
|
+
}
|
|
7451
|
+
}, _callee);
|
|
7452
|
+
}));
|
|
7453
|
+
function action(_x) {
|
|
7454
|
+
return _action.apply(this, arguments);
|
|
7455
|
+
}
|
|
7456
|
+
return action;
|
|
7457
|
+
}()
|
|
7458
|
+
});
|
|
7459
|
+
};
|
|
7460
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(idxResponse.actions || {}); _i < _Object$entries$1.length; _i++) {
|
|
7461
|
+
_loop();
|
|
7462
|
+
}
|
|
7188
7463
|
return res;
|
|
7189
7464
|
}
|
|
7190
7465
|
function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
7191
|
-
var
|
|
7466
|
+
var _context11;
|
|
7192
7467
|
var remediations = idxResponse.neededToProceed || [];
|
|
7193
7468
|
var remediation = _findInstanceProperty(remediations).call(remediations, function (r) {
|
|
7194
7469
|
return r.name === remediationName;
|
|
@@ -7197,7 +7472,7 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7197
7472
|
warn("filterValuesForRemediation: \"".concat(remediationName, "\" did not match any remediations"));
|
|
7198
7473
|
return values;
|
|
7199
7474
|
}
|
|
7200
|
-
var valuesForRemediation = _reduceInstanceProperty(
|
|
7475
|
+
var valuesForRemediation = _reduceInstanceProperty(_context11 = remediation.value).call(_context11, function (res, entry) {
|
|
7201
7476
|
var name = entry.name,
|
|
7202
7477
|
value = entry.value;
|
|
7203
7478
|
if (name === 'stateHandle') {
|
|
@@ -7209,8 +7484,20 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7209
7484
|
}, {});
|
|
7210
7485
|
return valuesForRemediation;
|
|
7211
7486
|
}
|
|
7487
|
+
function getRemediatorClass(remediation, options) {
|
|
7488
|
+
var useGenericRemediator = options.useGenericRemediator,
|
|
7489
|
+
remediators = options.remediators;
|
|
7490
|
+
if (!remediation) {
|
|
7491
|
+
return undefined;
|
|
7492
|
+
}
|
|
7493
|
+
if (useGenericRemediator) {
|
|
7494
|
+
return GenericRemediator;
|
|
7495
|
+
}
|
|
7496
|
+
return remediators[remediation.name];
|
|
7497
|
+
}
|
|
7212
7498
|
function getRemediator(idxRemediations, values, options) {
|
|
7213
7499
|
var remediators = options.remediators;
|
|
7500
|
+
var useGenericRemediator = options.useGenericRemediator;
|
|
7214
7501
|
var remediator;
|
|
7215
7502
|
if (options.step) {
|
|
7216
7503
|
var remediation = _findInstanceProperty(idxRemediations).call(idxRemediations, function (_ref5) {
|
|
@@ -7218,7 +7505,7 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7218
7505
|
return name === options.step;
|
|
7219
7506
|
});
|
|
7220
7507
|
if (remediation) {
|
|
7221
|
-
var T = remediation
|
|
7508
|
+
var T = getRemediatorClass(remediation, options);
|
|
7222
7509
|
return T ? new T(remediation, values, options) : undefined;
|
|
7223
7510
|
} else {
|
|
7224
7511
|
warn("step \"".concat(options.step, "\" did not match any remediations"));
|
|
@@ -7230,13 +7517,13 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7230
7517
|
_step3;
|
|
7231
7518
|
try {
|
|
7232
7519
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
7233
|
-
var
|
|
7520
|
+
var _context12;
|
|
7234
7521
|
var _remediation = _step3.value;
|
|
7235
|
-
var isRemeditionInFlow = _includesInstanceProperty(
|
|
7522
|
+
var isRemeditionInFlow = _includesInstanceProperty(_context12 = _Object$keys(remediators)).call(_context12, _remediation.name);
|
|
7236
7523
|
if (!isRemeditionInFlow) {
|
|
7237
7524
|
continue;
|
|
7238
7525
|
}
|
|
7239
|
-
var _T =
|
|
7526
|
+
var _T = getRemediatorClass(_remediation, options);
|
|
7240
7527
|
remediator = new _T(_remediation, values, options);
|
|
7241
7528
|
if (remediator.canRemediate()) {
|
|
7242
7529
|
return remediator;
|
|
@@ -7248,10 +7535,13 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7248
7535
|
} finally {
|
|
7249
7536
|
_iterator3.f();
|
|
7250
7537
|
}
|
|
7538
|
+
if (!remediatorCandidates.length && !!idxRemediations.length && useGenericRemediator) {
|
|
7539
|
+
return new GenericRemediator(idxRemediations[0], values, options);
|
|
7540
|
+
}
|
|
7251
7541
|
return remediatorCandidates[0];
|
|
7252
7542
|
}
|
|
7253
|
-
function getNextStep(remediator, idxResponse) {
|
|
7254
|
-
var nextStep = remediator.getNextStep(idxResponse.context);
|
|
7543
|
+
function getNextStep(authClient, remediator, idxResponse) {
|
|
7544
|
+
var nextStep = remediator.getNextStep(authClient, idxResponse.context);
|
|
7255
7545
|
var canSkip = canSkipFn(idxResponse);
|
|
7256
7546
|
var canResend = canResendFn(idxResponse);
|
|
7257
7547
|
return _Object$assign(_Object$assign(_Object$assign({}, nextStep), canSkip && {
|
|
@@ -7260,7 +7550,7 @@ function getNextStep(remediator, idxResponse) {
|
|
|
7260
7550
|
canResend: canResend
|
|
7261
7551
|
});
|
|
7262
7552
|
}
|
|
7263
|
-
function handleIdxError(e, remediator) {
|
|
7553
|
+
function handleIdxError(authClient, e, remediator) {
|
|
7264
7554
|
var idxResponse = isIdxResponse(e) ? e : null;
|
|
7265
7555
|
if (!idxResponse) {
|
|
7266
7556
|
throw e;
|
|
@@ -7277,7 +7567,7 @@ function handleIdxError(e, remediator) {
|
|
|
7277
7567
|
messages: messages
|
|
7278
7568
|
};
|
|
7279
7569
|
} else {
|
|
7280
|
-
var nextStep = remediator && getNextStep(remediator, idxResponse);
|
|
7570
|
+
var nextStep = remediator && getNextStep(authClient, remediator, idxResponse);
|
|
7281
7571
|
return _Object$assign({
|
|
7282
7572
|
idxResponse: idxResponse,
|
|
7283
7573
|
messages: messages
|
|
@@ -7313,13 +7603,13 @@ function removeActionFromOptions(options, actionName) {
|
|
|
7313
7603
|
actions: actions
|
|
7314
7604
|
});
|
|
7315
7605
|
}
|
|
7316
|
-
function remediate(_x, _x2, _x3) {
|
|
7606
|
+
function remediate(_x, _x2, _x3, _x4) {
|
|
7317
7607
|
return _remediate.apply(this, arguments);
|
|
7318
7608
|
}
|
|
7319
7609
|
function _remediate() {
|
|
7320
|
-
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(idxResponse, values, options) {
|
|
7610
|
+
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, idxResponse, values, options) {
|
|
7321
7611
|
var _context2;
|
|
7322
|
-
var _idxResponse, neededToProceed, interactionCode, _options, flow,
|
|
7612
|
+
var _idxResponse, neededToProceed, interactionCode, _options, flow, remediator, actionFromValues, actionFromOptions, actions, _iterator, _step, _loop, _ret, terminal, messages, nextStep, name, data;
|
|
7323
7613
|
return _regeneratorRuntime.wrap(function _callee$(_context4) {
|
|
7324
7614
|
while (1) {
|
|
7325
7615
|
switch (_context4.prev = _context4.next) {
|
|
@@ -7334,28 +7624,16 @@ function _remediate() {
|
|
|
7334
7624
|
idxResponse: idxResponse
|
|
7335
7625
|
});
|
|
7336
7626
|
case 4:
|
|
7337
|
-
terminal = isTerminalResponse(idxResponse);
|
|
7338
|
-
messages = getMessagesFromResponse(idxResponse);
|
|
7339
|
-
if (!terminal) {
|
|
7340
|
-
_context4.next = 8;
|
|
7341
|
-
break;
|
|
7342
|
-
}
|
|
7343
|
-
return _context4.abrupt("return", {
|
|
7344
|
-
idxResponse: idxResponse,
|
|
7345
|
-
terminal: terminal,
|
|
7346
|
-
messages: messages
|
|
7347
|
-
});
|
|
7348
|
-
case 8:
|
|
7349
7627
|
remediator = getRemediator(neededToProceed, values, options);
|
|
7350
7628
|
actionFromValues = getActionFromValues(values, idxResponse);
|
|
7351
7629
|
actionFromOptions = options.actions || [];
|
|
7352
7630
|
actions = _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(actionFromOptions), _toConsumableArray(actionFromValues && [actionFromValues] || []));
|
|
7353
7631
|
if (!actions) {
|
|
7354
|
-
_context4.next =
|
|
7632
|
+
_context4.next = 28;
|
|
7355
7633
|
break;
|
|
7356
7634
|
}
|
|
7357
7635
|
_iterator = _createForOfIteratorHelper(actions);
|
|
7358
|
-
_context4.prev =
|
|
7636
|
+
_context4.prev = 10;
|
|
7359
7637
|
_loop = _regeneratorRuntime.mark(function _loop() {
|
|
7360
7638
|
var action, params, valuesWithoutExecutedAction, optionsWithoutExecutedAction, remediationAction;
|
|
7361
7639
|
return _regeneratorRuntime.wrap(function _loop$(_context3) {
|
|
@@ -7388,7 +7666,7 @@ function _remediate() {
|
|
|
7388
7666
|
_context3.prev = 13;
|
|
7389
7667
|
_context3.t0 = _context3["catch"](6);
|
|
7390
7668
|
return _context3.abrupt("return", {
|
|
7391
|
-
v: handleIdxError(_context3.t0, remediator)
|
|
7669
|
+
v: handleIdxError(authClient, _context3.t0, remediator)
|
|
7392
7670
|
});
|
|
7393
7671
|
case 16:
|
|
7394
7672
|
if (!(action === 'cancel')) {
|
|
@@ -7403,7 +7681,7 @@ function _remediate() {
|
|
|
7403
7681
|
});
|
|
7404
7682
|
case 18:
|
|
7405
7683
|
return _context3.abrupt("return", {
|
|
7406
|
-
v: remediate(idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7684
|
+
v: remediate(authClient, idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7407
7685
|
});
|
|
7408
7686
|
case 19:
|
|
7409
7687
|
remediationAction = _findInstanceProperty(neededToProceed).call(neededToProceed, function (_ref) {
|
|
@@ -7428,11 +7706,11 @@ function _remediate() {
|
|
|
7428
7706
|
_context3.prev = 28;
|
|
7429
7707
|
_context3.t1 = _context3["catch"](21);
|
|
7430
7708
|
return _context3.abrupt("return", {
|
|
7431
|
-
v: handleIdxError(_context3.t1, remediator)
|
|
7709
|
+
v: handleIdxError(authClient, _context3.t1, remediator)
|
|
7432
7710
|
});
|
|
7433
7711
|
case 31:
|
|
7434
7712
|
return _context3.abrupt("return", {
|
|
7435
|
-
v: remediate(idxResponse, values, optionsWithoutExecutedAction)
|
|
7713
|
+
v: remediate(authClient, idxResponse, values, optionsWithoutExecutedAction)
|
|
7436
7714
|
});
|
|
7437
7715
|
case 32:
|
|
7438
7716
|
case "end":
|
|
@@ -7442,33 +7720,45 @@ function _remediate() {
|
|
|
7442
7720
|
}, _loop, null, [[6, 13], [21, 28]]);
|
|
7443
7721
|
});
|
|
7444
7722
|
_iterator.s();
|
|
7445
|
-
case
|
|
7723
|
+
case 13:
|
|
7446
7724
|
if ((_step = _iterator.n()).done) {
|
|
7447
|
-
_context4.next =
|
|
7725
|
+
_context4.next = 20;
|
|
7448
7726
|
break;
|
|
7449
7727
|
}
|
|
7450
|
-
return _context4.delegateYield(_loop(), "t0",
|
|
7451
|
-
case
|
|
7728
|
+
return _context4.delegateYield(_loop(), "t0", 15);
|
|
7729
|
+
case 15:
|
|
7452
7730
|
_ret = _context4.t0;
|
|
7453
7731
|
if (!(_typeof(_ret) === "object")) {
|
|
7454
|
-
_context4.next =
|
|
7732
|
+
_context4.next = 18;
|
|
7455
7733
|
break;
|
|
7456
7734
|
}
|
|
7457
7735
|
return _context4.abrupt("return", _ret.v);
|
|
7458
|
-
case
|
|
7459
|
-
_context4.next =
|
|
7736
|
+
case 18:
|
|
7737
|
+
_context4.next = 13;
|
|
7460
7738
|
break;
|
|
7461
|
-
case
|
|
7462
|
-
_context4.next =
|
|
7739
|
+
case 20:
|
|
7740
|
+
_context4.next = 25;
|
|
7463
7741
|
break;
|
|
7464
|
-
case
|
|
7465
|
-
_context4.prev =
|
|
7466
|
-
_context4.t1 = _context4["catch"](
|
|
7742
|
+
case 22:
|
|
7743
|
+
_context4.prev = 22;
|
|
7744
|
+
_context4.t1 = _context4["catch"](10);
|
|
7467
7745
|
_iterator.e(_context4.t1);
|
|
7468
|
-
case
|
|
7469
|
-
_context4.prev =
|
|
7746
|
+
case 25:
|
|
7747
|
+
_context4.prev = 25;
|
|
7470
7748
|
_iterator.f();
|
|
7471
|
-
return _context4.finish(
|
|
7749
|
+
return _context4.finish(25);
|
|
7750
|
+
case 28:
|
|
7751
|
+
terminal = isTerminalResponse(idxResponse);
|
|
7752
|
+
messages = getMessagesFromResponse(idxResponse);
|
|
7753
|
+
if (!terminal) {
|
|
7754
|
+
_context4.next = 32;
|
|
7755
|
+
break;
|
|
7756
|
+
}
|
|
7757
|
+
return _context4.abrupt("return", {
|
|
7758
|
+
idxResponse: idxResponse,
|
|
7759
|
+
terminal: terminal,
|
|
7760
|
+
messages: messages
|
|
7761
|
+
});
|
|
7472
7762
|
case 32:
|
|
7473
7763
|
if (remediator) {
|
|
7474
7764
|
_context4.next = 49;
|
|
@@ -7493,7 +7783,7 @@ function _remediate() {
|
|
|
7493
7783
|
case 43:
|
|
7494
7784
|
_context4.prev = 43;
|
|
7495
7785
|
_context4.t2 = _context4["catch"](35);
|
|
7496
|
-
return _context4.abrupt("return", handleIdxError(_context4.t2));
|
|
7786
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t2));
|
|
7497
7787
|
case 46:
|
|
7498
7788
|
if (!(flow === 'default')) {
|
|
7499
7789
|
_context4.next = 48;
|
|
@@ -7511,7 +7801,7 @@ function _remediate() {
|
|
|
7511
7801
|
_context4.next = 52;
|
|
7512
7802
|
break;
|
|
7513
7803
|
}
|
|
7514
|
-
nextStep = getNextStep(remediator, idxResponse);
|
|
7804
|
+
nextStep = getNextStep(authClient, remediator, idxResponse);
|
|
7515
7805
|
return _context4.abrupt("return", {
|
|
7516
7806
|
idxResponse: idxResponse,
|
|
7517
7807
|
nextStep: nextStep,
|
|
@@ -7532,17 +7822,17 @@ function _remediate() {
|
|
|
7532
7822
|
options = _Object$assign(_Object$assign({}, options), {
|
|
7533
7823
|
step: undefined
|
|
7534
7824
|
});
|
|
7535
|
-
return _context4.abrupt("return", remediate(idxResponse, values, options));
|
|
7825
|
+
return _context4.abrupt("return", remediate(authClient, idxResponse, values, options));
|
|
7536
7826
|
case 64:
|
|
7537
7827
|
_context4.prev = 64;
|
|
7538
7828
|
_context4.t3 = _context4["catch"](54);
|
|
7539
|
-
return _context4.abrupt("return", handleIdxError(_context4.t3, remediator));
|
|
7829
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t3, remediator));
|
|
7540
7830
|
case 67:
|
|
7541
7831
|
case "end":
|
|
7542
7832
|
return _context4.stop();
|
|
7543
7833
|
}
|
|
7544
7834
|
}
|
|
7545
|
-
}, _callee, null, [[
|
|
7835
|
+
}, _callee, null, [[10, 22, 25, 28], [35, 43], [54, 64]]);
|
|
7546
7836
|
}));
|
|
7547
7837
|
return _remediate.apply(this, arguments);
|
|
7548
7838
|
}
|
|
@@ -7645,11 +7935,13 @@ function initializeValues(options) {
|
|
|
7645
7935
|
return values;
|
|
7646
7936
|
}
|
|
7647
7937
|
function initializeData(authClient, data) {
|
|
7938
|
+
var _a;
|
|
7648
7939
|
var options = data.options;
|
|
7649
7940
|
var flow = options.flow,
|
|
7650
7941
|
withCredentials = options.withCredentials,
|
|
7651
7942
|
remediators = options.remediators,
|
|
7652
|
-
actions = options.actions
|
|
7943
|
+
actions = options.actions,
|
|
7944
|
+
useGenericRemediator = options.useGenericRemediator;
|
|
7653
7945
|
var status = IdxStatus.PENDING;
|
|
7654
7946
|
flow = flow || authClient.idx.getFlow() || 'default';
|
|
7655
7947
|
if (flow) {
|
|
@@ -7659,12 +7951,14 @@ function initializeData(authClient, data) {
|
|
|
7659
7951
|
remediators = remediators || flowSpec.remediators;
|
|
7660
7952
|
actions = actions || flowSpec.actions;
|
|
7661
7953
|
}
|
|
7954
|
+
useGenericRemediator = useGenericRemediator || ((_a = authClient.options.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator) || false;
|
|
7662
7955
|
return _Object$assign(_Object$assign({}, data), {
|
|
7663
7956
|
options: _Object$assign(_Object$assign({}, options), {
|
|
7664
7957
|
flow: flow,
|
|
7665
7958
|
withCredentials: withCredentials,
|
|
7666
7959
|
remediators: remediators,
|
|
7667
|
-
actions: actions
|
|
7960
|
+
actions: actions,
|
|
7961
|
+
useGenericRemediator: useGenericRemediator
|
|
7668
7962
|
}),
|
|
7669
7963
|
status: status
|
|
7670
7964
|
});
|
|
@@ -7674,13 +7968,13 @@ function getDataFromIntrospect(_x, _x2) {
|
|
|
7674
7968
|
}
|
|
7675
7969
|
function _getDataFromIntrospect() {
|
|
7676
7970
|
_getDataFromIntrospect = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, data) {
|
|
7677
|
-
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, idxResponse, meta, interactionHandle, interactResponse;
|
|
7971
|
+
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, maxAge, idxResponse, meta, interactionHandle, interactResponse;
|
|
7678
7972
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7679
7973
|
while (1) {
|
|
7680
7974
|
switch (_context.prev = _context.next) {
|
|
7681
7975
|
case 0:
|
|
7682
7976
|
options = data.options;
|
|
7683
|
-
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken;
|
|
7977
|
+
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken, maxAge = options.maxAge;
|
|
7684
7978
|
meta = getSavedTransactionMeta(authClient, {
|
|
7685
7979
|
state: state,
|
|
7686
7980
|
recoveryToken: recoveryToken,
|
|
@@ -7713,7 +8007,8 @@ function _getDataFromIntrospect() {
|
|
|
7713
8007
|
state: state,
|
|
7714
8008
|
scopes: scopes,
|
|
7715
8009
|
activationToken: activationToken,
|
|
7716
|
-
recoveryToken: recoveryToken
|
|
8010
|
+
recoveryToken: recoveryToken,
|
|
8011
|
+
maxAge: maxAge
|
|
7717
8012
|
});
|
|
7718
8013
|
case 14:
|
|
7719
8014
|
interactResponse = _context.sent;
|
|
@@ -7742,18 +8037,18 @@ function _getDataFromIntrospect() {
|
|
|
7742
8037
|
}));
|
|
7743
8038
|
return _getDataFromIntrospect.apply(this, arguments);
|
|
7744
8039
|
}
|
|
7745
|
-
function getDataFromRemediate(_x3) {
|
|
8040
|
+
function getDataFromRemediate(_x3, _x4) {
|
|
7746
8041
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7747
8042
|
}
|
|
7748
8043
|
function _getDataFromRemediate() {
|
|
7749
|
-
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(data) {
|
|
7750
|
-
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
8044
|
+
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(authClient, data) {
|
|
8045
|
+
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, useGenericRemediator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
7751
8046
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
7752
8047
|
while (1) {
|
|
7753
8048
|
switch (_context2.prev = _context2.next) {
|
|
7754
8049
|
case 0:
|
|
7755
8050
|
idxResponse = data.idxResponse, options = data.options, values = _valuesInstanceProperty(data);
|
|
7756
|
-
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator;
|
|
8051
|
+
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator, useGenericRemediator = options.useGenericRemediator;
|
|
7757
8052
|
shouldRemediate = autoRemediate !== false && (remediators || actions || step);
|
|
7758
8053
|
if (shouldRemediate) {
|
|
7759
8054
|
_context2.next = 5;
|
|
@@ -7765,12 +8060,13 @@ function _getDataFromRemediate() {
|
|
|
7765
8060
|
stateHandle: idxResponse.rawIdxState.stateHandle
|
|
7766
8061
|
});
|
|
7767
8062
|
_context2.next = 8;
|
|
7768
|
-
return remediate(idxResponse, values, {
|
|
8063
|
+
return remediate(authClient, idxResponse, values, {
|
|
7769
8064
|
remediators: remediators,
|
|
7770
8065
|
actions: actions,
|
|
7771
8066
|
flow: flow,
|
|
7772
8067
|
step: step,
|
|
7773
|
-
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator
|
|
8068
|
+
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator,
|
|
8069
|
+
useGenericRemediator: useGenericRemediator
|
|
7774
8070
|
});
|
|
7775
8071
|
case 8:
|
|
7776
8072
|
_yield$remediate = _context2.sent;
|
|
@@ -7792,7 +8088,7 @@ function _getDataFromRemediate() {
|
|
|
7792
8088
|
}));
|
|
7793
8089
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7794
8090
|
}
|
|
7795
|
-
function getTokens(
|
|
8091
|
+
function getTokens(_x5, _x6) {
|
|
7796
8092
|
return _getTokens.apply(this, arguments);
|
|
7797
8093
|
}
|
|
7798
8094
|
function _getTokens() {
|
|
@@ -7826,70 +8122,82 @@ function _getTokens() {
|
|
|
7826
8122
|
}));
|
|
7827
8123
|
return _getTokens.apply(this, arguments);
|
|
7828
8124
|
}
|
|
7829
|
-
function finalizeData(
|
|
8125
|
+
function finalizeData(_x7, _x8) {
|
|
7830
8126
|
return _finalizeData.apply(this, arguments);
|
|
7831
8127
|
}
|
|
7832
8128
|
function _finalizeData() {
|
|
7833
8129
|
_finalizeData = _asyncToGenerator( _regeneratorRuntime.mark(function _callee4(authClient, data) {
|
|
7834
|
-
var options, idxResponse, canceled, status, exchangeCodeForTokens, shouldClearTransaction, clearSharedStorage, interactionCode, tokens, enabledFeatures, availableSteps, messages, terminal;
|
|
8130
|
+
var options, idxResponse, canceled, status, exchangeCodeForTokens, shouldSaveResponse, shouldClearTransaction, clearSharedStorage, interactionCode, tokens, enabledFeatures, availableSteps, messages, terminal, hasActions, hasErrors, isTerminalSuccess;
|
|
7835
8131
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
7836
8132
|
while (1) {
|
|
7837
8133
|
switch (_context4.prev = _context4.next) {
|
|
7838
8134
|
case 0:
|
|
7839
8135
|
options = data.options, idxResponse = data.idxResponse, canceled = data.canceled, status = data.status;
|
|
7840
8136
|
exchangeCodeForTokens = options.exchangeCodeForTokens;
|
|
8137
|
+
shouldSaveResponse = false;
|
|
7841
8138
|
shouldClearTransaction = false;
|
|
7842
8139
|
clearSharedStorage = true;
|
|
7843
8140
|
if (idxResponse) {
|
|
8141
|
+
shouldSaveResponse = !!(idxResponse.requestDidSucceed || idxResponse.stepUp);
|
|
7844
8142
|
enabledFeatures = getEnabledFeatures(idxResponse);
|
|
7845
|
-
availableSteps = getAvailableSteps(idxResponse);
|
|
8143
|
+
availableSteps = getAvailableSteps(authClient, idxResponse, options.useGenericRemediator);
|
|
7846
8144
|
messages = getMessagesFromResponse(idxResponse);
|
|
7847
8145
|
terminal = isTerminalResponse(idxResponse);
|
|
7848
8146
|
}
|
|
7849
8147
|
if (!terminal) {
|
|
7850
|
-
_context4.next =
|
|
8148
|
+
_context4.next = 15;
|
|
7851
8149
|
break;
|
|
7852
8150
|
}
|
|
7853
8151
|
status = IdxStatus.TERMINAL;
|
|
7854
|
-
|
|
8152
|
+
hasActions = _Object$keys(idxResponse.actions).length > 0;
|
|
8153
|
+
hasErrors = !!_findInstanceProperty(messages).call(messages, function (msg) {
|
|
8154
|
+
return msg.class === 'ERROR';
|
|
8155
|
+
});
|
|
8156
|
+
isTerminalSuccess = !hasActions && !hasErrors && idxResponse.requestDidSucceed === true;
|
|
8157
|
+
if (isTerminalSuccess) {
|
|
8158
|
+
shouldClearTransaction = true;
|
|
8159
|
+
} else {
|
|
8160
|
+
shouldSaveResponse = shouldSaveResponse && hasActions;
|
|
8161
|
+
}
|
|
7855
8162
|
clearSharedStorage = false;
|
|
7856
|
-
_context4.next =
|
|
8163
|
+
_context4.next = 32;
|
|
7857
8164
|
break;
|
|
7858
|
-
case
|
|
8165
|
+
case 15:
|
|
7859
8166
|
if (!canceled) {
|
|
7860
|
-
_context4.next =
|
|
8167
|
+
_context4.next = 20;
|
|
7861
8168
|
break;
|
|
7862
8169
|
}
|
|
7863
8170
|
status = IdxStatus.CANCELED;
|
|
7864
8171
|
shouldClearTransaction = true;
|
|
7865
|
-
_context4.next =
|
|
8172
|
+
_context4.next = 32;
|
|
7866
8173
|
break;
|
|
7867
|
-
case
|
|
8174
|
+
case 20:
|
|
7868
8175
|
if (!(idxResponse === null || idxResponse === void 0 ? void 0 : idxResponse.interactionCode)) {
|
|
7869
|
-
_context4.next =
|
|
8176
|
+
_context4.next = 32;
|
|
7870
8177
|
break;
|
|
7871
8178
|
}
|
|
7872
8179
|
interactionCode = idxResponse.interactionCode;
|
|
7873
8180
|
if (!(exchangeCodeForTokens === false)) {
|
|
7874
|
-
_context4.next =
|
|
8181
|
+
_context4.next = 27;
|
|
7875
8182
|
break;
|
|
7876
8183
|
}
|
|
7877
8184
|
status = IdxStatus.SUCCESS;
|
|
7878
8185
|
shouldClearTransaction = false;
|
|
7879
|
-
_context4.next =
|
|
8186
|
+
_context4.next = 32;
|
|
7880
8187
|
break;
|
|
7881
|
-
case
|
|
7882
|
-
_context4.next =
|
|
8188
|
+
case 27:
|
|
8189
|
+
_context4.next = 29;
|
|
7883
8190
|
return getTokens(authClient, data);
|
|
7884
|
-
case
|
|
8191
|
+
case 29:
|
|
7885
8192
|
tokens = _context4.sent;
|
|
7886
8193
|
status = IdxStatus.SUCCESS;
|
|
7887
8194
|
shouldClearTransaction = true;
|
|
7888
|
-
case
|
|
8195
|
+
case 32:
|
|
7889
8196
|
return _context4.abrupt("return", _Object$assign(_Object$assign({}, data), {
|
|
7890
8197
|
status: status,
|
|
7891
8198
|
interactionCode: interactionCode,
|
|
7892
8199
|
tokens: tokens,
|
|
8200
|
+
shouldSaveResponse: shouldSaveResponse,
|
|
7893
8201
|
shouldClearTransaction: shouldClearTransaction,
|
|
7894
8202
|
clearSharedStorage: clearSharedStorage,
|
|
7895
8203
|
enabledFeatures: enabledFeatures,
|
|
@@ -7897,7 +8205,7 @@ function _finalizeData() {
|
|
|
7897
8205
|
messages: messages,
|
|
7898
8206
|
terminal: terminal
|
|
7899
8207
|
}));
|
|
7900
|
-
case
|
|
8208
|
+
case 33:
|
|
7901
8209
|
case "end":
|
|
7902
8210
|
return _context4.stop();
|
|
7903
8211
|
}
|
|
@@ -7923,16 +8231,18 @@ function handleError(err, data) {
|
|
|
7923
8231
|
shouldClearTransaction: shouldClearTransaction
|
|
7924
8232
|
});
|
|
7925
8233
|
}
|
|
7926
|
-
function run(
|
|
8234
|
+
function run(_x9) {
|
|
7927
8235
|
return _run.apply(this, arguments);
|
|
7928
8236
|
}
|
|
7929
8237
|
function _run() {
|
|
7930
8238
|
_run = _asyncToGenerator( _regeneratorRuntime.mark(function _callee5(authClient) {
|
|
7931
8239
|
var options,
|
|
8240
|
+
_a,
|
|
7932
8241
|
data,
|
|
7933
8242
|
_data,
|
|
7934
8243
|
idxResponse,
|
|
7935
8244
|
meta,
|
|
8245
|
+
shouldSaveResponse,
|
|
7936
8246
|
shouldClearTransaction,
|
|
7937
8247
|
clearSharedStorage,
|
|
7938
8248
|
status,
|
|
@@ -7969,7 +8279,7 @@ function _run() {
|
|
|
7969
8279
|
case 6:
|
|
7970
8280
|
data = _context5.sent;
|
|
7971
8281
|
_context5.next = 9;
|
|
7972
|
-
return getDataFromRemediate(data);
|
|
8282
|
+
return getDataFromRemediate(authClient, data);
|
|
7973
8283
|
case 9:
|
|
7974
8284
|
data = _context5.sent;
|
|
7975
8285
|
_context5.next = 15;
|
|
@@ -7983,18 +8293,20 @@ function _run() {
|
|
|
7983
8293
|
return finalizeData(authClient, data);
|
|
7984
8294
|
case 17:
|
|
7985
8295
|
data = _context5.sent;
|
|
7986
|
-
_data = data, idxResponse = _data.idxResponse, meta = _data.meta, shouldClearTransaction = _data.shouldClearTransaction, clearSharedStorage = _data.clearSharedStorage, status = _data.status, enabledFeatures = _data.enabledFeatures, availableSteps = _data.availableSteps, tokens = _data.tokens, nextStep = _data.nextStep, messages = _data.messages, error = _data.error, interactionCode = _data.interactionCode;
|
|
8296
|
+
_data = data, idxResponse = _data.idxResponse, meta = _data.meta, shouldSaveResponse = _data.shouldSaveResponse, shouldClearTransaction = _data.shouldClearTransaction, clearSharedStorage = _data.clearSharedStorage, status = _data.status, enabledFeatures = _data.enabledFeatures, availableSteps = _data.availableSteps, tokens = _data.tokens, nextStep = _data.nextStep, messages = _data.messages, error = _data.error, interactionCode = _data.interactionCode;
|
|
7987
8297
|
if (shouldClearTransaction) {
|
|
7988
8298
|
authClient.transactionManager.clear({
|
|
7989
8299
|
clearSharedStorage: clearSharedStorage
|
|
7990
8300
|
});
|
|
7991
8301
|
} else {
|
|
7992
8302
|
saveTransactionMeta(authClient, _Object$assign({}, meta));
|
|
7993
|
-
if (
|
|
8303
|
+
if (shouldSaveResponse) {
|
|
7994
8304
|
rawIdxResponse = idxResponse.rawIdxState, _requestDidSucceed = idxResponse.requestDidSucceed;
|
|
7995
8305
|
authClient.transactionManager.saveIdxResponse({
|
|
7996
8306
|
rawIdxResponse: rawIdxResponse,
|
|
7997
|
-
requestDidSucceed: _requestDidSucceed
|
|
8307
|
+
requestDidSucceed: _requestDidSucceed,
|
|
8308
|
+
stateHandle: (_a = idxResponse.context) === null || _a === void 0 ? void 0 : _a.stateHandle,
|
|
8309
|
+
interactionHandle: meta === null || meta === void 0 ? void 0 : meta.interactionHandle
|
|
7998
8310
|
});
|
|
7999
8311
|
}
|
|
8000
8312
|
}
|
|
@@ -8152,52 +8464,6 @@ function _handleEmailVerifyCallback() {
|
|
|
8152
8464
|
return _handleEmailVerifyCallback.apply(this, arguments);
|
|
8153
8465
|
}
|
|
8154
8466
|
|
|
8155
|
-
function canProceed(authClient) {
|
|
8156
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8157
|
-
var meta = getSavedTransactionMeta(authClient, options);
|
|
8158
|
-
return !!(meta || options.stateHandle);
|
|
8159
|
-
}
|
|
8160
|
-
function proceed(_x) {
|
|
8161
|
-
return _proceed.apply(this, arguments);
|
|
8162
|
-
}
|
|
8163
|
-
function _proceed() {
|
|
8164
|
-
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
8165
|
-
var options,
|
|
8166
|
-
flow,
|
|
8167
|
-
state,
|
|
8168
|
-
meta,
|
|
8169
|
-
_args = arguments;
|
|
8170
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8171
|
-
while (1) {
|
|
8172
|
-
switch (_context.prev = _context.next) {
|
|
8173
|
-
case 0:
|
|
8174
|
-
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
8175
|
-
if (canProceed(authClient, options)) {
|
|
8176
|
-
_context.next = 3;
|
|
8177
|
-
break;
|
|
8178
|
-
}
|
|
8179
|
-
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
8180
|
-
case 3:
|
|
8181
|
-
flow = options.flow, state = options.state;
|
|
8182
|
-
if (!flow) {
|
|
8183
|
-
meta = getSavedTransactionMeta(authClient, {
|
|
8184
|
-
state: state
|
|
8185
|
-
});
|
|
8186
|
-
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
8187
|
-
}
|
|
8188
|
-
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
8189
|
-
flow: flow
|
|
8190
|
-
})));
|
|
8191
|
-
case 6:
|
|
8192
|
-
case "end":
|
|
8193
|
-
return _context.stop();
|
|
8194
|
-
}
|
|
8195
|
-
}
|
|
8196
|
-
}, _callee);
|
|
8197
|
-
}));
|
|
8198
|
-
return _proceed.apply(this, arguments);
|
|
8199
|
-
}
|
|
8200
|
-
|
|
8201
8467
|
function poll(_x) {
|
|
8202
8468
|
return _poll.apply(this, arguments);
|
|
8203
8469
|
}
|
|
@@ -8486,7 +8752,7 @@ function _unlockAccount() {
|
|
|
8486
8752
|
var OktaUserAgent = function () {
|
|
8487
8753
|
function OktaUserAgent() {
|
|
8488
8754
|
_classCallCheck(this, OktaUserAgent);
|
|
8489
|
-
this.environments = ["okta-auth-js/".concat("6.
|
|
8755
|
+
this.environments = ["okta-auth-js/".concat("6.5.0")];
|
|
8490
8756
|
}
|
|
8491
8757
|
_createClass(OktaUserAgent, [{
|
|
8492
8758
|
key: "addEnvironment",
|
|
@@ -8504,7 +8770,7 @@ var OktaUserAgent = function () {
|
|
|
8504
8770
|
}, {
|
|
8505
8771
|
key: "getVersion",
|
|
8506
8772
|
value: function getVersion() {
|
|
8507
|
-
return "6.
|
|
8773
|
+
return "6.5.0";
|
|
8508
8774
|
}
|
|
8509
8775
|
}, {
|
|
8510
8776
|
key: "maybeAddNodeEnvironment",
|