@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.node.mjs
CHANGED
|
@@ -62,11 +62,11 @@ import _Number$isInteger from '@babel/runtime-corejs3/core-js-stable/number/is-i
|
|
|
62
62
|
import _URL2 from '@babel/runtime-corejs3/core-js-stable/url';
|
|
63
63
|
import Emitter from 'tiny-emitter';
|
|
64
64
|
|
|
65
|
-
function _createSuper$
|
|
66
|
-
function _isNativeReflectConstruct$
|
|
65
|
+
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); }; }
|
|
66
|
+
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; } }
|
|
67
67
|
var CustomError = function (_Error) {
|
|
68
68
|
_inherits(CustomError, _Error);
|
|
69
|
-
var _super = _createSuper$
|
|
69
|
+
var _super = _createSuper$y(CustomError);
|
|
70
70
|
function CustomError(message) {
|
|
71
71
|
var _this;
|
|
72
72
|
_classCallCheck(this, CustomError);
|
|
@@ -77,11 +77,11 @@ var CustomError = function (_Error) {
|
|
|
77
77
|
return CustomError;
|
|
78
78
|
}( _wrapNativeSuper(Error));
|
|
79
79
|
|
|
80
|
-
function _createSuper$
|
|
81
|
-
function _isNativeReflectConstruct$
|
|
80
|
+
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); }; }
|
|
81
|
+
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; } }
|
|
82
82
|
var AuthApiError = function (_CustomError) {
|
|
83
83
|
_inherits(AuthApiError, _CustomError);
|
|
84
|
-
var _super = _createSuper$
|
|
84
|
+
var _super = _createSuper$x(AuthApiError);
|
|
85
85
|
function AuthApiError(err, xhr) {
|
|
86
86
|
var _this;
|
|
87
87
|
_classCallCheck(this, AuthApiError);
|
|
@@ -101,11 +101,11 @@ var AuthApiError = function (_CustomError) {
|
|
|
101
101
|
return AuthApiError;
|
|
102
102
|
}(CustomError);
|
|
103
103
|
|
|
104
|
-
function _createSuper$
|
|
105
|
-
function _isNativeReflectConstruct$
|
|
104
|
+
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); }; }
|
|
105
|
+
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; } }
|
|
106
106
|
var AuthPollStopError = function (_CustomError) {
|
|
107
107
|
_inherits(AuthPollStopError, _CustomError);
|
|
108
|
-
var _super = _createSuper$
|
|
108
|
+
var _super = _createSuper$w(AuthPollStopError);
|
|
109
109
|
function AuthPollStopError() {
|
|
110
110
|
_classCallCheck(this, AuthPollStopError);
|
|
111
111
|
var message = 'The poll was stopped by the sdk';
|
|
@@ -114,11 +114,11 @@ var AuthPollStopError = function (_CustomError) {
|
|
|
114
114
|
return AuthPollStopError;
|
|
115
115
|
}(CustomError);
|
|
116
116
|
|
|
117
|
-
function _createSuper$
|
|
118
|
-
function _isNativeReflectConstruct$
|
|
117
|
+
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); }; }
|
|
118
|
+
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; } }
|
|
119
119
|
var AuthSdkError = function (_CustomError) {
|
|
120
120
|
_inherits(AuthSdkError, _CustomError);
|
|
121
|
-
var _super = _createSuper$
|
|
121
|
+
var _super = _createSuper$v(AuthSdkError);
|
|
122
122
|
function AuthSdkError(msg, xhr) {
|
|
123
123
|
var _this;
|
|
124
124
|
_classCallCheck(this, AuthSdkError);
|
|
@@ -137,11 +137,11 @@ var AuthSdkError = function (_CustomError) {
|
|
|
137
137
|
return AuthSdkError;
|
|
138
138
|
}(CustomError);
|
|
139
139
|
|
|
140
|
-
function _createSuper$
|
|
141
|
-
function _isNativeReflectConstruct$
|
|
140
|
+
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); }; }
|
|
141
|
+
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; } }
|
|
142
142
|
var OAuthError = function (_CustomError) {
|
|
143
143
|
_inherits(OAuthError, _CustomError);
|
|
144
|
-
var _super = _createSuper$
|
|
144
|
+
var _super = _createSuper$u(OAuthError);
|
|
145
145
|
function OAuthError(errorCode, summary) {
|
|
146
146
|
var _this;
|
|
147
147
|
_classCallCheck(this, OAuthError);
|
|
@@ -4269,13 +4269,15 @@ var TransactionManager = function () {
|
|
|
4269
4269
|
var transactionStorage = this.storageManager.getTransactionStorage();
|
|
4270
4270
|
var meta = transactionStorage.getStorage();
|
|
4271
4271
|
transactionStorage.clearStorage();
|
|
4272
|
-
this.clearIdxResponse();
|
|
4273
4272
|
if (this.enableSharedStorage && options.clearSharedStorage !== false) {
|
|
4274
4273
|
var state = options.state || (meta === null || meta === void 0 ? void 0 : meta.state);
|
|
4275
4274
|
if (state) {
|
|
4276
4275
|
clearTransactionFromSharedStorage(this.storageManager, state);
|
|
4277
4276
|
}
|
|
4278
4277
|
}
|
|
4278
|
+
if (options.clearIdxResponse !== false) {
|
|
4279
|
+
this.clearIdxResponse();
|
|
4280
|
+
}
|
|
4279
4281
|
if (!this.legacyWidgetSupport) {
|
|
4280
4282
|
return;
|
|
4281
4283
|
}
|
|
@@ -4471,9 +4473,7 @@ var TransactionManager = function () {
|
|
|
4471
4473
|
}
|
|
4472
4474
|
}, {
|
|
4473
4475
|
key: "saveIdxResponse",
|
|
4474
|
-
value: function saveIdxResponse(
|
|
4475
|
-
var rawIdxResponse = _ref.rawIdxResponse,
|
|
4476
|
-
requestDidSucceed = _ref.requestDidSucceed;
|
|
4476
|
+
value: function saveIdxResponse(data) {
|
|
4477
4477
|
if (!this.saveLastResponse) {
|
|
4478
4478
|
return;
|
|
4479
4479
|
}
|
|
@@ -4481,14 +4481,11 @@ var TransactionManager = function () {
|
|
|
4481
4481
|
if (!storage) {
|
|
4482
4482
|
return;
|
|
4483
4483
|
}
|
|
4484
|
-
storage.setStorage(
|
|
4485
|
-
rawIdxResponse: rawIdxResponse,
|
|
4486
|
-
requestDidSucceed: requestDidSucceed
|
|
4487
|
-
});
|
|
4484
|
+
storage.setStorage(data);
|
|
4488
4485
|
}
|
|
4489
4486
|
}, {
|
|
4490
4487
|
key: "loadIdxResponse",
|
|
4491
|
-
value: function loadIdxResponse() {
|
|
4488
|
+
value: function loadIdxResponse(options) {
|
|
4492
4489
|
if (!this.saveLastResponse) {
|
|
4493
4490
|
return null;
|
|
4494
4491
|
}
|
|
@@ -4500,6 +4497,16 @@ var TransactionManager = function () {
|
|
|
4500
4497
|
if (!storedValue || !isRawIdxResponse(storedValue.rawIdxResponse)) {
|
|
4501
4498
|
return null;
|
|
4502
4499
|
}
|
|
4500
|
+
if (options) {
|
|
4501
|
+
var stateHandle = options.stateHandle,
|
|
4502
|
+
interactionHandle = options.interactionHandle;
|
|
4503
|
+
if (stateHandle && storedValue.stateHandle !== stateHandle) {
|
|
4504
|
+
return null;
|
|
4505
|
+
}
|
|
4506
|
+
if (interactionHandle && storedValue.interactionHandle !== interactionHandle) {
|
|
4507
|
+
return null;
|
|
4508
|
+
}
|
|
4509
|
+
}
|
|
4503
4510
|
return storedValue;
|
|
4504
4511
|
}
|
|
4505
4512
|
}, {
|
|
@@ -4749,6 +4756,7 @@ function mergeOptions(options, args) {
|
|
|
4749
4756
|
}
|
|
4750
4757
|
function buildOptions() {
|
|
4751
4758
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4759
|
+
var _a;
|
|
4752
4760
|
assertValidConfig(args);
|
|
4753
4761
|
args = mergeOptions(getDefaultOptions(), args);
|
|
4754
4762
|
return removeNils({
|
|
@@ -4782,6 +4790,9 @@ function buildOptions() {
|
|
|
4782
4790
|
codeChallengeMethod: args.codeChallengeMethod,
|
|
4783
4791
|
recoveryToken: args.recoveryToken,
|
|
4784
4792
|
activationToken: args.activationToken,
|
|
4793
|
+
idx: {
|
|
4794
|
+
useGenericRemediator: !!((_a = args.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator)
|
|
4795
|
+
},
|
|
4785
4796
|
ignoreSignature: !!args.ignoreSignature,
|
|
4786
4797
|
clientSecret: args.clientSecret
|
|
4787
4798
|
});
|
|
@@ -4804,6 +4815,8 @@ function _createTransactionMeta() {
|
|
|
4804
4815
|
activationToken,
|
|
4805
4816
|
_Object$assign2$recov,
|
|
4806
4817
|
recoveryToken,
|
|
4818
|
+
_Object$assign2$maxAg,
|
|
4819
|
+
maxAge,
|
|
4807
4820
|
meta,
|
|
4808
4821
|
_args = arguments;
|
|
4809
4822
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -4816,12 +4829,13 @@ function _createTransactionMeta() {
|
|
|
4816
4829
|
case 3:
|
|
4817
4830
|
tokenParams = _context.sent;
|
|
4818
4831
|
pkceMeta = createOAuthMeta(authClient, tokenParams);
|
|
4819
|
-
_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;
|
|
4832
|
+
_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;
|
|
4820
4833
|
meta = _Object$assign(_Object$assign({}, pkceMeta), {
|
|
4821
4834
|
flow: flow,
|
|
4822
4835
|
withCredentials: withCredentials,
|
|
4823
4836
|
activationToken: activationToken,
|
|
4824
|
-
recoveryToken: recoveryToken
|
|
4837
|
+
recoveryToken: recoveryToken,
|
|
4838
|
+
maxAge: maxAge
|
|
4825
4839
|
});
|
|
4826
4840
|
return _context.abrupt("return", meta);
|
|
4827
4841
|
case 8:
|
|
@@ -4949,6 +4963,7 @@ function _interact() {
|
|
|
4949
4963
|
codeChallengeMethod,
|
|
4950
4964
|
activationToken,
|
|
4951
4965
|
recoveryToken,
|
|
4966
|
+
maxAge,
|
|
4952
4967
|
clientSecret,
|
|
4953
4968
|
url,
|
|
4954
4969
|
params,
|
|
@@ -4975,31 +4990,30 @@ function _interact() {
|
|
|
4975
4990
|
case 7:
|
|
4976
4991
|
meta = _context.sent;
|
|
4977
4992
|
baseUrl = getOAuthBaseUrl(authClient);
|
|
4978
|
-
_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;
|
|
4993
|
+
_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;
|
|
4979
4994
|
clientSecret = options.clientSecret || authClient.options.clientSecret;
|
|
4980
4995
|
withCredentials = withCredentials !== null && withCredentials !== void 0 ? withCredentials : true;
|
|
4981
4996
|
url = "".concat(baseUrl, "/v1/interact");
|
|
4982
|
-
params = {
|
|
4997
|
+
params = _Object$assign(_Object$assign(_Object$assign(_Object$assign({
|
|
4983
4998
|
client_id: clientId,
|
|
4984
4999
|
scope: scopes.join(' '),
|
|
4985
5000
|
redirect_uri: redirectUri,
|
|
4986
5001
|
code_challenge: codeChallenge,
|
|
4987
5002
|
code_challenge_method: codeChallengeMethod,
|
|
4988
5003
|
state: state
|
|
4989
|
-
}
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
}
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
}
|
|
5004
|
+
}, activationToken && {
|
|
5005
|
+
activation_token: activationToken
|
|
5006
|
+
}), recoveryToken && {
|
|
5007
|
+
recovery_token: recoveryToken
|
|
5008
|
+
}), clientSecret && {
|
|
5009
|
+
client_secret: clientSecret
|
|
5010
|
+
}), maxAge && {
|
|
5011
|
+
max_age: maxAge
|
|
5012
|
+
});
|
|
4999
5013
|
headers = {
|
|
5000
5014
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
5001
5015
|
};
|
|
5002
|
-
_context.next =
|
|
5016
|
+
_context.next = 17;
|
|
5003
5017
|
return httpRequest(authClient, {
|
|
5004
5018
|
method: 'POST',
|
|
5005
5019
|
url: url,
|
|
@@ -5007,7 +5021,7 @@ function _interact() {
|
|
|
5007
5021
|
withCredentials: withCredentials,
|
|
5008
5022
|
args: params
|
|
5009
5023
|
});
|
|
5010
|
-
case
|
|
5024
|
+
case 17:
|
|
5011
5025
|
resp = _context.sent;
|
|
5012
5026
|
interactionHandle = resp.interaction_handle;
|
|
5013
5027
|
newMeta = _Object$assign(_Object$assign({}, meta), {
|
|
@@ -5020,7 +5034,7 @@ function _interact() {
|
|
|
5020
5034
|
});
|
|
5021
5035
|
saveTransactionMeta(authClient, newMeta);
|
|
5022
5036
|
return _context.abrupt("return", getResponse(newMeta));
|
|
5023
|
-
case
|
|
5037
|
+
case 22:
|
|
5024
5038
|
case "end":
|
|
5025
5039
|
return _context.stop();
|
|
5026
5040
|
}
|
|
@@ -5268,11 +5282,14 @@ var expandRelatesTo = function expandRelatesTo(idxResponse, value) {
|
|
|
5268
5282
|
});
|
|
5269
5283
|
};
|
|
5270
5284
|
var convertRemediationAction = function convertRemediationAction(authClient, remediation, toPersist) {
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5285
|
+
if (remediation.rel) {
|
|
5286
|
+
var remediationActions = generateRemediationFunctions(authClient, [remediation], toPersist);
|
|
5287
|
+
var actionFn = remediationActions[remediation.name];
|
|
5288
|
+
return _Object$assign(_Object$assign({}, remediation), {
|
|
5289
|
+
action: actionFn
|
|
5290
|
+
});
|
|
5291
|
+
}
|
|
5292
|
+
return remediation;
|
|
5276
5293
|
};
|
|
5277
5294
|
var parseIdxResponse = function parseIdxResponse(authClient, idxResponse) {
|
|
5278
5295
|
var toPersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -5306,6 +5323,7 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5306
5323
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(remediationChoice) {
|
|
5307
5324
|
var paramsFromUser,
|
|
5308
5325
|
remediationChoiceObject,
|
|
5326
|
+
actionFn,
|
|
5309
5327
|
_args = arguments;
|
|
5310
5328
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
5311
5329
|
while (1) {
|
|
@@ -5321,8 +5339,15 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5321
5339
|
}
|
|
5322
5340
|
return _context.abrupt("return", _Promise.reject("Unknown remediation choice: [".concat(remediationChoice, "]")));
|
|
5323
5341
|
case 4:
|
|
5342
|
+
actionFn = remediationChoiceObject.action;
|
|
5343
|
+
if (!(typeof actionFn !== 'function')) {
|
|
5344
|
+
_context.next = 7;
|
|
5345
|
+
break;
|
|
5346
|
+
}
|
|
5347
|
+
return _context.abrupt("return", _Promise.reject("Current remediation cannot make form submit action: [".concat(remediationChoice, "]")));
|
|
5348
|
+
case 7:
|
|
5324
5349
|
return _context.abrupt("return", remediationChoiceObject.action(paramsFromUser));
|
|
5325
|
-
case
|
|
5350
|
+
case 8:
|
|
5326
5351
|
case "end":
|
|
5327
5352
|
return _context.stop();
|
|
5328
5353
|
}
|
|
@@ -5410,7 +5435,7 @@ function _introspect() {
|
|
|
5410
5435
|
switch (_context.prev = _context.next) {
|
|
5411
5436
|
case 0:
|
|
5412
5437
|
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
5413
|
-
savedIdxResponse = authClient.transactionManager.loadIdxResponse();
|
|
5438
|
+
savedIdxResponse = authClient.transactionManager.loadIdxResponse(options);
|
|
5414
5439
|
if (savedIdxResponse) {
|
|
5415
5440
|
rawIdxResponse = savedIdxResponse.rawIdxResponse;
|
|
5416
5441
|
requestDidSucceed = savedIdxResponse.requestDidSucceed;
|
|
@@ -5653,7 +5678,7 @@ var Remediator = function () {
|
|
|
5653
5678
|
}
|
|
5654
5679
|
}, {
|
|
5655
5680
|
key: "getNextStep",
|
|
5656
|
-
value: function getNextStep(_context) {
|
|
5681
|
+
value: function getNextStep(_authClient, _context) {
|
|
5657
5682
|
var name = this.getName();
|
|
5658
5683
|
var inputs = this.getInputs();
|
|
5659
5684
|
var authenticator = this.getAuthenticator();
|
|
@@ -5790,11 +5815,11 @@ var Authenticator = function Authenticator(authenticator) {
|
|
|
5790
5815
|
this.meta = authenticator;
|
|
5791
5816
|
};
|
|
5792
5817
|
|
|
5793
|
-
function _createSuper$
|
|
5794
|
-
function _isNativeReflectConstruct$
|
|
5818
|
+
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); }; }
|
|
5819
|
+
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; } }
|
|
5795
5820
|
var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
5796
5821
|
_inherits(VerificationCodeAuthenticator, _Authenticator);
|
|
5797
|
-
var _super = _createSuper$
|
|
5822
|
+
var _super = _createSuper$t(VerificationCodeAuthenticator);
|
|
5798
5823
|
function VerificationCodeAuthenticator() {
|
|
5799
5824
|
_classCallCheck(this, VerificationCodeAuthenticator);
|
|
5800
5825
|
return _super.apply(this, arguments);
|
|
@@ -5831,11 +5856,11 @@ var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
|
5831
5856
|
return VerificationCodeAuthenticator;
|
|
5832
5857
|
}(Authenticator);
|
|
5833
5858
|
|
|
5834
|
-
function _createSuper$
|
|
5835
|
-
function _isNativeReflectConstruct$
|
|
5859
|
+
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); }; }
|
|
5860
|
+
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; } }
|
|
5836
5861
|
var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
5837
5862
|
_inherits(OktaVerifyTotp, _VerificationCodeAuth);
|
|
5838
|
-
var _super = _createSuper$
|
|
5863
|
+
var _super = _createSuper$s(OktaVerifyTotp);
|
|
5839
5864
|
function OktaVerifyTotp() {
|
|
5840
5865
|
_classCallCheck(this, OktaVerifyTotp);
|
|
5841
5866
|
return _super.apply(this, arguments);
|
|
@@ -5855,11 +5880,11 @@ var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
|
5855
5880
|
return OktaVerifyTotp;
|
|
5856
5881
|
}(VerificationCodeAuthenticator);
|
|
5857
5882
|
|
|
5858
|
-
function _createSuper$
|
|
5859
|
-
function _isNativeReflectConstruct$
|
|
5883
|
+
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); }; }
|
|
5884
|
+
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; } }
|
|
5860
5885
|
var OktaPassword = function (_Authenticator) {
|
|
5861
5886
|
_inherits(OktaPassword, _Authenticator);
|
|
5862
|
-
var _super = _createSuper$
|
|
5887
|
+
var _super = _createSuper$r(OktaPassword);
|
|
5863
5888
|
function OktaPassword() {
|
|
5864
5889
|
_classCallCheck(this, OktaPassword);
|
|
5865
5890
|
return _super.apply(this, arguments);
|
|
@@ -5895,11 +5920,11 @@ var OktaPassword = function (_Authenticator) {
|
|
|
5895
5920
|
return OktaPassword;
|
|
5896
5921
|
}(Authenticator);
|
|
5897
5922
|
|
|
5898
|
-
function _createSuper$
|
|
5899
|
-
function _isNativeReflectConstruct$
|
|
5923
|
+
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); }; }
|
|
5924
|
+
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; } }
|
|
5900
5925
|
var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
5901
5926
|
_inherits(SecurityQuestionEnrollment, _Authenticator);
|
|
5902
|
-
var _super = _createSuper$
|
|
5927
|
+
var _super = _createSuper$q(SecurityQuestionEnrollment);
|
|
5903
5928
|
function SecurityQuestionEnrollment() {
|
|
5904
5929
|
_classCallCheck(this, SecurityQuestionEnrollment);
|
|
5905
5930
|
return _super.apply(this, arguments);
|
|
@@ -5922,7 +5947,7 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
|
5922
5947
|
var questionKey = values.questionKey,
|
|
5923
5948
|
question = values.question,
|
|
5924
5949
|
answer = values.answer;
|
|
5925
|
-
if (!
|
|
5950
|
+
if (!answer || !questionKey && !question) {
|
|
5926
5951
|
return;
|
|
5927
5952
|
}
|
|
5928
5953
|
return {
|
|
@@ -5953,11 +5978,11 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
|
5953
5978
|
return SecurityQuestionEnrollment;
|
|
5954
5979
|
}(Authenticator);
|
|
5955
5980
|
|
|
5956
|
-
function _createSuper$
|
|
5957
|
-
function _isNativeReflectConstruct$
|
|
5981
|
+
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); }; }
|
|
5982
|
+
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; } }
|
|
5958
5983
|
var SecurityQuestionVerification = function (_Authenticator) {
|
|
5959
5984
|
_inherits(SecurityQuestionVerification, _Authenticator);
|
|
5960
|
-
var _super = _createSuper$
|
|
5985
|
+
var _super = _createSuper$p(SecurityQuestionVerification);
|
|
5961
5986
|
function SecurityQuestionVerification() {
|
|
5962
5987
|
_classCallCheck(this, SecurityQuestionVerification);
|
|
5963
5988
|
return _super.apply(this, arguments);
|
|
@@ -5965,7 +5990,12 @@ var SecurityQuestionVerification = function (_Authenticator) {
|
|
|
5965
5990
|
_createClass(SecurityQuestionVerification, [{
|
|
5966
5991
|
key: "canVerify",
|
|
5967
5992
|
value: function canVerify(values) {
|
|
5968
|
-
|
|
5993
|
+
var credentials = values.credentials;
|
|
5994
|
+
if (credentials && credentials.answer) {
|
|
5995
|
+
return true;
|
|
5996
|
+
}
|
|
5997
|
+
var answer = values.answer;
|
|
5998
|
+
return !!answer;
|
|
5969
5999
|
}
|
|
5970
6000
|
}, {
|
|
5971
6001
|
key: "mapCredentials",
|
|
@@ -5993,11 +6023,11 @@ var SecurityQuestionVerification = function (_Authenticator) {
|
|
|
5993
6023
|
return SecurityQuestionVerification;
|
|
5994
6024
|
}(Authenticator);
|
|
5995
6025
|
|
|
5996
|
-
function _createSuper$
|
|
5997
|
-
function _isNativeReflectConstruct$
|
|
6026
|
+
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); }; }
|
|
6027
|
+
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; } }
|
|
5998
6028
|
var WebauthnEnrollment = function (_Authenticator) {
|
|
5999
6029
|
_inherits(WebauthnEnrollment, _Authenticator);
|
|
6000
|
-
var _super = _createSuper$
|
|
6030
|
+
var _super = _createSuper$o(WebauthnEnrollment);
|
|
6001
6031
|
function WebauthnEnrollment() {
|
|
6002
6032
|
_classCallCheck(this, WebauthnEnrollment);
|
|
6003
6033
|
return _super.apply(this, arguments);
|
|
@@ -6043,11 +6073,11 @@ var WebauthnEnrollment = function (_Authenticator) {
|
|
|
6043
6073
|
return WebauthnEnrollment;
|
|
6044
6074
|
}(Authenticator);
|
|
6045
6075
|
|
|
6046
|
-
function _createSuper$
|
|
6047
|
-
function _isNativeReflectConstruct$
|
|
6076
|
+
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); }; }
|
|
6077
|
+
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; } }
|
|
6048
6078
|
var WebauthnVerification = function (_Authenticator) {
|
|
6049
6079
|
_inherits(WebauthnVerification, _Authenticator);
|
|
6050
|
-
var _super = _createSuper$
|
|
6080
|
+
var _super = _createSuper$n(WebauthnVerification);
|
|
6051
6081
|
function WebauthnVerification() {
|
|
6052
6082
|
_classCallCheck(this, WebauthnVerification);
|
|
6053
6083
|
return _super.apply(this, arguments);
|
|
@@ -6128,11 +6158,11 @@ function getAuthenticator(remediation) {
|
|
|
6128
6158
|
}
|
|
6129
6159
|
}
|
|
6130
6160
|
|
|
6131
|
-
function _createSuper$
|
|
6132
|
-
function _isNativeReflectConstruct$
|
|
6161
|
+
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); }; }
|
|
6162
|
+
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; } }
|
|
6133
6163
|
var VerifyAuthenticator = function (_Remediator) {
|
|
6134
6164
|
_inherits(VerifyAuthenticator, _Remediator);
|
|
6135
|
-
var _super = _createSuper$
|
|
6165
|
+
var _super = _createSuper$m(VerifyAuthenticator);
|
|
6136
6166
|
function VerifyAuthenticator(remediation) {
|
|
6137
6167
|
var _this;
|
|
6138
6168
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6143,9 +6173,9 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6143
6173
|
}
|
|
6144
6174
|
_createClass(VerifyAuthenticator, [{
|
|
6145
6175
|
key: "getNextStep",
|
|
6146
|
-
value: function getNextStep(context) {
|
|
6176
|
+
value: function getNextStep(authClient, context) {
|
|
6147
6177
|
var _a;
|
|
6148
|
-
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, context);
|
|
6178
|
+
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6149
6179
|
var authenticatorEnrollments = (_a = context === null || context === void 0 ? void 0 : context.authenticatorEnrollments) === null || _a === void 0 ? void 0 : _a.value;
|
|
6150
6180
|
return _Object$assign(_Object$assign({}, nextStep), {
|
|
6151
6181
|
authenticatorEnrollments: authenticatorEnrollments
|
|
@@ -6183,11 +6213,11 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6183
6213
|
return VerifyAuthenticator;
|
|
6184
6214
|
}(Remediator);
|
|
6185
6215
|
|
|
6186
|
-
function _createSuper$
|
|
6187
|
-
function _isNativeReflectConstruct$
|
|
6216
|
+
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); }; }
|
|
6217
|
+
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; } }
|
|
6188
6218
|
var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
6189
6219
|
_inherits(EnrollAuthenticator, _VerifyAuthenticator);
|
|
6190
|
-
var _super = _createSuper$
|
|
6220
|
+
var _super = _createSuper$l(EnrollAuthenticator);
|
|
6191
6221
|
function EnrollAuthenticator() {
|
|
6192
6222
|
_classCallCheck(this, EnrollAuthenticator);
|
|
6193
6223
|
return _super.apply(this, arguments);
|
|
@@ -6196,11 +6226,11 @@ var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6196
6226
|
}(VerifyAuthenticator);
|
|
6197
6227
|
EnrollAuthenticator.remediationName = 'enroll-authenticator';
|
|
6198
6228
|
|
|
6199
|
-
function _createSuper$
|
|
6200
|
-
function _isNativeReflectConstruct$
|
|
6229
|
+
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); }; }
|
|
6230
|
+
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; } }
|
|
6201
6231
|
var EnrollPoll = function (_Remediator) {
|
|
6202
6232
|
_inherits(EnrollPoll, _Remediator);
|
|
6203
|
-
var _super = _createSuper$
|
|
6233
|
+
var _super = _createSuper$k(EnrollPoll);
|
|
6204
6234
|
function EnrollPoll() {
|
|
6205
6235
|
_classCallCheck(this, EnrollPoll);
|
|
6206
6236
|
return _super.apply(this, arguments);
|
|
@@ -6212,8 +6242,8 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6212
6242
|
}
|
|
6213
6243
|
}, {
|
|
6214
6244
|
key: "getNextStep",
|
|
6215
|
-
value: function getNextStep(context) {
|
|
6216
|
-
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, context);
|
|
6245
|
+
value: function getNextStep(authClient, context) {
|
|
6246
|
+
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6217
6247
|
var authenticator = this.getAuthenticator();
|
|
6218
6248
|
if (!authenticator && (context === null || context === void 0 ? void 0 : context.currentAuthenticator)) {
|
|
6219
6249
|
authenticator = context.currentAuthenticator.value;
|
|
@@ -6243,11 +6273,11 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6243
6273
|
}(Remediator);
|
|
6244
6274
|
EnrollPoll.remediationName = 'enroll-poll';
|
|
6245
6275
|
|
|
6246
|
-
function _createSuper$
|
|
6247
|
-
function _isNativeReflectConstruct$
|
|
6276
|
+
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); }; }
|
|
6277
|
+
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; } }
|
|
6248
6278
|
var SelectEnrollmentChannel = function (_Remediator) {
|
|
6249
6279
|
_inherits(SelectEnrollmentChannel, _Remediator);
|
|
6250
|
-
var _super = _createSuper$
|
|
6280
|
+
var _super = _createSuper$j(SelectEnrollmentChannel);
|
|
6251
6281
|
function SelectEnrollmentChannel() {
|
|
6252
6282
|
_classCallCheck(this, SelectEnrollmentChannel);
|
|
6253
6283
|
return _super.apply(this, arguments);
|
|
@@ -6259,8 +6289,8 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6259
6289
|
}
|
|
6260
6290
|
}, {
|
|
6261
6291
|
key: "getNextStep",
|
|
6262
|
-
value: function getNextStep(context) {
|
|
6263
|
-
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this);
|
|
6292
|
+
value: function getNextStep(authClient, context) {
|
|
6293
|
+
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6264
6294
|
var options = this.getChannels();
|
|
6265
6295
|
var authenticator = context.currentAuthenticator.value;
|
|
6266
6296
|
return _Object$assign(_Object$assign(_Object$assign({}, common), options && {
|
|
@@ -6310,11 +6340,11 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6310
6340
|
}(Remediator);
|
|
6311
6341
|
SelectEnrollmentChannel.remediationName = 'select-enrollment-channel';
|
|
6312
6342
|
|
|
6313
|
-
function _createSuper$
|
|
6314
|
-
function _isNativeReflectConstruct$
|
|
6343
|
+
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); }; }
|
|
6344
|
+
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; } }
|
|
6315
6345
|
var EnrollmentChannelData = function (_Remediator) {
|
|
6316
6346
|
_inherits(EnrollmentChannelData, _Remediator);
|
|
6317
|
-
var _super = _createSuper$
|
|
6347
|
+
var _super = _createSuper$i(EnrollmentChannelData);
|
|
6318
6348
|
function EnrollmentChannelData() {
|
|
6319
6349
|
_classCallCheck(this, EnrollmentChannelData);
|
|
6320
6350
|
return _super.apply(this, arguments);
|
|
@@ -6346,8 +6376,8 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6346
6376
|
}
|
|
6347
6377
|
}, {
|
|
6348
6378
|
key: "getNextStep",
|
|
6349
|
-
value: function getNextStep(context) {
|
|
6350
|
-
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this);
|
|
6379
|
+
value: function getNextStep(authClient, context) {
|
|
6380
|
+
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6351
6381
|
var authenticator = context.currentAuthenticator.value;
|
|
6352
6382
|
return _Object$assign(_Object$assign({}, common), {
|
|
6353
6383
|
authenticator: authenticator
|
|
@@ -6380,11 +6410,11 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6380
6410
|
}(Remediator);
|
|
6381
6411
|
EnrollmentChannelData.remediationName = 'enrollment-channel-data';
|
|
6382
6412
|
|
|
6383
|
-
function _createSuper$
|
|
6384
|
-
function _isNativeReflectConstruct$
|
|
6413
|
+
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); }; }
|
|
6414
|
+
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; } }
|
|
6385
6415
|
var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
6386
6416
|
_inherits(ChallengeAuthenticator, _VerifyAuthenticator);
|
|
6387
|
-
var _super = _createSuper$
|
|
6417
|
+
var _super = _createSuper$h(ChallengeAuthenticator);
|
|
6388
6418
|
function ChallengeAuthenticator() {
|
|
6389
6419
|
_classCallCheck(this, ChallengeAuthenticator);
|
|
6390
6420
|
return _super.apply(this, arguments);
|
|
@@ -6393,11 +6423,11 @@ var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6393
6423
|
}(VerifyAuthenticator);
|
|
6394
6424
|
ChallengeAuthenticator.remediationName = 'challenge-authenticator';
|
|
6395
6425
|
|
|
6396
|
-
function _createSuper$
|
|
6397
|
-
function _isNativeReflectConstruct$
|
|
6426
|
+
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); }; }
|
|
6427
|
+
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; } }
|
|
6398
6428
|
var ChallengePoll = function (_EnrollPoll) {
|
|
6399
6429
|
_inherits(ChallengePoll, _EnrollPoll);
|
|
6400
|
-
var _super = _createSuper$
|
|
6430
|
+
var _super = _createSuper$g(ChallengePoll);
|
|
6401
6431
|
function ChallengePoll() {
|
|
6402
6432
|
_classCallCheck(this, ChallengePoll);
|
|
6403
6433
|
return _super.apply(this, arguments);
|
|
@@ -6412,11 +6442,11 @@ var ChallengePoll = function (_EnrollPoll) {
|
|
|
6412
6442
|
}(EnrollPoll);
|
|
6413
6443
|
ChallengePoll.remediationName = 'challenge-poll';
|
|
6414
6444
|
|
|
6415
|
-
function _createSuper$
|
|
6416
|
-
function _isNativeReflectConstruct$
|
|
6445
|
+
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); }; }
|
|
6446
|
+
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; } }
|
|
6417
6447
|
var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
6418
6448
|
_inherits(ResetAuthenticator, _VerifyAuthenticator);
|
|
6419
|
-
var _super = _createSuper$
|
|
6449
|
+
var _super = _createSuper$f(ResetAuthenticator);
|
|
6420
6450
|
function ResetAuthenticator() {
|
|
6421
6451
|
_classCallCheck(this, ResetAuthenticator);
|
|
6422
6452
|
return _super.apply(this, arguments);
|
|
@@ -6425,11 +6455,11 @@ var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6425
6455
|
}(VerifyAuthenticator);
|
|
6426
6456
|
ResetAuthenticator.remediationName = 'reset-authenticator';
|
|
6427
6457
|
|
|
6428
|
-
function _createSuper$
|
|
6429
|
-
function _isNativeReflectConstruct$
|
|
6458
|
+
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); }; }
|
|
6459
|
+
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; } }
|
|
6430
6460
|
var EnrollProfile = function (_Remediator) {
|
|
6431
6461
|
_inherits(EnrollProfile, _Remediator);
|
|
6432
|
-
var _super = _createSuper$
|
|
6462
|
+
var _super = _createSuper$e(EnrollProfile);
|
|
6433
6463
|
function EnrollProfile() {
|
|
6434
6464
|
_classCallCheck(this, EnrollProfile);
|
|
6435
6465
|
return _super.apply(this, arguments);
|
|
@@ -6491,11 +6521,11 @@ var EnrollProfile = function (_Remediator) {
|
|
|
6491
6521
|
}(Remediator);
|
|
6492
6522
|
EnrollProfile.remediationName = 'enroll-profile';
|
|
6493
6523
|
|
|
6494
|
-
function _createSuper$
|
|
6495
|
-
function _isNativeReflectConstruct$
|
|
6524
|
+
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); }; }
|
|
6525
|
+
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; } }
|
|
6496
6526
|
var Identify = function (_Remediator) {
|
|
6497
6527
|
_inherits(Identify, _Remediator);
|
|
6498
|
-
var _super = _createSuper$
|
|
6528
|
+
var _super = _createSuper$d(Identify);
|
|
6499
6529
|
function Identify() {
|
|
6500
6530
|
var _this;
|
|
6501
6531
|
_classCallCheck(this, Identify);
|
|
@@ -6538,11 +6568,11 @@ var Identify = function (_Remediator) {
|
|
|
6538
6568
|
}(Remediator);
|
|
6539
6569
|
Identify.remediationName = 'identify';
|
|
6540
6570
|
|
|
6541
|
-
function _createSuper$
|
|
6542
|
-
function _isNativeReflectConstruct$
|
|
6571
|
+
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); }; }
|
|
6572
|
+
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; } }
|
|
6543
6573
|
var ReEnrollAuthenticator = function (_Remediator) {
|
|
6544
6574
|
_inherits(ReEnrollAuthenticator, _Remediator);
|
|
6545
|
-
var _super = _createSuper$
|
|
6575
|
+
var _super = _createSuper$c(ReEnrollAuthenticator);
|
|
6546
6576
|
function ReEnrollAuthenticator() {
|
|
6547
6577
|
_classCallCheck(this, ReEnrollAuthenticator);
|
|
6548
6578
|
return _super.apply(this, arguments);
|
|
@@ -6572,11 +6602,11 @@ var ReEnrollAuthenticator = function (_Remediator) {
|
|
|
6572
6602
|
}(Remediator);
|
|
6573
6603
|
ReEnrollAuthenticator.remediationName = 'reenroll-authenticator';
|
|
6574
6604
|
|
|
6575
|
-
function _createSuper$
|
|
6576
|
-
function _isNativeReflectConstruct$
|
|
6605
|
+
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); }; }
|
|
6606
|
+
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; } }
|
|
6577
6607
|
var RedirectIdp = function (_Remediator) {
|
|
6578
6608
|
_inherits(RedirectIdp, _Remediator);
|
|
6579
|
-
var _super = _createSuper$
|
|
6609
|
+
var _super = _createSuper$b(RedirectIdp);
|
|
6580
6610
|
function RedirectIdp() {
|
|
6581
6611
|
_classCallCheck(this, RedirectIdp);
|
|
6582
6612
|
return _super.apply(this, arguments);
|
|
@@ -6607,13 +6637,13 @@ var RedirectIdp = function (_Remediator) {
|
|
|
6607
6637
|
RedirectIdp.remediationName = 'redirect-idp';
|
|
6608
6638
|
|
|
6609
6639
|
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; } } }; }
|
|
6610
|
-
function _unsupportedIterableToArray$2(o, minLen) { var
|
|
6640
|
+
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); }
|
|
6611
6641
|
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; }
|
|
6612
|
-
function _createSuper$
|
|
6613
|
-
function _isNativeReflectConstruct$
|
|
6642
|
+
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); }; }
|
|
6643
|
+
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; } }
|
|
6614
6644
|
var SelectAuthenticator = function (_Remediator) {
|
|
6615
6645
|
_inherits(SelectAuthenticator, _Remediator);
|
|
6616
|
-
var _super = _createSuper$
|
|
6646
|
+
var _super = _createSuper$a(SelectAuthenticator);
|
|
6617
6647
|
function SelectAuthenticator() {
|
|
6618
6648
|
_classCallCheck(this, SelectAuthenticator);
|
|
6619
6649
|
return _super.apply(this, arguments);
|
|
@@ -6669,9 +6699,9 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6669
6699
|
}
|
|
6670
6700
|
}, {
|
|
6671
6701
|
key: "getNextStep",
|
|
6672
|
-
value: function getNextStep() {
|
|
6702
|
+
value: function getNextStep(authClient) {
|
|
6673
6703
|
var _context;
|
|
6674
|
-
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this);
|
|
6704
|
+
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this, authClient);
|
|
6675
6705
|
var authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation);
|
|
6676
6706
|
var options = _mapInstanceProperty(_context = authenticatorFromRemediation.options).call(_context, function (option) {
|
|
6677
6707
|
var label = option.label,
|
|
@@ -6710,19 +6740,29 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6710
6740
|
}
|
|
6711
6741
|
}, {
|
|
6712
6742
|
key: "getInputAuthenticator",
|
|
6713
|
-
value: function getInputAuthenticator() {
|
|
6743
|
+
value: function getInputAuthenticator(remediation) {
|
|
6744
|
+
var _context3;
|
|
6745
|
+
var options = _mapInstanceProperty(_context3 = remediation.options).call(_context3, function (_ref3) {
|
|
6746
|
+
var label = _ref3.label,
|
|
6747
|
+
relatesTo = _ref3.relatesTo;
|
|
6748
|
+
return {
|
|
6749
|
+
label: label,
|
|
6750
|
+
value: relatesTo.key
|
|
6751
|
+
};
|
|
6752
|
+
});
|
|
6714
6753
|
return {
|
|
6715
6754
|
name: 'authenticator',
|
|
6716
|
-
|
|
6755
|
+
type: 'string',
|
|
6756
|
+
options: options
|
|
6717
6757
|
};
|
|
6718
6758
|
}
|
|
6719
6759
|
}, {
|
|
6720
6760
|
key: "getValuesAfterProceed",
|
|
6721
6761
|
value: function getValuesAfterProceed() {
|
|
6722
|
-
var
|
|
6762
|
+
var _context4,
|
|
6723
6763
|
_this = this;
|
|
6724
6764
|
this.values = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getValuesAfterProceed", this).call(this);
|
|
6725
|
-
var authenticators = _filterInstanceProperty(
|
|
6765
|
+
var authenticators = _filterInstanceProperty(_context4 = _valuesInstanceProperty(this).authenticators).call(_context4, function (authenticator) {
|
|
6726
6766
|
return compareAuthenticators(authenticator, _this.selectedAuthenticator) !== true;
|
|
6727
6767
|
});
|
|
6728
6768
|
return _Object$assign(_Object$assign({}, _valuesInstanceProperty(this)), {
|
|
@@ -6733,11 +6773,11 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6733
6773
|
return SelectAuthenticator;
|
|
6734
6774
|
}(Remediator);
|
|
6735
6775
|
|
|
6736
|
-
function _createSuper$
|
|
6737
|
-
function _isNativeReflectConstruct$
|
|
6776
|
+
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); }; }
|
|
6777
|
+
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; } }
|
|
6738
6778
|
var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
6739
6779
|
_inherits(SelectAuthenticatorAuthenticate, _SelectAuthenticator);
|
|
6740
|
-
var _super = _createSuper$
|
|
6780
|
+
var _super = _createSuper$9(SelectAuthenticatorAuthenticate);
|
|
6741
6781
|
function SelectAuthenticatorAuthenticate(remediation) {
|
|
6742
6782
|
var _this;
|
|
6743
6783
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6762,11 +6802,11 @@ var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
|
6762
6802
|
}(SelectAuthenticator);
|
|
6763
6803
|
SelectAuthenticatorAuthenticate.remediationName = 'select-authenticator-authenticate';
|
|
6764
6804
|
|
|
6765
|
-
function _createSuper$
|
|
6766
|
-
function _isNativeReflectConstruct$
|
|
6805
|
+
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); }; }
|
|
6806
|
+
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; } }
|
|
6767
6807
|
var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
6768
6808
|
_inherits(SelectAuthenticatorEnroll, _SelectAuthenticator);
|
|
6769
|
-
var _super = _createSuper$
|
|
6809
|
+
var _super = _createSuper$8(SelectAuthenticatorEnroll);
|
|
6770
6810
|
function SelectAuthenticatorEnroll() {
|
|
6771
6811
|
_classCallCheck(this, SelectAuthenticatorEnroll);
|
|
6772
6812
|
return _super.apply(this, arguments);
|
|
@@ -6775,11 +6815,11 @@ var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
|
6775
6815
|
}(SelectAuthenticator);
|
|
6776
6816
|
SelectAuthenticatorEnroll.remediationName = 'select-authenticator-enroll';
|
|
6777
6817
|
|
|
6778
|
-
function _createSuper$
|
|
6779
|
-
function _isNativeReflectConstruct$
|
|
6818
|
+
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); }; }
|
|
6819
|
+
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; } }
|
|
6780
6820
|
var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
6781
6821
|
_inherits(SelectAuthenticatorUnlockAccount, _SelectAuthenticator);
|
|
6782
|
-
var _super = _createSuper$
|
|
6822
|
+
var _super = _createSuper$7(SelectAuthenticatorUnlockAccount);
|
|
6783
6823
|
function SelectAuthenticatorUnlockAccount() {
|
|
6784
6824
|
var _this;
|
|
6785
6825
|
_classCallCheck(this, SelectAuthenticatorUnlockAccount);
|
|
@@ -6818,7 +6858,7 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6818
6858
|
value: function getInputUsername() {
|
|
6819
6859
|
return {
|
|
6820
6860
|
name: 'username',
|
|
6821
|
-
|
|
6861
|
+
type: 'string'
|
|
6822
6862
|
};
|
|
6823
6863
|
}
|
|
6824
6864
|
}]);
|
|
@@ -6826,11 +6866,11 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6826
6866
|
}(SelectAuthenticator);
|
|
6827
6867
|
SelectAuthenticatorUnlockAccount.remediationName = 'select-authenticator-unlock-account';
|
|
6828
6868
|
|
|
6829
|
-
function _createSuper$
|
|
6830
|
-
function _isNativeReflectConstruct$
|
|
6869
|
+
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); }; }
|
|
6870
|
+
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; } }
|
|
6831
6871
|
var SelectEnrollProfile = function (_Remediator) {
|
|
6832
6872
|
_inherits(SelectEnrollProfile, _Remediator);
|
|
6833
|
-
var _super = _createSuper$
|
|
6873
|
+
var _super = _createSuper$6(SelectEnrollProfile);
|
|
6834
6874
|
function SelectEnrollProfile() {
|
|
6835
6875
|
_classCallCheck(this, SelectEnrollProfile);
|
|
6836
6876
|
return _super.apply(this, arguments);
|
|
@@ -6845,11 +6885,11 @@ var SelectEnrollProfile = function (_Remediator) {
|
|
|
6845
6885
|
}(Remediator);
|
|
6846
6886
|
SelectEnrollProfile.remediationName = 'select-enroll-profile';
|
|
6847
6887
|
|
|
6848
|
-
function _createSuper$
|
|
6849
|
-
function _isNativeReflectConstruct$
|
|
6888
|
+
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); }; }
|
|
6889
|
+
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; } }
|
|
6850
6890
|
var AuthenticatorData = function (_Remediator) {
|
|
6851
6891
|
_inherits(AuthenticatorData, _Remediator);
|
|
6852
|
-
var _super = _createSuper$
|
|
6892
|
+
var _super = _createSuper$5(AuthenticatorData);
|
|
6853
6893
|
function AuthenticatorData(remediation) {
|
|
6854
6894
|
var _this;
|
|
6855
6895
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6898,8 +6938,8 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6898
6938
|
}
|
|
6899
6939
|
}, {
|
|
6900
6940
|
key: "getNextStep",
|
|
6901
|
-
value: function getNextStep() {
|
|
6902
|
-
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this);
|
|
6941
|
+
value: function getNextStep(authClient) {
|
|
6942
|
+
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this, authClient);
|
|
6903
6943
|
var options = this.getMethodTypes();
|
|
6904
6944
|
return _Object$assign(_Object$assign({}, common), options && {
|
|
6905
6945
|
options: options
|
|
@@ -6963,11 +7003,11 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6963
7003
|
return AuthenticatorData;
|
|
6964
7004
|
}(Remediator);
|
|
6965
7005
|
|
|
6966
|
-
function _createSuper$
|
|
6967
|
-
function _isNativeReflectConstruct$
|
|
7006
|
+
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); }; }
|
|
7007
|
+
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; } }
|
|
6968
7008
|
var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
6969
7009
|
_inherits(AuthenticatorVerificationData, _AuthenticatorData);
|
|
6970
|
-
var _super = _createSuper$
|
|
7010
|
+
var _super = _createSuper$4(AuthenticatorVerificationData);
|
|
6971
7011
|
function AuthenticatorVerificationData(remediation) {
|
|
6972
7012
|
var _this;
|
|
6973
7013
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -7018,7 +7058,8 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
7018
7058
|
return {
|
|
7019
7059
|
name: 'methodType',
|
|
7020
7060
|
type: 'string',
|
|
7021
|
-
required: true
|
|
7061
|
+
required: true,
|
|
7062
|
+
options: methodType.options
|
|
7022
7063
|
};
|
|
7023
7064
|
}
|
|
7024
7065
|
var inputs = _toConsumableArray(authenticator.form.value);
|
|
@@ -7042,11 +7083,11 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
7042
7083
|
}(AuthenticatorData);
|
|
7043
7084
|
AuthenticatorVerificationData.remediationName = 'authenticator-verification-data';
|
|
7044
7085
|
|
|
7045
|
-
function _createSuper$
|
|
7046
|
-
function _isNativeReflectConstruct$
|
|
7086
|
+
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); }; }
|
|
7087
|
+
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; } }
|
|
7047
7088
|
var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
7048
7089
|
_inherits(AuthenticatorEnrollmentData, _AuthenticatorData);
|
|
7049
|
-
var _super = _createSuper$
|
|
7090
|
+
var _super = _createSuper$3(AuthenticatorEnrollmentData);
|
|
7050
7091
|
function AuthenticatorEnrollmentData() {
|
|
7051
7092
|
_classCallCheck(this, AuthenticatorEnrollmentData);
|
|
7052
7093
|
return _super.apply(this, arguments);
|
|
@@ -7068,17 +7109,22 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
7068
7109
|
}
|
|
7069
7110
|
}, {
|
|
7070
7111
|
key: "getInputAuthenticator",
|
|
7071
|
-
value: function getInputAuthenticator() {
|
|
7072
|
-
|
|
7112
|
+
value: function getInputAuthenticator(remediation) {
|
|
7113
|
+
var _context2;
|
|
7114
|
+
return _mapInstanceProperty(_context2 = [{
|
|
7073
7115
|
name: 'methodType',
|
|
7074
|
-
type: 'string'
|
|
7075
|
-
required: true
|
|
7116
|
+
type: 'string'
|
|
7076
7117
|
}, {
|
|
7077
7118
|
name: 'phoneNumber',
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7119
|
+
label: 'Phone Number',
|
|
7120
|
+
type: 'string'
|
|
7121
|
+
}]).call(_context2, function (item) {
|
|
7122
|
+
var _context3;
|
|
7123
|
+
var value = _findInstanceProperty(_context3 = remediation.form.value).call(_context3, function (val) {
|
|
7124
|
+
return val.name === item.name;
|
|
7125
|
+
});
|
|
7126
|
+
return _Object$assign(_Object$assign({}, value), item);
|
|
7127
|
+
});
|
|
7082
7128
|
}
|
|
7083
7129
|
}, {
|
|
7084
7130
|
key: "mapAuthenticatorDataFromValues",
|
|
@@ -7097,11 +7143,11 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
7097
7143
|
}(AuthenticatorData);
|
|
7098
7144
|
AuthenticatorEnrollmentData.remediationName = 'authenticator-enrollment-data';
|
|
7099
7145
|
|
|
7100
|
-
function _createSuper$
|
|
7101
|
-
function _isNativeReflectConstruct$
|
|
7146
|
+
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); }; }
|
|
7147
|
+
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; } }
|
|
7102
7148
|
var Skip = function (_Remediator) {
|
|
7103
7149
|
_inherits(Skip, _Remediator);
|
|
7104
|
-
var _super = _createSuper$
|
|
7150
|
+
var _super = _createSuper$2(Skip);
|
|
7105
7151
|
function Skip() {
|
|
7106
7152
|
_classCallCheck(this, Skip);
|
|
7107
7153
|
return _super.apply(this, arguments);
|
|
@@ -7116,6 +7162,197 @@ var Skip = function (_Remediator) {
|
|
|
7116
7162
|
}(Remediator);
|
|
7117
7163
|
Skip.remediationName = 'skip';
|
|
7118
7164
|
|
|
7165
|
+
function unwrapFormValue(remediation) {
|
|
7166
|
+
var res = {};
|
|
7167
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(remediation); _i < _Object$entries$1.length; _i++) {
|
|
7168
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 2),
|
|
7169
|
+
key = _Object$entries$_i[0],
|
|
7170
|
+
value = _Object$entries$_i[1];
|
|
7171
|
+
if (value === null || typeof value === 'undefined') {
|
|
7172
|
+
continue;
|
|
7173
|
+
}
|
|
7174
|
+
if (Array.isArray(value)) {
|
|
7175
|
+
res[key] = _mapInstanceProperty(value).call(value, unwrapFormValue);
|
|
7176
|
+
} else if (_typeof(value) === 'object') {
|
|
7177
|
+
var _context, _context2;
|
|
7178
|
+
var formKeys = _Object$keys(value);
|
|
7179
|
+
if (_includesInstanceProperty(_context = ['value', 'form']).call(_context, key) && formKeys.length === 1 && _includesInstanceProperty(_context2 = ['value', 'form']).call(_context2, formKeys[0])) {
|
|
7180
|
+
var unwrappedForm = unwrapFormValue(value);
|
|
7181
|
+
_Object$entries(unwrappedForm).forEach(function (_ref) {
|
|
7182
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
7183
|
+
key = _ref2[0],
|
|
7184
|
+
value = _ref2[1];
|
|
7185
|
+
res[key] = value;
|
|
7186
|
+
});
|
|
7187
|
+
} else {
|
|
7188
|
+
res[key] = unwrapFormValue(value);
|
|
7189
|
+
}
|
|
7190
|
+
} else {
|
|
7191
|
+
res[key] = value;
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
7194
|
+
return res;
|
|
7195
|
+
}
|
|
7196
|
+
function hasValidInputValue(input, values) {
|
|
7197
|
+
var fn = function fn(input, values, requiredTracker) {
|
|
7198
|
+
var name = input.name,
|
|
7199
|
+
value = input.value,
|
|
7200
|
+
required = input.required;
|
|
7201
|
+
var isRequired = required || requiredTracker
|
|
7202
|
+
|| name === 'authenticator';
|
|
7203
|
+
if (!isRequired) {
|
|
7204
|
+
return true;
|
|
7205
|
+
}
|
|
7206
|
+
if (Array.isArray(value)) {
|
|
7207
|
+
return _reduceInstanceProperty(value).call(value, function (acc, item) {
|
|
7208
|
+
return acc && fn(item, values[name], isRequired);
|
|
7209
|
+
}, true);
|
|
7210
|
+
} else {
|
|
7211
|
+
return !!(values && values[name]);
|
|
7212
|
+
}
|
|
7213
|
+
};
|
|
7214
|
+
return fn(input, values, false);
|
|
7215
|
+
}
|
|
7216
|
+
|
|
7217
|
+
function canProceed(authClient) {
|
|
7218
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7219
|
+
var meta = getSavedTransactionMeta(authClient, options);
|
|
7220
|
+
return !!(meta || options.stateHandle);
|
|
7221
|
+
}
|
|
7222
|
+
function proceed(_x) {
|
|
7223
|
+
return _proceed.apply(this, arguments);
|
|
7224
|
+
}
|
|
7225
|
+
function _proceed() {
|
|
7226
|
+
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
7227
|
+
var options,
|
|
7228
|
+
flow,
|
|
7229
|
+
state,
|
|
7230
|
+
meta,
|
|
7231
|
+
_args = arguments;
|
|
7232
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7233
|
+
while (1) {
|
|
7234
|
+
switch (_context.prev = _context.next) {
|
|
7235
|
+
case 0:
|
|
7236
|
+
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
7237
|
+
if (canProceed(authClient, options)) {
|
|
7238
|
+
_context.next = 3;
|
|
7239
|
+
break;
|
|
7240
|
+
}
|
|
7241
|
+
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
7242
|
+
case 3:
|
|
7243
|
+
flow = options.flow, state = options.state;
|
|
7244
|
+
if (!flow) {
|
|
7245
|
+
meta = getSavedTransactionMeta(authClient, {
|
|
7246
|
+
state: state
|
|
7247
|
+
});
|
|
7248
|
+
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
7249
|
+
}
|
|
7250
|
+
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
7251
|
+
flow: flow
|
|
7252
|
+
})));
|
|
7253
|
+
case 6:
|
|
7254
|
+
case "end":
|
|
7255
|
+
return _context.stop();
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
}, _callee);
|
|
7259
|
+
}));
|
|
7260
|
+
return _proceed.apply(this, arguments);
|
|
7261
|
+
}
|
|
7262
|
+
|
|
7263
|
+
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); }; }
|
|
7264
|
+
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; } }
|
|
7265
|
+
var GenericRemediator = function (_Remediator) {
|
|
7266
|
+
_inherits(GenericRemediator, _Remediator);
|
|
7267
|
+
var _super = _createSuper$1(GenericRemediator);
|
|
7268
|
+
function GenericRemediator() {
|
|
7269
|
+
_classCallCheck(this, GenericRemediator);
|
|
7270
|
+
return _super.apply(this, arguments);
|
|
7271
|
+
}
|
|
7272
|
+
_createClass(GenericRemediator, [{
|
|
7273
|
+
key: "canRemediate",
|
|
7274
|
+
value: function canRemediate() {
|
|
7275
|
+
var _this = this;
|
|
7276
|
+
if (typeof this.remediation.action !== 'function') {
|
|
7277
|
+
return false;
|
|
7278
|
+
}
|
|
7279
|
+
var inputs = this.getInputs();
|
|
7280
|
+
var res = _reduceInstanceProperty(inputs).call(inputs, function (acc, input) {
|
|
7281
|
+
return acc && hasValidInputValue(input, _valuesInstanceProperty(_this));
|
|
7282
|
+
}, true);
|
|
7283
|
+
return res;
|
|
7284
|
+
}
|
|
7285
|
+
}, {
|
|
7286
|
+
key: "getData",
|
|
7287
|
+
value: function getData() {
|
|
7288
|
+
var _context2,
|
|
7289
|
+
_this2 = this;
|
|
7290
|
+
var data = _reduceInstanceProperty(_context2 = this.getInputs()).call(_context2, function (acc, _ref) {
|
|
7291
|
+
var name = _ref.name;
|
|
7292
|
+
acc[name] = _valuesInstanceProperty(_this2)[name];
|
|
7293
|
+
return acc;
|
|
7294
|
+
}, {});
|
|
7295
|
+
return data;
|
|
7296
|
+
}
|
|
7297
|
+
}, {
|
|
7298
|
+
key: "getNextStep",
|
|
7299
|
+
value: function getNextStep(authClient, _context) {
|
|
7300
|
+
var name = this.getName();
|
|
7301
|
+
var inputs = this.getInputs();
|
|
7302
|
+
var _a = this.remediation;
|
|
7303
|
+
_a.href;
|
|
7304
|
+
_a.method;
|
|
7305
|
+
_a.rel;
|
|
7306
|
+
_a.accepts;
|
|
7307
|
+
_a.produces;
|
|
7308
|
+
_a.value;
|
|
7309
|
+
var action = _a.action,
|
|
7310
|
+
rest = __rest(_a, ["href", "method", "rel", "accepts", "produces", "value", "action"]);
|
|
7311
|
+
if (action) {
|
|
7312
|
+
return _Object$assign(_Object$assign(_Object$assign({}, rest), !!inputs.length && {
|
|
7313
|
+
inputs: inputs
|
|
7314
|
+
}), {
|
|
7315
|
+
action: function () {
|
|
7316
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7317
|
+
return _regeneratorRuntime.wrap(function _callee$(_context3) {
|
|
7318
|
+
while (1) {
|
|
7319
|
+
switch (_context3.prev = _context3.next) {
|
|
7320
|
+
case 0:
|
|
7321
|
+
return _context3.abrupt("return", proceed(authClient, _Object$assign({
|
|
7322
|
+
step: name
|
|
7323
|
+
}, params)));
|
|
7324
|
+
case 1:
|
|
7325
|
+
case "end":
|
|
7326
|
+
return _context3.stop();
|
|
7327
|
+
}
|
|
7328
|
+
}
|
|
7329
|
+
}, _callee);
|
|
7330
|
+
}));
|
|
7331
|
+
function action(_x) {
|
|
7332
|
+
return _action.apply(this, arguments);
|
|
7333
|
+
}
|
|
7334
|
+
return action;
|
|
7335
|
+
}()
|
|
7336
|
+
});
|
|
7337
|
+
}
|
|
7338
|
+
return _Object$assign({}, this.remediation);
|
|
7339
|
+
}
|
|
7340
|
+
}, {
|
|
7341
|
+
key: "getInputs",
|
|
7342
|
+
value: function getInputs() {
|
|
7343
|
+
var _context4, _context5, _context6;
|
|
7344
|
+
return _mapInstanceProperty(_context4 = _mapInstanceProperty(_context5 = _filterInstanceProperty(_context6 = this.remediation.value || []).call(_context6, function (_ref2) {
|
|
7345
|
+
var name = _ref2.name;
|
|
7346
|
+
return name !== 'stateHandle';
|
|
7347
|
+
})).call(_context5, unwrapFormValue)).call(_context4, function (input) {
|
|
7348
|
+
input.type = input.type || 'string';
|
|
7349
|
+
return input;
|
|
7350
|
+
});
|
|
7351
|
+
}
|
|
7352
|
+
}]);
|
|
7353
|
+
return GenericRemediator;
|
|
7354
|
+
}(Remediator);
|
|
7355
|
+
|
|
7119
7356
|
var remediators = /*#__PURE__*/Object.freeze({
|
|
7120
7357
|
__proto__: null,
|
|
7121
7358
|
Remediator: Remediator,
|
|
@@ -7136,11 +7373,12 @@ var remediators = /*#__PURE__*/Object.freeze({
|
|
|
7136
7373
|
SelectEnrollProfile: SelectEnrollProfile,
|
|
7137
7374
|
AuthenticatorVerificationData: AuthenticatorVerificationData,
|
|
7138
7375
|
AuthenticatorEnrollmentData: AuthenticatorEnrollmentData,
|
|
7139
|
-
Skip: Skip
|
|
7376
|
+
Skip: Skip,
|
|
7377
|
+
GenericRemediator: GenericRemediator
|
|
7140
7378
|
});
|
|
7141
7379
|
|
|
7142
7380
|
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; } } }; }
|
|
7143
|
-
function _unsupportedIterableToArray$1(o, minLen) { var
|
|
7381
|
+
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); }
|
|
7144
7382
|
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; }
|
|
7145
7383
|
function isTerminalResponse(idxResponse) {
|
|
7146
7384
|
var neededToProceed = idxResponse.neededToProceed,
|
|
@@ -7258,7 +7496,7 @@ function getEnabledFeatures(idxResponse) {
|
|
|
7258
7496
|
}
|
|
7259
7497
|
return res;
|
|
7260
7498
|
}
|
|
7261
|
-
function getAvailableSteps(idxResponse) {
|
|
7499
|
+
function getAvailableSteps(authClient, idxResponse, useGenericRemediator) {
|
|
7262
7500
|
var _context9;
|
|
7263
7501
|
var res = [];
|
|
7264
7502
|
var remediatorMap = _reduceInstanceProperty(_context9 = _Object$values(remediators)).call(_context9, function (map, remediatorClass) {
|
|
@@ -7272,10 +7510,13 @@ function getAvailableSteps(idxResponse) {
|
|
|
7272
7510
|
try {
|
|
7273
7511
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7274
7512
|
var remediation = _step2.value;
|
|
7275
|
-
var T =
|
|
7513
|
+
var T = getRemediatorClass(remediation, {
|
|
7514
|
+
useGenericRemediator: useGenericRemediator,
|
|
7515
|
+
remediators: remediatorMap
|
|
7516
|
+
});
|
|
7276
7517
|
if (T) {
|
|
7277
7518
|
var remediator = new T(remediation);
|
|
7278
|
-
res.push(remediator.getNextStep(idxResponse.context));
|
|
7519
|
+
res.push(remediator.getNextStep(authClient, idxResponse.context));
|
|
7279
7520
|
}
|
|
7280
7521
|
}
|
|
7281
7522
|
} catch (err) {
|
|
@@ -7283,10 +7524,44 @@ function getAvailableSteps(idxResponse) {
|
|
|
7283
7524
|
} finally {
|
|
7284
7525
|
_iterator2.f();
|
|
7285
7526
|
}
|
|
7527
|
+
var _loop = function _loop() {
|
|
7528
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 1),
|
|
7529
|
+
name = _Object$entries$_i[0];
|
|
7530
|
+
res.push({
|
|
7531
|
+
name: name,
|
|
7532
|
+
action: function () {
|
|
7533
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7534
|
+
return _regeneratorRuntime.wrap(function _callee$(_context10) {
|
|
7535
|
+
while (1) {
|
|
7536
|
+
switch (_context10.prev = _context10.next) {
|
|
7537
|
+
case 0:
|
|
7538
|
+
return _context10.abrupt("return", proceed(authClient, {
|
|
7539
|
+
actions: [{
|
|
7540
|
+
name: name,
|
|
7541
|
+
params: params
|
|
7542
|
+
}]
|
|
7543
|
+
}));
|
|
7544
|
+
case 1:
|
|
7545
|
+
case "end":
|
|
7546
|
+
return _context10.stop();
|
|
7547
|
+
}
|
|
7548
|
+
}
|
|
7549
|
+
}, _callee);
|
|
7550
|
+
}));
|
|
7551
|
+
function action(_x) {
|
|
7552
|
+
return _action.apply(this, arguments);
|
|
7553
|
+
}
|
|
7554
|
+
return action;
|
|
7555
|
+
}()
|
|
7556
|
+
});
|
|
7557
|
+
};
|
|
7558
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(idxResponse.actions || {}); _i < _Object$entries$1.length; _i++) {
|
|
7559
|
+
_loop();
|
|
7560
|
+
}
|
|
7286
7561
|
return res;
|
|
7287
7562
|
}
|
|
7288
7563
|
function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
7289
|
-
var
|
|
7564
|
+
var _context11;
|
|
7290
7565
|
var remediations = idxResponse.neededToProceed || [];
|
|
7291
7566
|
var remediation = _findInstanceProperty(remediations).call(remediations, function (r) {
|
|
7292
7567
|
return r.name === remediationName;
|
|
@@ -7295,7 +7570,7 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7295
7570
|
warn("filterValuesForRemediation: \"".concat(remediationName, "\" did not match any remediations"));
|
|
7296
7571
|
return values;
|
|
7297
7572
|
}
|
|
7298
|
-
var valuesForRemediation = _reduceInstanceProperty(
|
|
7573
|
+
var valuesForRemediation = _reduceInstanceProperty(_context11 = remediation.value).call(_context11, function (res, entry) {
|
|
7299
7574
|
var name = entry.name,
|
|
7300
7575
|
value = entry.value;
|
|
7301
7576
|
if (name === 'stateHandle') {
|
|
@@ -7307,8 +7582,20 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7307
7582
|
}, {});
|
|
7308
7583
|
return valuesForRemediation;
|
|
7309
7584
|
}
|
|
7585
|
+
function getRemediatorClass(remediation, options) {
|
|
7586
|
+
var useGenericRemediator = options.useGenericRemediator,
|
|
7587
|
+
remediators = options.remediators;
|
|
7588
|
+
if (!remediation) {
|
|
7589
|
+
return undefined;
|
|
7590
|
+
}
|
|
7591
|
+
if (useGenericRemediator) {
|
|
7592
|
+
return GenericRemediator;
|
|
7593
|
+
}
|
|
7594
|
+
return remediators[remediation.name];
|
|
7595
|
+
}
|
|
7310
7596
|
function getRemediator(idxRemediations, values, options) {
|
|
7311
7597
|
var remediators = options.remediators;
|
|
7598
|
+
var useGenericRemediator = options.useGenericRemediator;
|
|
7312
7599
|
var remediator;
|
|
7313
7600
|
if (options.step) {
|
|
7314
7601
|
var remediation = _findInstanceProperty(idxRemediations).call(idxRemediations, function (_ref5) {
|
|
@@ -7316,7 +7603,7 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7316
7603
|
return name === options.step;
|
|
7317
7604
|
});
|
|
7318
7605
|
if (remediation) {
|
|
7319
|
-
var T = remediation
|
|
7606
|
+
var T = getRemediatorClass(remediation, options);
|
|
7320
7607
|
return T ? new T(remediation, values, options) : undefined;
|
|
7321
7608
|
} else {
|
|
7322
7609
|
warn("step \"".concat(options.step, "\" did not match any remediations"));
|
|
@@ -7328,13 +7615,13 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7328
7615
|
_step3;
|
|
7329
7616
|
try {
|
|
7330
7617
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
7331
|
-
var
|
|
7618
|
+
var _context12;
|
|
7332
7619
|
var _remediation = _step3.value;
|
|
7333
|
-
var isRemeditionInFlow = _includesInstanceProperty(
|
|
7620
|
+
var isRemeditionInFlow = _includesInstanceProperty(_context12 = _Object$keys(remediators)).call(_context12, _remediation.name);
|
|
7334
7621
|
if (!isRemeditionInFlow) {
|
|
7335
7622
|
continue;
|
|
7336
7623
|
}
|
|
7337
|
-
var _T =
|
|
7624
|
+
var _T = getRemediatorClass(_remediation, options);
|
|
7338
7625
|
remediator = new _T(_remediation, values, options);
|
|
7339
7626
|
if (remediator.canRemediate()) {
|
|
7340
7627
|
return remediator;
|
|
@@ -7346,10 +7633,13 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7346
7633
|
} finally {
|
|
7347
7634
|
_iterator3.f();
|
|
7348
7635
|
}
|
|
7636
|
+
if (!remediatorCandidates.length && !!idxRemediations.length && useGenericRemediator) {
|
|
7637
|
+
return new GenericRemediator(idxRemediations[0], values, options);
|
|
7638
|
+
}
|
|
7349
7639
|
return remediatorCandidates[0];
|
|
7350
7640
|
}
|
|
7351
|
-
function getNextStep(remediator, idxResponse) {
|
|
7352
|
-
var nextStep = remediator.getNextStep(idxResponse.context);
|
|
7641
|
+
function getNextStep(authClient, remediator, idxResponse) {
|
|
7642
|
+
var nextStep = remediator.getNextStep(authClient, idxResponse.context);
|
|
7353
7643
|
var canSkip = canSkipFn(idxResponse);
|
|
7354
7644
|
var canResend = canResendFn(idxResponse);
|
|
7355
7645
|
return _Object$assign(_Object$assign(_Object$assign({}, nextStep), canSkip && {
|
|
@@ -7358,7 +7648,7 @@ function getNextStep(remediator, idxResponse) {
|
|
|
7358
7648
|
canResend: canResend
|
|
7359
7649
|
});
|
|
7360
7650
|
}
|
|
7361
|
-
function handleIdxError(e, remediator) {
|
|
7651
|
+
function handleIdxError(authClient, e, remediator) {
|
|
7362
7652
|
var idxResponse = isIdxResponse(e) ? e : null;
|
|
7363
7653
|
if (!idxResponse) {
|
|
7364
7654
|
throw e;
|
|
@@ -7375,7 +7665,7 @@ function handleIdxError(e, remediator) {
|
|
|
7375
7665
|
messages: messages
|
|
7376
7666
|
};
|
|
7377
7667
|
} else {
|
|
7378
|
-
var nextStep = remediator && getNextStep(remediator, idxResponse);
|
|
7668
|
+
var nextStep = remediator && getNextStep(authClient, remediator, idxResponse);
|
|
7379
7669
|
return _Object$assign({
|
|
7380
7670
|
idxResponse: idxResponse,
|
|
7381
7671
|
messages: messages
|
|
@@ -7411,13 +7701,13 @@ function removeActionFromOptions(options, actionName) {
|
|
|
7411
7701
|
actions: actions
|
|
7412
7702
|
});
|
|
7413
7703
|
}
|
|
7414
|
-
function remediate(_x, _x2, _x3) {
|
|
7704
|
+
function remediate(_x, _x2, _x3, _x4) {
|
|
7415
7705
|
return _remediate.apply(this, arguments);
|
|
7416
7706
|
}
|
|
7417
7707
|
function _remediate() {
|
|
7418
|
-
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(idxResponse, values, options) {
|
|
7708
|
+
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, idxResponse, values, options) {
|
|
7419
7709
|
var _context2;
|
|
7420
|
-
var _idxResponse, neededToProceed, interactionCode, _options, flow,
|
|
7710
|
+
var _idxResponse, neededToProceed, interactionCode, _options, flow, remediator, actionFromValues, actionFromOptions, actions, _iterator, _step, _loop, _ret, terminal, messages, nextStep, name, data;
|
|
7421
7711
|
return _regeneratorRuntime.wrap(function _callee$(_context4) {
|
|
7422
7712
|
while (1) {
|
|
7423
7713
|
switch (_context4.prev = _context4.next) {
|
|
@@ -7432,28 +7722,16 @@ function _remediate() {
|
|
|
7432
7722
|
idxResponse: idxResponse
|
|
7433
7723
|
});
|
|
7434
7724
|
case 4:
|
|
7435
|
-
terminal = isTerminalResponse(idxResponse);
|
|
7436
|
-
messages = getMessagesFromResponse(idxResponse);
|
|
7437
|
-
if (!terminal) {
|
|
7438
|
-
_context4.next = 8;
|
|
7439
|
-
break;
|
|
7440
|
-
}
|
|
7441
|
-
return _context4.abrupt("return", {
|
|
7442
|
-
idxResponse: idxResponse,
|
|
7443
|
-
terminal: terminal,
|
|
7444
|
-
messages: messages
|
|
7445
|
-
});
|
|
7446
|
-
case 8:
|
|
7447
7725
|
remediator = getRemediator(neededToProceed, values, options);
|
|
7448
7726
|
actionFromValues = getActionFromValues(values, idxResponse);
|
|
7449
7727
|
actionFromOptions = options.actions || [];
|
|
7450
7728
|
actions = _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(actionFromOptions), _toConsumableArray(actionFromValues && [actionFromValues] || []));
|
|
7451
7729
|
if (!actions) {
|
|
7452
|
-
_context4.next =
|
|
7730
|
+
_context4.next = 28;
|
|
7453
7731
|
break;
|
|
7454
7732
|
}
|
|
7455
7733
|
_iterator = _createForOfIteratorHelper(actions);
|
|
7456
|
-
_context4.prev =
|
|
7734
|
+
_context4.prev = 10;
|
|
7457
7735
|
_loop = _regeneratorRuntime.mark(function _loop() {
|
|
7458
7736
|
var action, params, valuesWithoutExecutedAction, optionsWithoutExecutedAction, remediationAction;
|
|
7459
7737
|
return _regeneratorRuntime.wrap(function _loop$(_context3) {
|
|
@@ -7486,7 +7764,7 @@ function _remediate() {
|
|
|
7486
7764
|
_context3.prev = 13;
|
|
7487
7765
|
_context3.t0 = _context3["catch"](6);
|
|
7488
7766
|
return _context3.abrupt("return", {
|
|
7489
|
-
v: handleIdxError(_context3.t0, remediator)
|
|
7767
|
+
v: handleIdxError(authClient, _context3.t0, remediator)
|
|
7490
7768
|
});
|
|
7491
7769
|
case 16:
|
|
7492
7770
|
if (!(action === 'cancel')) {
|
|
@@ -7501,7 +7779,7 @@ function _remediate() {
|
|
|
7501
7779
|
});
|
|
7502
7780
|
case 18:
|
|
7503
7781
|
return _context3.abrupt("return", {
|
|
7504
|
-
v: remediate(idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7782
|
+
v: remediate(authClient, idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7505
7783
|
});
|
|
7506
7784
|
case 19:
|
|
7507
7785
|
remediationAction = _findInstanceProperty(neededToProceed).call(neededToProceed, function (_ref) {
|
|
@@ -7526,11 +7804,11 @@ function _remediate() {
|
|
|
7526
7804
|
_context3.prev = 28;
|
|
7527
7805
|
_context3.t1 = _context3["catch"](21);
|
|
7528
7806
|
return _context3.abrupt("return", {
|
|
7529
|
-
v: handleIdxError(_context3.t1, remediator)
|
|
7807
|
+
v: handleIdxError(authClient, _context3.t1, remediator)
|
|
7530
7808
|
});
|
|
7531
7809
|
case 31:
|
|
7532
7810
|
return _context3.abrupt("return", {
|
|
7533
|
-
v: remediate(idxResponse, values, optionsWithoutExecutedAction)
|
|
7811
|
+
v: remediate(authClient, idxResponse, values, optionsWithoutExecutedAction)
|
|
7534
7812
|
});
|
|
7535
7813
|
case 32:
|
|
7536
7814
|
case "end":
|
|
@@ -7540,33 +7818,45 @@ function _remediate() {
|
|
|
7540
7818
|
}, _loop, null, [[6, 13], [21, 28]]);
|
|
7541
7819
|
});
|
|
7542
7820
|
_iterator.s();
|
|
7543
|
-
case
|
|
7821
|
+
case 13:
|
|
7544
7822
|
if ((_step = _iterator.n()).done) {
|
|
7545
|
-
_context4.next =
|
|
7823
|
+
_context4.next = 20;
|
|
7546
7824
|
break;
|
|
7547
7825
|
}
|
|
7548
|
-
return _context4.delegateYield(_loop(), "t0",
|
|
7549
|
-
case
|
|
7826
|
+
return _context4.delegateYield(_loop(), "t0", 15);
|
|
7827
|
+
case 15:
|
|
7550
7828
|
_ret = _context4.t0;
|
|
7551
7829
|
if (!(_typeof(_ret) === "object")) {
|
|
7552
|
-
_context4.next =
|
|
7830
|
+
_context4.next = 18;
|
|
7553
7831
|
break;
|
|
7554
7832
|
}
|
|
7555
7833
|
return _context4.abrupt("return", _ret.v);
|
|
7556
|
-
case
|
|
7557
|
-
_context4.next =
|
|
7834
|
+
case 18:
|
|
7835
|
+
_context4.next = 13;
|
|
7558
7836
|
break;
|
|
7559
|
-
case
|
|
7560
|
-
_context4.next =
|
|
7837
|
+
case 20:
|
|
7838
|
+
_context4.next = 25;
|
|
7561
7839
|
break;
|
|
7562
|
-
case
|
|
7563
|
-
_context4.prev =
|
|
7564
|
-
_context4.t1 = _context4["catch"](
|
|
7840
|
+
case 22:
|
|
7841
|
+
_context4.prev = 22;
|
|
7842
|
+
_context4.t1 = _context4["catch"](10);
|
|
7565
7843
|
_iterator.e(_context4.t1);
|
|
7566
|
-
case
|
|
7567
|
-
_context4.prev =
|
|
7844
|
+
case 25:
|
|
7845
|
+
_context4.prev = 25;
|
|
7568
7846
|
_iterator.f();
|
|
7569
|
-
return _context4.finish(
|
|
7847
|
+
return _context4.finish(25);
|
|
7848
|
+
case 28:
|
|
7849
|
+
terminal = isTerminalResponse(idxResponse);
|
|
7850
|
+
messages = getMessagesFromResponse(idxResponse);
|
|
7851
|
+
if (!terminal) {
|
|
7852
|
+
_context4.next = 32;
|
|
7853
|
+
break;
|
|
7854
|
+
}
|
|
7855
|
+
return _context4.abrupt("return", {
|
|
7856
|
+
idxResponse: idxResponse,
|
|
7857
|
+
terminal: terminal,
|
|
7858
|
+
messages: messages
|
|
7859
|
+
});
|
|
7570
7860
|
case 32:
|
|
7571
7861
|
if (remediator) {
|
|
7572
7862
|
_context4.next = 49;
|
|
@@ -7591,7 +7881,7 @@ function _remediate() {
|
|
|
7591
7881
|
case 43:
|
|
7592
7882
|
_context4.prev = 43;
|
|
7593
7883
|
_context4.t2 = _context4["catch"](35);
|
|
7594
|
-
return _context4.abrupt("return", handleIdxError(_context4.t2));
|
|
7884
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t2));
|
|
7595
7885
|
case 46:
|
|
7596
7886
|
if (!(flow === 'default')) {
|
|
7597
7887
|
_context4.next = 48;
|
|
@@ -7609,7 +7899,7 @@ function _remediate() {
|
|
|
7609
7899
|
_context4.next = 52;
|
|
7610
7900
|
break;
|
|
7611
7901
|
}
|
|
7612
|
-
nextStep = getNextStep(remediator, idxResponse);
|
|
7902
|
+
nextStep = getNextStep(authClient, remediator, idxResponse);
|
|
7613
7903
|
return _context4.abrupt("return", {
|
|
7614
7904
|
idxResponse: idxResponse,
|
|
7615
7905
|
nextStep: nextStep,
|
|
@@ -7630,17 +7920,17 @@ function _remediate() {
|
|
|
7630
7920
|
options = _Object$assign(_Object$assign({}, options), {
|
|
7631
7921
|
step: undefined
|
|
7632
7922
|
});
|
|
7633
|
-
return _context4.abrupt("return", remediate(idxResponse, values, options));
|
|
7923
|
+
return _context4.abrupt("return", remediate(authClient, idxResponse, values, options));
|
|
7634
7924
|
case 64:
|
|
7635
7925
|
_context4.prev = 64;
|
|
7636
7926
|
_context4.t3 = _context4["catch"](54);
|
|
7637
|
-
return _context4.abrupt("return", handleIdxError(_context4.t3, remediator));
|
|
7927
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t3, remediator));
|
|
7638
7928
|
case 67:
|
|
7639
7929
|
case "end":
|
|
7640
7930
|
return _context4.stop();
|
|
7641
7931
|
}
|
|
7642
7932
|
}
|
|
7643
|
-
}, _callee, null, [[
|
|
7933
|
+
}, _callee, null, [[10, 22, 25, 28], [35, 43], [54, 64]]);
|
|
7644
7934
|
}));
|
|
7645
7935
|
return _remediate.apply(this, arguments);
|
|
7646
7936
|
}
|
|
@@ -7743,11 +8033,13 @@ function initializeValues(options) {
|
|
|
7743
8033
|
return values;
|
|
7744
8034
|
}
|
|
7745
8035
|
function initializeData(authClient, data) {
|
|
8036
|
+
var _a;
|
|
7746
8037
|
var options = data.options;
|
|
7747
8038
|
var flow = options.flow,
|
|
7748
8039
|
withCredentials = options.withCredentials,
|
|
7749
8040
|
remediators = options.remediators,
|
|
7750
|
-
actions = options.actions
|
|
8041
|
+
actions = options.actions,
|
|
8042
|
+
useGenericRemediator = options.useGenericRemediator;
|
|
7751
8043
|
var status = IdxStatus.PENDING;
|
|
7752
8044
|
flow = flow || authClient.idx.getFlow() || 'default';
|
|
7753
8045
|
if (flow) {
|
|
@@ -7757,12 +8049,14 @@ function initializeData(authClient, data) {
|
|
|
7757
8049
|
remediators = remediators || flowSpec.remediators;
|
|
7758
8050
|
actions = actions || flowSpec.actions;
|
|
7759
8051
|
}
|
|
8052
|
+
useGenericRemediator = useGenericRemediator || ((_a = authClient.options.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator) || false;
|
|
7760
8053
|
return _Object$assign(_Object$assign({}, data), {
|
|
7761
8054
|
options: _Object$assign(_Object$assign({}, options), {
|
|
7762
8055
|
flow: flow,
|
|
7763
8056
|
withCredentials: withCredentials,
|
|
7764
8057
|
remediators: remediators,
|
|
7765
|
-
actions: actions
|
|
8058
|
+
actions: actions,
|
|
8059
|
+
useGenericRemediator: useGenericRemediator
|
|
7766
8060
|
}),
|
|
7767
8061
|
status: status
|
|
7768
8062
|
});
|
|
@@ -7772,13 +8066,13 @@ function getDataFromIntrospect(_x, _x2) {
|
|
|
7772
8066
|
}
|
|
7773
8067
|
function _getDataFromIntrospect() {
|
|
7774
8068
|
_getDataFromIntrospect = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, data) {
|
|
7775
|
-
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, idxResponse, meta, interactionHandle, interactResponse;
|
|
8069
|
+
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, maxAge, idxResponse, meta, interactionHandle, interactResponse;
|
|
7776
8070
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7777
8071
|
while (1) {
|
|
7778
8072
|
switch (_context.prev = _context.next) {
|
|
7779
8073
|
case 0:
|
|
7780
8074
|
options = data.options;
|
|
7781
|
-
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken;
|
|
8075
|
+
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken, maxAge = options.maxAge;
|
|
7782
8076
|
meta = getSavedTransactionMeta(authClient, {
|
|
7783
8077
|
state: state,
|
|
7784
8078
|
recoveryToken: recoveryToken,
|
|
@@ -7811,7 +8105,8 @@ function _getDataFromIntrospect() {
|
|
|
7811
8105
|
state: state,
|
|
7812
8106
|
scopes: scopes,
|
|
7813
8107
|
activationToken: activationToken,
|
|
7814
|
-
recoveryToken: recoveryToken
|
|
8108
|
+
recoveryToken: recoveryToken,
|
|
8109
|
+
maxAge: maxAge
|
|
7815
8110
|
});
|
|
7816
8111
|
case 14:
|
|
7817
8112
|
interactResponse = _context.sent;
|
|
@@ -7840,18 +8135,18 @@ function _getDataFromIntrospect() {
|
|
|
7840
8135
|
}));
|
|
7841
8136
|
return _getDataFromIntrospect.apply(this, arguments);
|
|
7842
8137
|
}
|
|
7843
|
-
function getDataFromRemediate(_x3) {
|
|
8138
|
+
function getDataFromRemediate(_x3, _x4) {
|
|
7844
8139
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7845
8140
|
}
|
|
7846
8141
|
function _getDataFromRemediate() {
|
|
7847
|
-
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(data) {
|
|
7848
|
-
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
8142
|
+
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(authClient, data) {
|
|
8143
|
+
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, useGenericRemediator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
7849
8144
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
7850
8145
|
while (1) {
|
|
7851
8146
|
switch (_context2.prev = _context2.next) {
|
|
7852
8147
|
case 0:
|
|
7853
8148
|
idxResponse = data.idxResponse, options = data.options, values = _valuesInstanceProperty(data);
|
|
7854
|
-
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator;
|
|
8149
|
+
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator, useGenericRemediator = options.useGenericRemediator;
|
|
7855
8150
|
shouldRemediate = autoRemediate !== false && (remediators || actions || step);
|
|
7856
8151
|
if (shouldRemediate) {
|
|
7857
8152
|
_context2.next = 5;
|
|
@@ -7863,12 +8158,13 @@ function _getDataFromRemediate() {
|
|
|
7863
8158
|
stateHandle: idxResponse.rawIdxState.stateHandle
|
|
7864
8159
|
});
|
|
7865
8160
|
_context2.next = 8;
|
|
7866
|
-
return remediate(idxResponse, values, {
|
|
8161
|
+
return remediate(authClient, idxResponse, values, {
|
|
7867
8162
|
remediators: remediators,
|
|
7868
8163
|
actions: actions,
|
|
7869
8164
|
flow: flow,
|
|
7870
8165
|
step: step,
|
|
7871
|
-
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator
|
|
8166
|
+
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator,
|
|
8167
|
+
useGenericRemediator: useGenericRemediator
|
|
7872
8168
|
});
|
|
7873
8169
|
case 8:
|
|
7874
8170
|
_yield$remediate = _context2.sent;
|
|
@@ -7890,7 +8186,7 @@ function _getDataFromRemediate() {
|
|
|
7890
8186
|
}));
|
|
7891
8187
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7892
8188
|
}
|
|
7893
|
-
function getTokens(
|
|
8189
|
+
function getTokens(_x5, _x6) {
|
|
7894
8190
|
return _getTokens.apply(this, arguments);
|
|
7895
8191
|
}
|
|
7896
8192
|
function _getTokens() {
|
|
@@ -7924,70 +8220,82 @@ function _getTokens() {
|
|
|
7924
8220
|
}));
|
|
7925
8221
|
return _getTokens.apply(this, arguments);
|
|
7926
8222
|
}
|
|
7927
|
-
function finalizeData(
|
|
8223
|
+
function finalizeData(_x7, _x8) {
|
|
7928
8224
|
return _finalizeData.apply(this, arguments);
|
|
7929
8225
|
}
|
|
7930
8226
|
function _finalizeData() {
|
|
7931
8227
|
_finalizeData = _asyncToGenerator( _regeneratorRuntime.mark(function _callee4(authClient, data) {
|
|
7932
|
-
var options, idxResponse, canceled, status, exchangeCodeForTokens, shouldClearTransaction, clearSharedStorage, interactionCode, tokens, enabledFeatures, availableSteps, messages, terminal;
|
|
8228
|
+
var options, idxResponse, canceled, status, exchangeCodeForTokens, shouldSaveResponse, shouldClearTransaction, clearSharedStorage, interactionCode, tokens, enabledFeatures, availableSteps, messages, terminal, hasActions, hasErrors, isTerminalSuccess;
|
|
7933
8229
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
7934
8230
|
while (1) {
|
|
7935
8231
|
switch (_context4.prev = _context4.next) {
|
|
7936
8232
|
case 0:
|
|
7937
8233
|
options = data.options, idxResponse = data.idxResponse, canceled = data.canceled, status = data.status;
|
|
7938
8234
|
exchangeCodeForTokens = options.exchangeCodeForTokens;
|
|
8235
|
+
shouldSaveResponse = false;
|
|
7939
8236
|
shouldClearTransaction = false;
|
|
7940
8237
|
clearSharedStorage = true;
|
|
7941
8238
|
if (idxResponse) {
|
|
8239
|
+
shouldSaveResponse = !!(idxResponse.requestDidSucceed || idxResponse.stepUp);
|
|
7942
8240
|
enabledFeatures = getEnabledFeatures(idxResponse);
|
|
7943
|
-
availableSteps = getAvailableSteps(idxResponse);
|
|
8241
|
+
availableSteps = getAvailableSteps(authClient, idxResponse, options.useGenericRemediator);
|
|
7944
8242
|
messages = getMessagesFromResponse(idxResponse);
|
|
7945
8243
|
terminal = isTerminalResponse(idxResponse);
|
|
7946
8244
|
}
|
|
7947
8245
|
if (!terminal) {
|
|
7948
|
-
_context4.next =
|
|
8246
|
+
_context4.next = 15;
|
|
7949
8247
|
break;
|
|
7950
8248
|
}
|
|
7951
8249
|
status = IdxStatus.TERMINAL;
|
|
7952
|
-
|
|
8250
|
+
hasActions = _Object$keys(idxResponse.actions).length > 0;
|
|
8251
|
+
hasErrors = !!_findInstanceProperty(messages).call(messages, function (msg) {
|
|
8252
|
+
return msg.class === 'ERROR';
|
|
8253
|
+
});
|
|
8254
|
+
isTerminalSuccess = !hasActions && !hasErrors && idxResponse.requestDidSucceed === true;
|
|
8255
|
+
if (isTerminalSuccess) {
|
|
8256
|
+
shouldClearTransaction = true;
|
|
8257
|
+
} else {
|
|
8258
|
+
shouldSaveResponse = shouldSaveResponse && hasActions;
|
|
8259
|
+
}
|
|
7953
8260
|
clearSharedStorage = false;
|
|
7954
|
-
_context4.next =
|
|
8261
|
+
_context4.next = 32;
|
|
7955
8262
|
break;
|
|
7956
|
-
case
|
|
8263
|
+
case 15:
|
|
7957
8264
|
if (!canceled) {
|
|
7958
|
-
_context4.next =
|
|
8265
|
+
_context4.next = 20;
|
|
7959
8266
|
break;
|
|
7960
8267
|
}
|
|
7961
8268
|
status = IdxStatus.CANCELED;
|
|
7962
8269
|
shouldClearTransaction = true;
|
|
7963
|
-
_context4.next =
|
|
8270
|
+
_context4.next = 32;
|
|
7964
8271
|
break;
|
|
7965
|
-
case
|
|
8272
|
+
case 20:
|
|
7966
8273
|
if (!(idxResponse === null || idxResponse === void 0 ? void 0 : idxResponse.interactionCode)) {
|
|
7967
|
-
_context4.next =
|
|
8274
|
+
_context4.next = 32;
|
|
7968
8275
|
break;
|
|
7969
8276
|
}
|
|
7970
8277
|
interactionCode = idxResponse.interactionCode;
|
|
7971
8278
|
if (!(exchangeCodeForTokens === false)) {
|
|
7972
|
-
_context4.next =
|
|
8279
|
+
_context4.next = 27;
|
|
7973
8280
|
break;
|
|
7974
8281
|
}
|
|
7975
8282
|
status = IdxStatus.SUCCESS;
|
|
7976
8283
|
shouldClearTransaction = false;
|
|
7977
|
-
_context4.next =
|
|
8284
|
+
_context4.next = 32;
|
|
7978
8285
|
break;
|
|
7979
|
-
case
|
|
7980
|
-
_context4.next =
|
|
8286
|
+
case 27:
|
|
8287
|
+
_context4.next = 29;
|
|
7981
8288
|
return getTokens(authClient, data);
|
|
7982
|
-
case
|
|
8289
|
+
case 29:
|
|
7983
8290
|
tokens = _context4.sent;
|
|
7984
8291
|
status = IdxStatus.SUCCESS;
|
|
7985
8292
|
shouldClearTransaction = true;
|
|
7986
|
-
case
|
|
8293
|
+
case 32:
|
|
7987
8294
|
return _context4.abrupt("return", _Object$assign(_Object$assign({}, data), {
|
|
7988
8295
|
status: status,
|
|
7989
8296
|
interactionCode: interactionCode,
|
|
7990
8297
|
tokens: tokens,
|
|
8298
|
+
shouldSaveResponse: shouldSaveResponse,
|
|
7991
8299
|
shouldClearTransaction: shouldClearTransaction,
|
|
7992
8300
|
clearSharedStorage: clearSharedStorage,
|
|
7993
8301
|
enabledFeatures: enabledFeatures,
|
|
@@ -7995,7 +8303,7 @@ function _finalizeData() {
|
|
|
7995
8303
|
messages: messages,
|
|
7996
8304
|
terminal: terminal
|
|
7997
8305
|
}));
|
|
7998
|
-
case
|
|
8306
|
+
case 33:
|
|
7999
8307
|
case "end":
|
|
8000
8308
|
return _context4.stop();
|
|
8001
8309
|
}
|
|
@@ -8021,16 +8329,18 @@ function handleError(err, data) {
|
|
|
8021
8329
|
shouldClearTransaction: shouldClearTransaction
|
|
8022
8330
|
});
|
|
8023
8331
|
}
|
|
8024
|
-
function run(
|
|
8332
|
+
function run(_x9) {
|
|
8025
8333
|
return _run.apply(this, arguments);
|
|
8026
8334
|
}
|
|
8027
8335
|
function _run() {
|
|
8028
8336
|
_run = _asyncToGenerator( _regeneratorRuntime.mark(function _callee5(authClient) {
|
|
8029
8337
|
var options,
|
|
8338
|
+
_a,
|
|
8030
8339
|
data,
|
|
8031
8340
|
_data,
|
|
8032
8341
|
idxResponse,
|
|
8033
8342
|
meta,
|
|
8343
|
+
shouldSaveResponse,
|
|
8034
8344
|
shouldClearTransaction,
|
|
8035
8345
|
clearSharedStorage,
|
|
8036
8346
|
status,
|
|
@@ -8067,7 +8377,7 @@ function _run() {
|
|
|
8067
8377
|
case 6:
|
|
8068
8378
|
data = _context5.sent;
|
|
8069
8379
|
_context5.next = 9;
|
|
8070
|
-
return getDataFromRemediate(data);
|
|
8380
|
+
return getDataFromRemediate(authClient, data);
|
|
8071
8381
|
case 9:
|
|
8072
8382
|
data = _context5.sent;
|
|
8073
8383
|
_context5.next = 15;
|
|
@@ -8081,18 +8391,20 @@ function _run() {
|
|
|
8081
8391
|
return finalizeData(authClient, data);
|
|
8082
8392
|
case 17:
|
|
8083
8393
|
data = _context5.sent;
|
|
8084
|
-
_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;
|
|
8394
|
+
_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;
|
|
8085
8395
|
if (shouldClearTransaction) {
|
|
8086
8396
|
authClient.transactionManager.clear({
|
|
8087
8397
|
clearSharedStorage: clearSharedStorage
|
|
8088
8398
|
});
|
|
8089
8399
|
} else {
|
|
8090
8400
|
saveTransactionMeta(authClient, _Object$assign({}, meta));
|
|
8091
|
-
if (
|
|
8401
|
+
if (shouldSaveResponse) {
|
|
8092
8402
|
rawIdxResponse = idxResponse.rawIdxState, _requestDidSucceed = idxResponse.requestDidSucceed;
|
|
8093
8403
|
authClient.transactionManager.saveIdxResponse({
|
|
8094
8404
|
rawIdxResponse: rawIdxResponse,
|
|
8095
|
-
requestDidSucceed: _requestDidSucceed
|
|
8405
|
+
requestDidSucceed: _requestDidSucceed,
|
|
8406
|
+
stateHandle: (_a = idxResponse.context) === null || _a === void 0 ? void 0 : _a.stateHandle,
|
|
8407
|
+
interactionHandle: meta === null || meta === void 0 ? void 0 : meta.interactionHandle
|
|
8096
8408
|
});
|
|
8097
8409
|
}
|
|
8098
8410
|
}
|
|
@@ -8250,52 +8562,6 @@ function _handleEmailVerifyCallback() {
|
|
|
8250
8562
|
return _handleEmailVerifyCallback.apply(this, arguments);
|
|
8251
8563
|
}
|
|
8252
8564
|
|
|
8253
|
-
function canProceed(authClient) {
|
|
8254
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8255
|
-
var meta = getSavedTransactionMeta(authClient, options);
|
|
8256
|
-
return !!(meta || options.stateHandle);
|
|
8257
|
-
}
|
|
8258
|
-
function proceed(_x) {
|
|
8259
|
-
return _proceed.apply(this, arguments);
|
|
8260
|
-
}
|
|
8261
|
-
function _proceed() {
|
|
8262
|
-
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
8263
|
-
var options,
|
|
8264
|
-
flow,
|
|
8265
|
-
state,
|
|
8266
|
-
meta,
|
|
8267
|
-
_args = arguments;
|
|
8268
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8269
|
-
while (1) {
|
|
8270
|
-
switch (_context.prev = _context.next) {
|
|
8271
|
-
case 0:
|
|
8272
|
-
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
8273
|
-
if (canProceed(authClient, options)) {
|
|
8274
|
-
_context.next = 3;
|
|
8275
|
-
break;
|
|
8276
|
-
}
|
|
8277
|
-
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
8278
|
-
case 3:
|
|
8279
|
-
flow = options.flow, state = options.state;
|
|
8280
|
-
if (!flow) {
|
|
8281
|
-
meta = getSavedTransactionMeta(authClient, {
|
|
8282
|
-
state: state
|
|
8283
|
-
});
|
|
8284
|
-
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
8285
|
-
}
|
|
8286
|
-
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
8287
|
-
flow: flow
|
|
8288
|
-
})));
|
|
8289
|
-
case 6:
|
|
8290
|
-
case "end":
|
|
8291
|
-
return _context.stop();
|
|
8292
|
-
}
|
|
8293
|
-
}
|
|
8294
|
-
}, _callee);
|
|
8295
|
-
}));
|
|
8296
|
-
return _proceed.apply(this, arguments);
|
|
8297
|
-
}
|
|
8298
|
-
|
|
8299
8565
|
function poll(_x) {
|
|
8300
8566
|
return _poll.apply(this, arguments);
|
|
8301
8567
|
}
|
|
@@ -8584,7 +8850,7 @@ function _unlockAccount() {
|
|
|
8584
8850
|
var OktaUserAgent = function () {
|
|
8585
8851
|
function OktaUserAgent() {
|
|
8586
8852
|
_classCallCheck(this, OktaUserAgent);
|
|
8587
|
-
this.environments = ["okta-auth-js/".concat("6.
|
|
8853
|
+
this.environments = ["okta-auth-js/".concat("6.5.0")];
|
|
8588
8854
|
}
|
|
8589
8855
|
_createClass(OktaUserAgent, [{
|
|
8590
8856
|
key: "addEnvironment",
|
|
@@ -8602,7 +8868,7 @@ var OktaUserAgent = function () {
|
|
|
8602
8868
|
}, {
|
|
8603
8869
|
key: "getVersion",
|
|
8604
8870
|
value: function getVersion() {
|
|
8605
|
-
return "6.
|
|
8871
|
+
return "6.5.0";
|
|
8606
8872
|
}
|
|
8607
8873
|
}, {
|
|
8608
8874
|
key: "maybeAddNodeEnvironment",
|