@okta/okta-auth-js 6.4.4 → 6.5.1
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 +29 -0
- package/README.md +1 -1
- package/cjs/OktaUserAgent.js +2 -2
- package/cjs/idx/flow/AuthenticationFlow.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/remediate.js +9 -9
- 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 +141 -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 +27 -14
- package/cjs/idx/run.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.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/types/index.js.map +1 -1
- package/cjs/idx/util.js +70 -22
- package/cjs/idx/util.js.map +1 -1
- package/cjs/options/index.js +6 -0
- package/cjs/options/index.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 +533 -257
- package/esm/esm.browser.js.map +1 -1
- package/esm/esm.node.mjs +533 -257
- package/esm/esm.node.mjs.map +1 -1
- package/lib/idx/interact.d.ts +1 -0
- package/lib/idx/remediate.d.ts +2 -1
- package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +1 -11
- package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +1 -0
- package/lib/idx/remediators/Base/AuthenticatorData.d.ts +5 -1
- package/lib/idx/remediators/Base/Remediator.d.ts +4 -3
- 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 +7 -3
- 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 +7 -3
- package/lib/idx/remediators/index.d.ts +1 -0
- package/lib/idx/types/api.d.ts +12 -2
- package/lib/idx/types/idx-js.d.ts +6 -2
- package/lib/idx/types/index.d.ts +1 -1
- package/lib/idx/types/options.d.ts +2 -0
- package/lib/idx/util.d.ts +4 -3
- package/lib/types/OktaAuthOptions.d.ts +1 -0
- package/package.json +5 -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);
|
|
@@ -4756,6 +4756,7 @@ function mergeOptions(options, args) {
|
|
|
4756
4756
|
}
|
|
4757
4757
|
function buildOptions() {
|
|
4758
4758
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4759
|
+
var _a;
|
|
4759
4760
|
assertValidConfig(args);
|
|
4760
4761
|
args = mergeOptions(getDefaultOptions(), args);
|
|
4761
4762
|
return removeNils({
|
|
@@ -4789,6 +4790,9 @@ function buildOptions() {
|
|
|
4789
4790
|
codeChallengeMethod: args.codeChallengeMethod,
|
|
4790
4791
|
recoveryToken: args.recoveryToken,
|
|
4791
4792
|
activationToken: args.activationToken,
|
|
4793
|
+
idx: {
|
|
4794
|
+
useGenericRemediator: !!((_a = args.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator)
|
|
4795
|
+
},
|
|
4792
4796
|
ignoreSignature: !!args.ignoreSignature,
|
|
4793
4797
|
clientSecret: args.clientSecret
|
|
4794
4798
|
});
|
|
@@ -4811,6 +4815,8 @@ function _createTransactionMeta() {
|
|
|
4811
4815
|
activationToken,
|
|
4812
4816
|
_Object$assign2$recov,
|
|
4813
4817
|
recoveryToken,
|
|
4818
|
+
_Object$assign2$maxAg,
|
|
4819
|
+
maxAge,
|
|
4814
4820
|
meta,
|
|
4815
4821
|
_args = arguments;
|
|
4816
4822
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -4823,12 +4829,13 @@ function _createTransactionMeta() {
|
|
|
4823
4829
|
case 3:
|
|
4824
4830
|
tokenParams = _context.sent;
|
|
4825
4831
|
pkceMeta = createOAuthMeta(authClient, tokenParams);
|
|
4826
|
-
_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;
|
|
4827
4833
|
meta = _Object$assign(_Object$assign({}, pkceMeta), {
|
|
4828
4834
|
flow: flow,
|
|
4829
4835
|
withCredentials: withCredentials,
|
|
4830
4836
|
activationToken: activationToken,
|
|
4831
|
-
recoveryToken: recoveryToken
|
|
4837
|
+
recoveryToken: recoveryToken,
|
|
4838
|
+
maxAge: maxAge
|
|
4832
4839
|
});
|
|
4833
4840
|
return _context.abrupt("return", meta);
|
|
4834
4841
|
case 8:
|
|
@@ -4956,6 +4963,7 @@ function _interact() {
|
|
|
4956
4963
|
codeChallengeMethod,
|
|
4957
4964
|
activationToken,
|
|
4958
4965
|
recoveryToken,
|
|
4966
|
+
maxAge,
|
|
4959
4967
|
clientSecret,
|
|
4960
4968
|
url,
|
|
4961
4969
|
params,
|
|
@@ -4982,31 +4990,30 @@ function _interact() {
|
|
|
4982
4990
|
case 7:
|
|
4983
4991
|
meta = _context.sent;
|
|
4984
4992
|
baseUrl = getOAuthBaseUrl(authClient);
|
|
4985
|
-
_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;
|
|
4986
4994
|
clientSecret = options.clientSecret || authClient.options.clientSecret;
|
|
4987
4995
|
withCredentials = withCredentials !== null && withCredentials !== void 0 ? withCredentials : true;
|
|
4988
4996
|
url = "".concat(baseUrl, "/v1/interact");
|
|
4989
|
-
params = {
|
|
4997
|
+
params = _Object$assign(_Object$assign(_Object$assign(_Object$assign({
|
|
4990
4998
|
client_id: clientId,
|
|
4991
4999
|
scope: scopes.join(' '),
|
|
4992
5000
|
redirect_uri: redirectUri,
|
|
4993
5001
|
code_challenge: codeChallenge,
|
|
4994
5002
|
code_challenge_method: codeChallengeMethod,
|
|
4995
5003
|
state: state
|
|
4996
|
-
}
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
}
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
}
|
|
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
|
+
});
|
|
5006
5013
|
headers = {
|
|
5007
5014
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
5008
5015
|
};
|
|
5009
|
-
_context.next =
|
|
5016
|
+
_context.next = 17;
|
|
5010
5017
|
return httpRequest(authClient, {
|
|
5011
5018
|
method: 'POST',
|
|
5012
5019
|
url: url,
|
|
@@ -5014,7 +5021,7 @@ function _interact() {
|
|
|
5014
5021
|
withCredentials: withCredentials,
|
|
5015
5022
|
args: params
|
|
5016
5023
|
});
|
|
5017
|
-
case
|
|
5024
|
+
case 17:
|
|
5018
5025
|
resp = _context.sent;
|
|
5019
5026
|
interactionHandle = resp.interaction_handle;
|
|
5020
5027
|
newMeta = _Object$assign(_Object$assign({}, meta), {
|
|
@@ -5027,7 +5034,7 @@ function _interact() {
|
|
|
5027
5034
|
});
|
|
5028
5035
|
saveTransactionMeta(authClient, newMeta);
|
|
5029
5036
|
return _context.abrupt("return", getResponse(newMeta));
|
|
5030
|
-
case
|
|
5037
|
+
case 22:
|
|
5031
5038
|
case "end":
|
|
5032
5039
|
return _context.stop();
|
|
5033
5040
|
}
|
|
@@ -5275,11 +5282,14 @@ var expandRelatesTo = function expandRelatesTo(idxResponse, value) {
|
|
|
5275
5282
|
});
|
|
5276
5283
|
};
|
|
5277
5284
|
var convertRemediationAction = function convertRemediationAction(authClient, remediation, toPersist) {
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
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;
|
|
5283
5293
|
};
|
|
5284
5294
|
var parseIdxResponse = function parseIdxResponse(authClient, idxResponse) {
|
|
5285
5295
|
var toPersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -5313,6 +5323,7 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5313
5323
|
var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(remediationChoice) {
|
|
5314
5324
|
var paramsFromUser,
|
|
5315
5325
|
remediationChoiceObject,
|
|
5326
|
+
actionFn,
|
|
5316
5327
|
_args = arguments;
|
|
5317
5328
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
5318
5329
|
while (1) {
|
|
@@ -5328,8 +5339,15 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
|
|
|
5328
5339
|
}
|
|
5329
5340
|
return _context.abrupt("return", _Promise.reject("Unknown remediation choice: [".concat(remediationChoice, "]")));
|
|
5330
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:
|
|
5331
5349
|
return _context.abrupt("return", remediationChoiceObject.action(paramsFromUser));
|
|
5332
|
-
case
|
|
5350
|
+
case 8:
|
|
5333
5351
|
case "end":
|
|
5334
5352
|
return _context.stop();
|
|
5335
5353
|
}
|
|
@@ -5660,7 +5678,7 @@ var Remediator = function () {
|
|
|
5660
5678
|
}
|
|
5661
5679
|
}, {
|
|
5662
5680
|
key: "getNextStep",
|
|
5663
|
-
value: function getNextStep(_context) {
|
|
5681
|
+
value: function getNextStep(_authClient, _context) {
|
|
5664
5682
|
var name = this.getName();
|
|
5665
5683
|
var inputs = this.getInputs();
|
|
5666
5684
|
var authenticator = this.getAuthenticator();
|
|
@@ -5797,11 +5815,11 @@ var Authenticator = function Authenticator(authenticator) {
|
|
|
5797
5815
|
this.meta = authenticator;
|
|
5798
5816
|
};
|
|
5799
5817
|
|
|
5800
|
-
function _createSuper$
|
|
5801
|
-
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; } }
|
|
5802
5820
|
var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
5803
5821
|
_inherits(VerificationCodeAuthenticator, _Authenticator);
|
|
5804
|
-
var _super = _createSuper$
|
|
5822
|
+
var _super = _createSuper$t(VerificationCodeAuthenticator);
|
|
5805
5823
|
function VerificationCodeAuthenticator() {
|
|
5806
5824
|
_classCallCheck(this, VerificationCodeAuthenticator);
|
|
5807
5825
|
return _super.apply(this, arguments);
|
|
@@ -5838,11 +5856,11 @@ var VerificationCodeAuthenticator = function (_Authenticator) {
|
|
|
5838
5856
|
return VerificationCodeAuthenticator;
|
|
5839
5857
|
}(Authenticator);
|
|
5840
5858
|
|
|
5841
|
-
function _createSuper$
|
|
5842
|
-
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; } }
|
|
5843
5861
|
var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
5844
5862
|
_inherits(OktaVerifyTotp, _VerificationCodeAuth);
|
|
5845
|
-
var _super = _createSuper$
|
|
5863
|
+
var _super = _createSuper$s(OktaVerifyTotp);
|
|
5846
5864
|
function OktaVerifyTotp() {
|
|
5847
5865
|
_classCallCheck(this, OktaVerifyTotp);
|
|
5848
5866
|
return _super.apply(this, arguments);
|
|
@@ -5862,11 +5880,11 @@ var OktaVerifyTotp = function (_VerificationCodeAuth) {
|
|
|
5862
5880
|
return OktaVerifyTotp;
|
|
5863
5881
|
}(VerificationCodeAuthenticator);
|
|
5864
5882
|
|
|
5865
|
-
function _createSuper$
|
|
5866
|
-
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; } }
|
|
5867
5885
|
var OktaPassword = function (_Authenticator) {
|
|
5868
5886
|
_inherits(OktaPassword, _Authenticator);
|
|
5869
|
-
var _super = _createSuper$
|
|
5887
|
+
var _super = _createSuper$r(OktaPassword);
|
|
5870
5888
|
function OktaPassword() {
|
|
5871
5889
|
_classCallCheck(this, OktaPassword);
|
|
5872
5890
|
return _super.apply(this, arguments);
|
|
@@ -5902,11 +5920,11 @@ var OktaPassword = function (_Authenticator) {
|
|
|
5902
5920
|
return OktaPassword;
|
|
5903
5921
|
}(Authenticator);
|
|
5904
5922
|
|
|
5905
|
-
function _createSuper$
|
|
5906
|
-
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; } }
|
|
5907
5925
|
var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
5908
5926
|
_inherits(SecurityQuestionEnrollment, _Authenticator);
|
|
5909
|
-
var _super = _createSuper$
|
|
5927
|
+
var _super = _createSuper$q(SecurityQuestionEnrollment);
|
|
5910
5928
|
function SecurityQuestionEnrollment() {
|
|
5911
5929
|
_classCallCheck(this, SecurityQuestionEnrollment);
|
|
5912
5930
|
return _super.apply(this, arguments);
|
|
@@ -5960,11 +5978,11 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
|
|
|
5960
5978
|
return SecurityQuestionEnrollment;
|
|
5961
5979
|
}(Authenticator);
|
|
5962
5980
|
|
|
5963
|
-
function _createSuper$
|
|
5964
|
-
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; } }
|
|
5965
5983
|
var SecurityQuestionVerification = function (_Authenticator) {
|
|
5966
5984
|
_inherits(SecurityQuestionVerification, _Authenticator);
|
|
5967
|
-
var _super = _createSuper$
|
|
5985
|
+
var _super = _createSuper$p(SecurityQuestionVerification);
|
|
5968
5986
|
function SecurityQuestionVerification() {
|
|
5969
5987
|
_classCallCheck(this, SecurityQuestionVerification);
|
|
5970
5988
|
return _super.apply(this, arguments);
|
|
@@ -6005,11 +6023,11 @@ var SecurityQuestionVerification = function (_Authenticator) {
|
|
|
6005
6023
|
return SecurityQuestionVerification;
|
|
6006
6024
|
}(Authenticator);
|
|
6007
6025
|
|
|
6008
|
-
function _createSuper$
|
|
6009
|
-
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; } }
|
|
6010
6028
|
var WebauthnEnrollment = function (_Authenticator) {
|
|
6011
6029
|
_inherits(WebauthnEnrollment, _Authenticator);
|
|
6012
|
-
var _super = _createSuper$
|
|
6030
|
+
var _super = _createSuper$o(WebauthnEnrollment);
|
|
6013
6031
|
function WebauthnEnrollment() {
|
|
6014
6032
|
_classCallCheck(this, WebauthnEnrollment);
|
|
6015
6033
|
return _super.apply(this, arguments);
|
|
@@ -6058,11 +6076,11 @@ var WebauthnEnrollment = function (_Authenticator) {
|
|
|
6058
6076
|
return WebauthnEnrollment;
|
|
6059
6077
|
}(Authenticator);
|
|
6060
6078
|
|
|
6061
|
-
function _createSuper$
|
|
6062
|
-
function _isNativeReflectConstruct$
|
|
6079
|
+
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); }; }
|
|
6080
|
+
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; } }
|
|
6063
6081
|
var WebauthnVerification = function (_Authenticator) {
|
|
6064
6082
|
_inherits(WebauthnVerification, _Authenticator);
|
|
6065
|
-
var _super = _createSuper$
|
|
6083
|
+
var _super = _createSuper$n(WebauthnVerification);
|
|
6066
6084
|
function WebauthnVerification() {
|
|
6067
6085
|
_classCallCheck(this, WebauthnVerification);
|
|
6068
6086
|
return _super.apply(this, arguments);
|
|
@@ -6146,11 +6164,11 @@ function getAuthenticator(remediation) {
|
|
|
6146
6164
|
}
|
|
6147
6165
|
}
|
|
6148
6166
|
|
|
6149
|
-
function _createSuper$
|
|
6150
|
-
function _isNativeReflectConstruct$
|
|
6167
|
+
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); }; }
|
|
6168
|
+
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; } }
|
|
6151
6169
|
var VerifyAuthenticator = function (_Remediator) {
|
|
6152
6170
|
_inherits(VerifyAuthenticator, _Remediator);
|
|
6153
|
-
var _super = _createSuper$
|
|
6171
|
+
var _super = _createSuper$m(VerifyAuthenticator);
|
|
6154
6172
|
function VerifyAuthenticator(remediation) {
|
|
6155
6173
|
var _this;
|
|
6156
6174
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6161,9 +6179,9 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6161
6179
|
}
|
|
6162
6180
|
_createClass(VerifyAuthenticator, [{
|
|
6163
6181
|
key: "getNextStep",
|
|
6164
|
-
value: function getNextStep(context) {
|
|
6182
|
+
value: function getNextStep(authClient, context) {
|
|
6165
6183
|
var _a;
|
|
6166
|
-
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, context);
|
|
6184
|
+
var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6167
6185
|
var authenticatorEnrollments = (_a = context === null || context === void 0 ? void 0 : context.authenticatorEnrollments) === null || _a === void 0 ? void 0 : _a.value;
|
|
6168
6186
|
return _Object$assign(_Object$assign({}, nextStep), {
|
|
6169
6187
|
authenticatorEnrollments: authenticatorEnrollments
|
|
@@ -6201,11 +6219,11 @@ var VerifyAuthenticator = function (_Remediator) {
|
|
|
6201
6219
|
return VerifyAuthenticator;
|
|
6202
6220
|
}(Remediator);
|
|
6203
6221
|
|
|
6204
|
-
function _createSuper$
|
|
6205
|
-
function _isNativeReflectConstruct$
|
|
6222
|
+
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); }; }
|
|
6223
|
+
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; } }
|
|
6206
6224
|
var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
6207
6225
|
_inherits(EnrollAuthenticator, _VerifyAuthenticator);
|
|
6208
|
-
var _super = _createSuper$
|
|
6226
|
+
var _super = _createSuper$l(EnrollAuthenticator);
|
|
6209
6227
|
function EnrollAuthenticator() {
|
|
6210
6228
|
_classCallCheck(this, EnrollAuthenticator);
|
|
6211
6229
|
return _super.apply(this, arguments);
|
|
@@ -6214,11 +6232,11 @@ var EnrollAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6214
6232
|
}(VerifyAuthenticator);
|
|
6215
6233
|
EnrollAuthenticator.remediationName = 'enroll-authenticator';
|
|
6216
6234
|
|
|
6217
|
-
function _createSuper$
|
|
6218
|
-
function _isNativeReflectConstruct$
|
|
6235
|
+
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); }; }
|
|
6236
|
+
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; } }
|
|
6219
6237
|
var EnrollPoll = function (_Remediator) {
|
|
6220
6238
|
_inherits(EnrollPoll, _Remediator);
|
|
6221
|
-
var _super = _createSuper$
|
|
6239
|
+
var _super = _createSuper$k(EnrollPoll);
|
|
6222
6240
|
function EnrollPoll() {
|
|
6223
6241
|
_classCallCheck(this, EnrollPoll);
|
|
6224
6242
|
return _super.apply(this, arguments);
|
|
@@ -6230,8 +6248,8 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6230
6248
|
}
|
|
6231
6249
|
}, {
|
|
6232
6250
|
key: "getNextStep",
|
|
6233
|
-
value: function getNextStep(context) {
|
|
6234
|
-
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, context);
|
|
6251
|
+
value: function getNextStep(authClient, context) {
|
|
6252
|
+
var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6235
6253
|
var authenticator = this.getAuthenticator();
|
|
6236
6254
|
if (!authenticator && (context === null || context === void 0 ? void 0 : context.currentAuthenticator)) {
|
|
6237
6255
|
authenticator = context.currentAuthenticator.value;
|
|
@@ -6261,11 +6279,11 @@ var EnrollPoll = function (_Remediator) {
|
|
|
6261
6279
|
}(Remediator);
|
|
6262
6280
|
EnrollPoll.remediationName = 'enroll-poll';
|
|
6263
6281
|
|
|
6264
|
-
function _createSuper$
|
|
6265
|
-
function _isNativeReflectConstruct$
|
|
6282
|
+
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); }; }
|
|
6283
|
+
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; } }
|
|
6266
6284
|
var SelectEnrollmentChannel = function (_Remediator) {
|
|
6267
6285
|
_inherits(SelectEnrollmentChannel, _Remediator);
|
|
6268
|
-
var _super = _createSuper$
|
|
6286
|
+
var _super = _createSuper$j(SelectEnrollmentChannel);
|
|
6269
6287
|
function SelectEnrollmentChannel() {
|
|
6270
6288
|
_classCallCheck(this, SelectEnrollmentChannel);
|
|
6271
6289
|
return _super.apply(this, arguments);
|
|
@@ -6277,8 +6295,8 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6277
6295
|
}
|
|
6278
6296
|
}, {
|
|
6279
6297
|
key: "getNextStep",
|
|
6280
|
-
value: function getNextStep(context) {
|
|
6281
|
-
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this);
|
|
6298
|
+
value: function getNextStep(authClient, context) {
|
|
6299
|
+
var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6282
6300
|
var options = this.getChannels();
|
|
6283
6301
|
var authenticator = context.currentAuthenticator.value;
|
|
6284
6302
|
return _Object$assign(_Object$assign(_Object$assign({}, common), options && {
|
|
@@ -6328,11 +6346,11 @@ var SelectEnrollmentChannel = function (_Remediator) {
|
|
|
6328
6346
|
}(Remediator);
|
|
6329
6347
|
SelectEnrollmentChannel.remediationName = 'select-enrollment-channel';
|
|
6330
6348
|
|
|
6331
|
-
function _createSuper$
|
|
6332
|
-
function _isNativeReflectConstruct$
|
|
6349
|
+
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); }; }
|
|
6350
|
+
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; } }
|
|
6333
6351
|
var EnrollmentChannelData = function (_Remediator) {
|
|
6334
6352
|
_inherits(EnrollmentChannelData, _Remediator);
|
|
6335
|
-
var _super = _createSuper$
|
|
6353
|
+
var _super = _createSuper$i(EnrollmentChannelData);
|
|
6336
6354
|
function EnrollmentChannelData() {
|
|
6337
6355
|
_classCallCheck(this, EnrollmentChannelData);
|
|
6338
6356
|
return _super.apply(this, arguments);
|
|
@@ -6364,8 +6382,8 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6364
6382
|
}
|
|
6365
6383
|
}, {
|
|
6366
6384
|
key: "getNextStep",
|
|
6367
|
-
value: function getNextStep(context) {
|
|
6368
|
-
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this);
|
|
6385
|
+
value: function getNextStep(authClient, context) {
|
|
6386
|
+
var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this, authClient, context);
|
|
6369
6387
|
var authenticator = context.currentAuthenticator.value;
|
|
6370
6388
|
return _Object$assign(_Object$assign({}, common), {
|
|
6371
6389
|
authenticator: authenticator
|
|
@@ -6398,11 +6416,11 @@ var EnrollmentChannelData = function (_Remediator) {
|
|
|
6398
6416
|
}(Remediator);
|
|
6399
6417
|
EnrollmentChannelData.remediationName = 'enrollment-channel-data';
|
|
6400
6418
|
|
|
6401
|
-
function _createSuper$
|
|
6402
|
-
function _isNativeReflectConstruct$
|
|
6419
|
+
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); }; }
|
|
6420
|
+
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; } }
|
|
6403
6421
|
var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
6404
6422
|
_inherits(ChallengeAuthenticator, _VerifyAuthenticator);
|
|
6405
|
-
var _super = _createSuper$
|
|
6423
|
+
var _super = _createSuper$h(ChallengeAuthenticator);
|
|
6406
6424
|
function ChallengeAuthenticator() {
|
|
6407
6425
|
_classCallCheck(this, ChallengeAuthenticator);
|
|
6408
6426
|
return _super.apply(this, arguments);
|
|
@@ -6411,11 +6429,11 @@ var ChallengeAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6411
6429
|
}(VerifyAuthenticator);
|
|
6412
6430
|
ChallengeAuthenticator.remediationName = 'challenge-authenticator';
|
|
6413
6431
|
|
|
6414
|
-
function _createSuper$
|
|
6415
|
-
function _isNativeReflectConstruct$
|
|
6432
|
+
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); }; }
|
|
6433
|
+
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; } }
|
|
6416
6434
|
var ChallengePoll = function (_EnrollPoll) {
|
|
6417
6435
|
_inherits(ChallengePoll, _EnrollPoll);
|
|
6418
|
-
var _super = _createSuper$
|
|
6436
|
+
var _super = _createSuper$g(ChallengePoll);
|
|
6419
6437
|
function ChallengePoll() {
|
|
6420
6438
|
_classCallCheck(this, ChallengePoll);
|
|
6421
6439
|
return _super.apply(this, arguments);
|
|
@@ -6430,11 +6448,11 @@ var ChallengePoll = function (_EnrollPoll) {
|
|
|
6430
6448
|
}(EnrollPoll);
|
|
6431
6449
|
ChallengePoll.remediationName = 'challenge-poll';
|
|
6432
6450
|
|
|
6433
|
-
function _createSuper$
|
|
6434
|
-
function _isNativeReflectConstruct$
|
|
6451
|
+
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); }; }
|
|
6452
|
+
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; } }
|
|
6435
6453
|
var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
6436
6454
|
_inherits(ResetAuthenticator, _VerifyAuthenticator);
|
|
6437
|
-
var _super = _createSuper$
|
|
6455
|
+
var _super = _createSuper$f(ResetAuthenticator);
|
|
6438
6456
|
function ResetAuthenticator() {
|
|
6439
6457
|
_classCallCheck(this, ResetAuthenticator);
|
|
6440
6458
|
return _super.apply(this, arguments);
|
|
@@ -6443,11 +6461,11 @@ var ResetAuthenticator = function (_VerifyAuthenticator) {
|
|
|
6443
6461
|
}(VerifyAuthenticator);
|
|
6444
6462
|
ResetAuthenticator.remediationName = 'reset-authenticator';
|
|
6445
6463
|
|
|
6446
|
-
function _createSuper$
|
|
6447
|
-
function _isNativeReflectConstruct$
|
|
6464
|
+
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); }; }
|
|
6465
|
+
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; } }
|
|
6448
6466
|
var EnrollProfile = function (_Remediator) {
|
|
6449
6467
|
_inherits(EnrollProfile, _Remediator);
|
|
6450
|
-
var _super = _createSuper$
|
|
6468
|
+
var _super = _createSuper$e(EnrollProfile);
|
|
6451
6469
|
function EnrollProfile() {
|
|
6452
6470
|
_classCallCheck(this, EnrollProfile);
|
|
6453
6471
|
return _super.apply(this, arguments);
|
|
@@ -6509,11 +6527,11 @@ var EnrollProfile = function (_Remediator) {
|
|
|
6509
6527
|
}(Remediator);
|
|
6510
6528
|
EnrollProfile.remediationName = 'enroll-profile';
|
|
6511
6529
|
|
|
6512
|
-
function _createSuper$
|
|
6513
|
-
function _isNativeReflectConstruct$
|
|
6530
|
+
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); }; }
|
|
6531
|
+
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; } }
|
|
6514
6532
|
var Identify = function (_Remediator) {
|
|
6515
6533
|
_inherits(Identify, _Remediator);
|
|
6516
|
-
var _super = _createSuper$
|
|
6534
|
+
var _super = _createSuper$d(Identify);
|
|
6517
6535
|
function Identify() {
|
|
6518
6536
|
var _this;
|
|
6519
6537
|
_classCallCheck(this, Identify);
|
|
@@ -6556,11 +6574,11 @@ var Identify = function (_Remediator) {
|
|
|
6556
6574
|
}(Remediator);
|
|
6557
6575
|
Identify.remediationName = 'identify';
|
|
6558
6576
|
|
|
6559
|
-
function _createSuper$
|
|
6560
|
-
function _isNativeReflectConstruct$
|
|
6577
|
+
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); }; }
|
|
6578
|
+
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; } }
|
|
6561
6579
|
var ReEnrollAuthenticator = function (_Remediator) {
|
|
6562
6580
|
_inherits(ReEnrollAuthenticator, _Remediator);
|
|
6563
|
-
var _super = _createSuper$
|
|
6581
|
+
var _super = _createSuper$c(ReEnrollAuthenticator);
|
|
6564
6582
|
function ReEnrollAuthenticator() {
|
|
6565
6583
|
_classCallCheck(this, ReEnrollAuthenticator);
|
|
6566
6584
|
return _super.apply(this, arguments);
|
|
@@ -6590,11 +6608,11 @@ var ReEnrollAuthenticator = function (_Remediator) {
|
|
|
6590
6608
|
}(Remediator);
|
|
6591
6609
|
ReEnrollAuthenticator.remediationName = 'reenroll-authenticator';
|
|
6592
6610
|
|
|
6593
|
-
function _createSuper$
|
|
6594
|
-
function _isNativeReflectConstruct$
|
|
6611
|
+
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); }; }
|
|
6612
|
+
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; } }
|
|
6595
6613
|
var RedirectIdp = function (_Remediator) {
|
|
6596
6614
|
_inherits(RedirectIdp, _Remediator);
|
|
6597
|
-
var _super = _createSuper$
|
|
6615
|
+
var _super = _createSuper$b(RedirectIdp);
|
|
6598
6616
|
function RedirectIdp() {
|
|
6599
6617
|
_classCallCheck(this, RedirectIdp);
|
|
6600
6618
|
return _super.apply(this, arguments);
|
|
@@ -6625,13 +6643,13 @@ var RedirectIdp = function (_Remediator) {
|
|
|
6625
6643
|
RedirectIdp.remediationName = 'redirect-idp';
|
|
6626
6644
|
|
|
6627
6645
|
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; } } }; }
|
|
6628
|
-
function _unsupportedIterableToArray$2(o, minLen) { var
|
|
6646
|
+
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); }
|
|
6629
6647
|
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; }
|
|
6630
|
-
function _createSuper$
|
|
6631
|
-
function _isNativeReflectConstruct$
|
|
6648
|
+
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); }; }
|
|
6649
|
+
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; } }
|
|
6632
6650
|
var SelectAuthenticator = function (_Remediator) {
|
|
6633
6651
|
_inherits(SelectAuthenticator, _Remediator);
|
|
6634
|
-
var _super = _createSuper$
|
|
6652
|
+
var _super = _createSuper$a(SelectAuthenticator);
|
|
6635
6653
|
function SelectAuthenticator() {
|
|
6636
6654
|
_classCallCheck(this, SelectAuthenticator);
|
|
6637
6655
|
return _super.apply(this, arguments);
|
|
@@ -6687,9 +6705,9 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6687
6705
|
}
|
|
6688
6706
|
}, {
|
|
6689
6707
|
key: "getNextStep",
|
|
6690
|
-
value: function getNextStep() {
|
|
6708
|
+
value: function getNextStep(authClient) {
|
|
6691
6709
|
var _context;
|
|
6692
|
-
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this);
|
|
6710
|
+
var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this, authClient);
|
|
6693
6711
|
var authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation);
|
|
6694
6712
|
var options = _mapInstanceProperty(_context = authenticatorFromRemediation.options).call(_context, function (option) {
|
|
6695
6713
|
var label = option.label,
|
|
@@ -6728,19 +6746,29 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6728
6746
|
}
|
|
6729
6747
|
}, {
|
|
6730
6748
|
key: "getInputAuthenticator",
|
|
6731
|
-
value: function getInputAuthenticator() {
|
|
6749
|
+
value: function getInputAuthenticator(remediation) {
|
|
6750
|
+
var _context3;
|
|
6751
|
+
var options = _mapInstanceProperty(_context3 = remediation.options).call(_context3, function (_ref3) {
|
|
6752
|
+
var label = _ref3.label,
|
|
6753
|
+
relatesTo = _ref3.relatesTo;
|
|
6754
|
+
return {
|
|
6755
|
+
label: label,
|
|
6756
|
+
value: relatesTo.key
|
|
6757
|
+
};
|
|
6758
|
+
});
|
|
6732
6759
|
return {
|
|
6733
6760
|
name: 'authenticator',
|
|
6734
|
-
|
|
6761
|
+
type: 'string',
|
|
6762
|
+
options: options
|
|
6735
6763
|
};
|
|
6736
6764
|
}
|
|
6737
6765
|
}, {
|
|
6738
6766
|
key: "getValuesAfterProceed",
|
|
6739
6767
|
value: function getValuesAfterProceed() {
|
|
6740
|
-
var
|
|
6768
|
+
var _context4,
|
|
6741
6769
|
_this = this;
|
|
6742
6770
|
this.values = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getValuesAfterProceed", this).call(this);
|
|
6743
|
-
var authenticators = _filterInstanceProperty(
|
|
6771
|
+
var authenticators = _filterInstanceProperty(_context4 = _valuesInstanceProperty(this).authenticators).call(_context4, function (authenticator) {
|
|
6744
6772
|
return compareAuthenticators(authenticator, _this.selectedAuthenticator) !== true;
|
|
6745
6773
|
});
|
|
6746
6774
|
return _Object$assign(_Object$assign({}, _valuesInstanceProperty(this)), {
|
|
@@ -6751,11 +6779,11 @@ var SelectAuthenticator = function (_Remediator) {
|
|
|
6751
6779
|
return SelectAuthenticator;
|
|
6752
6780
|
}(Remediator);
|
|
6753
6781
|
|
|
6754
|
-
function _createSuper$
|
|
6755
|
-
function _isNativeReflectConstruct$
|
|
6782
|
+
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); }; }
|
|
6783
|
+
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; } }
|
|
6756
6784
|
var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
6757
6785
|
_inherits(SelectAuthenticatorAuthenticate, _SelectAuthenticator);
|
|
6758
|
-
var _super = _createSuper$
|
|
6786
|
+
var _super = _createSuper$9(SelectAuthenticatorAuthenticate);
|
|
6759
6787
|
function SelectAuthenticatorAuthenticate(remediation) {
|
|
6760
6788
|
var _this;
|
|
6761
6789
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6780,11 +6808,11 @@ var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
|
|
|
6780
6808
|
}(SelectAuthenticator);
|
|
6781
6809
|
SelectAuthenticatorAuthenticate.remediationName = 'select-authenticator-authenticate';
|
|
6782
6810
|
|
|
6783
|
-
function _createSuper$
|
|
6784
|
-
function _isNativeReflectConstruct$
|
|
6811
|
+
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); }; }
|
|
6812
|
+
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; } }
|
|
6785
6813
|
var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
6786
6814
|
_inherits(SelectAuthenticatorEnroll, _SelectAuthenticator);
|
|
6787
|
-
var _super = _createSuper$
|
|
6815
|
+
var _super = _createSuper$8(SelectAuthenticatorEnroll);
|
|
6788
6816
|
function SelectAuthenticatorEnroll() {
|
|
6789
6817
|
_classCallCheck(this, SelectAuthenticatorEnroll);
|
|
6790
6818
|
return _super.apply(this, arguments);
|
|
@@ -6793,11 +6821,11 @@ var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
|
|
|
6793
6821
|
}(SelectAuthenticator);
|
|
6794
6822
|
SelectAuthenticatorEnroll.remediationName = 'select-authenticator-enroll';
|
|
6795
6823
|
|
|
6796
|
-
function _createSuper$
|
|
6797
|
-
function _isNativeReflectConstruct$
|
|
6824
|
+
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); }; }
|
|
6825
|
+
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; } }
|
|
6798
6826
|
var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
6799
6827
|
_inherits(SelectAuthenticatorUnlockAccount, _SelectAuthenticator);
|
|
6800
|
-
var _super = _createSuper$
|
|
6828
|
+
var _super = _createSuper$7(SelectAuthenticatorUnlockAccount);
|
|
6801
6829
|
function SelectAuthenticatorUnlockAccount() {
|
|
6802
6830
|
var _this;
|
|
6803
6831
|
_classCallCheck(this, SelectAuthenticatorUnlockAccount);
|
|
@@ -6836,7 +6864,7 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6836
6864
|
value: function getInputUsername() {
|
|
6837
6865
|
return {
|
|
6838
6866
|
name: 'username',
|
|
6839
|
-
|
|
6867
|
+
type: 'string'
|
|
6840
6868
|
};
|
|
6841
6869
|
}
|
|
6842
6870
|
}]);
|
|
@@ -6844,11 +6872,11 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
|
|
|
6844
6872
|
}(SelectAuthenticator);
|
|
6845
6873
|
SelectAuthenticatorUnlockAccount.remediationName = 'select-authenticator-unlock-account';
|
|
6846
6874
|
|
|
6847
|
-
function _createSuper$
|
|
6848
|
-
function _isNativeReflectConstruct$
|
|
6875
|
+
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); }; }
|
|
6876
|
+
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; } }
|
|
6849
6877
|
var SelectEnrollProfile = function (_Remediator) {
|
|
6850
6878
|
_inherits(SelectEnrollProfile, _Remediator);
|
|
6851
|
-
var _super = _createSuper$
|
|
6879
|
+
var _super = _createSuper$6(SelectEnrollProfile);
|
|
6852
6880
|
function SelectEnrollProfile() {
|
|
6853
6881
|
_classCallCheck(this, SelectEnrollProfile);
|
|
6854
6882
|
return _super.apply(this, arguments);
|
|
@@ -6863,11 +6891,11 @@ var SelectEnrollProfile = function (_Remediator) {
|
|
|
6863
6891
|
}(Remediator);
|
|
6864
6892
|
SelectEnrollProfile.remediationName = 'select-enroll-profile';
|
|
6865
6893
|
|
|
6866
|
-
function _createSuper$
|
|
6867
|
-
function _isNativeReflectConstruct$
|
|
6894
|
+
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); }; }
|
|
6895
|
+
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; } }
|
|
6868
6896
|
var AuthenticatorData = function (_Remediator) {
|
|
6869
6897
|
_inherits(AuthenticatorData, _Remediator);
|
|
6870
|
-
var _super = _createSuper$
|
|
6898
|
+
var _super = _createSuper$5(AuthenticatorData);
|
|
6871
6899
|
function AuthenticatorData(remediation) {
|
|
6872
6900
|
var _this;
|
|
6873
6901
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -6916,8 +6944,8 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6916
6944
|
}
|
|
6917
6945
|
}, {
|
|
6918
6946
|
key: "getNextStep",
|
|
6919
|
-
value: function getNextStep() {
|
|
6920
|
-
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this);
|
|
6947
|
+
value: function getNextStep(authClient) {
|
|
6948
|
+
var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this, authClient);
|
|
6921
6949
|
var options = this.getMethodTypes();
|
|
6922
6950
|
return _Object$assign(_Object$assign({}, common), options && {
|
|
6923
6951
|
options: options
|
|
@@ -6981,11 +7009,11 @@ var AuthenticatorData = function (_Remediator) {
|
|
|
6981
7009
|
return AuthenticatorData;
|
|
6982
7010
|
}(Remediator);
|
|
6983
7011
|
|
|
6984
|
-
function _createSuper$
|
|
6985
|
-
function _isNativeReflectConstruct$
|
|
7012
|
+
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); }; }
|
|
7013
|
+
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; } }
|
|
6986
7014
|
var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
6987
7015
|
_inherits(AuthenticatorVerificationData, _AuthenticatorData);
|
|
6988
|
-
var _super = _createSuper$
|
|
7016
|
+
var _super = _createSuper$4(AuthenticatorVerificationData);
|
|
6989
7017
|
function AuthenticatorVerificationData(remediation) {
|
|
6990
7018
|
var _this;
|
|
6991
7019
|
var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -7036,7 +7064,8 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
7036
7064
|
return {
|
|
7037
7065
|
name: 'methodType',
|
|
7038
7066
|
type: 'string',
|
|
7039
|
-
required: true
|
|
7067
|
+
required: true,
|
|
7068
|
+
options: methodType.options
|
|
7040
7069
|
};
|
|
7041
7070
|
}
|
|
7042
7071
|
var inputs = _toConsumableArray(authenticator.form.value);
|
|
@@ -7060,11 +7089,11 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
|
|
|
7060
7089
|
}(AuthenticatorData);
|
|
7061
7090
|
AuthenticatorVerificationData.remediationName = 'authenticator-verification-data';
|
|
7062
7091
|
|
|
7063
|
-
function _createSuper$
|
|
7064
|
-
function _isNativeReflectConstruct$
|
|
7092
|
+
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); }; }
|
|
7093
|
+
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; } }
|
|
7065
7094
|
var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
7066
7095
|
_inherits(AuthenticatorEnrollmentData, _AuthenticatorData);
|
|
7067
|
-
var _super = _createSuper$
|
|
7096
|
+
var _super = _createSuper$3(AuthenticatorEnrollmentData);
|
|
7068
7097
|
function AuthenticatorEnrollmentData() {
|
|
7069
7098
|
_classCallCheck(this, AuthenticatorEnrollmentData);
|
|
7070
7099
|
return _super.apply(this, arguments);
|
|
@@ -7086,17 +7115,22 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
7086
7115
|
}
|
|
7087
7116
|
}, {
|
|
7088
7117
|
key: "getInputAuthenticator",
|
|
7089
|
-
value: function getInputAuthenticator() {
|
|
7090
|
-
|
|
7118
|
+
value: function getInputAuthenticator(remediation) {
|
|
7119
|
+
var _context2;
|
|
7120
|
+
return _mapInstanceProperty(_context2 = [{
|
|
7091
7121
|
name: 'methodType',
|
|
7092
|
-
type: 'string'
|
|
7093
|
-
required: true
|
|
7122
|
+
type: 'string'
|
|
7094
7123
|
}, {
|
|
7095
7124
|
name: 'phoneNumber',
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7125
|
+
label: 'Phone Number',
|
|
7126
|
+
type: 'string'
|
|
7127
|
+
}]).call(_context2, function (item) {
|
|
7128
|
+
var _context3;
|
|
7129
|
+
var value = _findInstanceProperty(_context3 = remediation.form.value).call(_context3, function (val) {
|
|
7130
|
+
return val.name === item.name;
|
|
7131
|
+
});
|
|
7132
|
+
return _Object$assign(_Object$assign({}, value), item);
|
|
7133
|
+
});
|
|
7100
7134
|
}
|
|
7101
7135
|
}, {
|
|
7102
7136
|
key: "mapAuthenticatorDataFromValues",
|
|
@@ -7115,11 +7149,11 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
|
|
|
7115
7149
|
}(AuthenticatorData);
|
|
7116
7150
|
AuthenticatorEnrollmentData.remediationName = 'authenticator-enrollment-data';
|
|
7117
7151
|
|
|
7118
|
-
function _createSuper$
|
|
7119
|
-
function _isNativeReflectConstruct$
|
|
7152
|
+
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); }; }
|
|
7153
|
+
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; } }
|
|
7120
7154
|
var Skip = function (_Remediator) {
|
|
7121
7155
|
_inherits(Skip, _Remediator);
|
|
7122
|
-
var _super = _createSuper$
|
|
7156
|
+
var _super = _createSuper$2(Skip);
|
|
7123
7157
|
function Skip() {
|
|
7124
7158
|
_classCallCheck(this, Skip);
|
|
7125
7159
|
return _super.apply(this, arguments);
|
|
@@ -7134,6 +7168,231 @@ var Skip = function (_Remediator) {
|
|
|
7134
7168
|
}(Remediator);
|
|
7135
7169
|
Skip.remediationName = 'skip';
|
|
7136
7170
|
|
|
7171
|
+
function unwrapFormValue(remediation) {
|
|
7172
|
+
var res = {};
|
|
7173
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(remediation); _i < _Object$entries$1.length; _i++) {
|
|
7174
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 2),
|
|
7175
|
+
key = _Object$entries$_i[0],
|
|
7176
|
+
value = _Object$entries$_i[1];
|
|
7177
|
+
if (value === null || typeof value === 'undefined') {
|
|
7178
|
+
continue;
|
|
7179
|
+
}
|
|
7180
|
+
if (Array.isArray(value)) {
|
|
7181
|
+
res[key] = _mapInstanceProperty(value).call(value, unwrapFormValue);
|
|
7182
|
+
} else if (_typeof(value) === 'object') {
|
|
7183
|
+
var _context, _context2;
|
|
7184
|
+
var formKeys = _Object$keys(value);
|
|
7185
|
+
if (_includesInstanceProperty(_context = ['value', 'form']).call(_context, key) && formKeys.length === 1 && _includesInstanceProperty(_context2 = ['value', 'form']).call(_context2, formKeys[0])) {
|
|
7186
|
+
var unwrappedForm = unwrapFormValue(value);
|
|
7187
|
+
_Object$entries(unwrappedForm).forEach(function (_ref) {
|
|
7188
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
7189
|
+
key = _ref2[0],
|
|
7190
|
+
value = _ref2[1];
|
|
7191
|
+
res[key] = value;
|
|
7192
|
+
});
|
|
7193
|
+
} else {
|
|
7194
|
+
res[key] = unwrapFormValue(value);
|
|
7195
|
+
}
|
|
7196
|
+
} else {
|
|
7197
|
+
res[key] = value;
|
|
7198
|
+
}
|
|
7199
|
+
}
|
|
7200
|
+
return res;
|
|
7201
|
+
}
|
|
7202
|
+
function hasValidInputValue(input, values) {
|
|
7203
|
+
var fn = function fn(input, values, requiredTracker) {
|
|
7204
|
+
var name = input.name,
|
|
7205
|
+
value = input.value,
|
|
7206
|
+
type = input.type,
|
|
7207
|
+
options = input.options,
|
|
7208
|
+
required = input.required;
|
|
7209
|
+
var isRequired = required || requiredTracker;
|
|
7210
|
+
if (Array.isArray(value)) {
|
|
7211
|
+
return _reduceInstanceProperty(value).call(value, function (acc, item) {
|
|
7212
|
+
return acc && fn(item, values[name], isRequired);
|
|
7213
|
+
}, true);
|
|
7214
|
+
}
|
|
7215
|
+
if (options) {
|
|
7216
|
+
if (type === 'object') {
|
|
7217
|
+
var _context4, _context5;
|
|
7218
|
+
var selectedOption = values[name];
|
|
7219
|
+
if (!(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.id)) {
|
|
7220
|
+
return false;
|
|
7221
|
+
}
|
|
7222
|
+
var optionSchema = _findInstanceProperty(options).call(options, function (option) {
|
|
7223
|
+
var _context3;
|
|
7224
|
+
var idSchema = _findInstanceProperty(_context3 = option.value).call(_context3, function (_ref3) {
|
|
7225
|
+
var name = _ref3.name;
|
|
7226
|
+
return name === 'id';
|
|
7227
|
+
});
|
|
7228
|
+
return idSchema.value === selectedOption.id;
|
|
7229
|
+
});
|
|
7230
|
+
if (!optionSchema) {
|
|
7231
|
+
return false;
|
|
7232
|
+
}
|
|
7233
|
+
return _reduceInstanceProperty(_context4 = _filterInstanceProperty(_context5 = optionSchema.value).call(_context5, function (_ref4) {
|
|
7234
|
+
var required = _ref4.required;
|
|
7235
|
+
return !!required;
|
|
7236
|
+
})).call(_context4, function (acc, _ref5) {
|
|
7237
|
+
var name = _ref5.name;
|
|
7238
|
+
return acc && !!selectedOption[name];
|
|
7239
|
+
}, true);
|
|
7240
|
+
}
|
|
7241
|
+
if (required === false) {
|
|
7242
|
+
return true;
|
|
7243
|
+
}
|
|
7244
|
+
if (required === true) {
|
|
7245
|
+
return !!values[name];
|
|
7246
|
+
}
|
|
7247
|
+
throw new AuthSdkError("Unknown options type, ".concat(_JSON$stringify(input)));
|
|
7248
|
+
}
|
|
7249
|
+
if (!isRequired) {
|
|
7250
|
+
return true;
|
|
7251
|
+
}
|
|
7252
|
+
return !!(values && values[name]);
|
|
7253
|
+
};
|
|
7254
|
+
return fn(input, values, false);
|
|
7255
|
+
}
|
|
7256
|
+
|
|
7257
|
+
function canProceed(authClient) {
|
|
7258
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7259
|
+
var meta = getSavedTransactionMeta(authClient, options);
|
|
7260
|
+
return !!(meta || options.stateHandle);
|
|
7261
|
+
}
|
|
7262
|
+
function proceed(_x) {
|
|
7263
|
+
return _proceed.apply(this, arguments);
|
|
7264
|
+
}
|
|
7265
|
+
function _proceed() {
|
|
7266
|
+
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
7267
|
+
var options,
|
|
7268
|
+
flow,
|
|
7269
|
+
state,
|
|
7270
|
+
meta,
|
|
7271
|
+
_args = arguments;
|
|
7272
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7273
|
+
while (1) {
|
|
7274
|
+
switch (_context.prev = _context.next) {
|
|
7275
|
+
case 0:
|
|
7276
|
+
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
7277
|
+
if (canProceed(authClient, options)) {
|
|
7278
|
+
_context.next = 3;
|
|
7279
|
+
break;
|
|
7280
|
+
}
|
|
7281
|
+
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
7282
|
+
case 3:
|
|
7283
|
+
flow = options.flow, state = options.state;
|
|
7284
|
+
if (!flow) {
|
|
7285
|
+
meta = getSavedTransactionMeta(authClient, {
|
|
7286
|
+
state: state
|
|
7287
|
+
});
|
|
7288
|
+
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
7289
|
+
}
|
|
7290
|
+
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
7291
|
+
flow: flow
|
|
7292
|
+
})));
|
|
7293
|
+
case 6:
|
|
7294
|
+
case "end":
|
|
7295
|
+
return _context.stop();
|
|
7296
|
+
}
|
|
7297
|
+
}
|
|
7298
|
+
}, _callee);
|
|
7299
|
+
}));
|
|
7300
|
+
return _proceed.apply(this, arguments);
|
|
7301
|
+
}
|
|
7302
|
+
|
|
7303
|
+
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); }; }
|
|
7304
|
+
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; } }
|
|
7305
|
+
var GenericRemediator = function (_Remediator) {
|
|
7306
|
+
_inherits(GenericRemediator, _Remediator);
|
|
7307
|
+
var _super = _createSuper$1(GenericRemediator);
|
|
7308
|
+
function GenericRemediator() {
|
|
7309
|
+
_classCallCheck(this, GenericRemediator);
|
|
7310
|
+
return _super.apply(this, arguments);
|
|
7311
|
+
}
|
|
7312
|
+
_createClass(GenericRemediator, [{
|
|
7313
|
+
key: "canRemediate",
|
|
7314
|
+
value: function canRemediate() {
|
|
7315
|
+
var _this = this;
|
|
7316
|
+
if (typeof this.remediation.action !== 'function') {
|
|
7317
|
+
return false;
|
|
7318
|
+
}
|
|
7319
|
+
var inputs = this.getInputs();
|
|
7320
|
+
var res = _reduceInstanceProperty(inputs).call(inputs, function (acc, input) {
|
|
7321
|
+
return acc && hasValidInputValue(input, _valuesInstanceProperty(_this));
|
|
7322
|
+
}, true);
|
|
7323
|
+
return res;
|
|
7324
|
+
}
|
|
7325
|
+
}, {
|
|
7326
|
+
key: "getData",
|
|
7327
|
+
value: function getData() {
|
|
7328
|
+
var _context2,
|
|
7329
|
+
_this2 = this;
|
|
7330
|
+
var data = _reduceInstanceProperty(_context2 = this.getInputs()).call(_context2, function (acc, _ref) {
|
|
7331
|
+
var name = _ref.name;
|
|
7332
|
+
acc[name] = _valuesInstanceProperty(_this2)[name];
|
|
7333
|
+
return acc;
|
|
7334
|
+
}, {});
|
|
7335
|
+
return data;
|
|
7336
|
+
}
|
|
7337
|
+
}, {
|
|
7338
|
+
key: "getNextStep",
|
|
7339
|
+
value: function getNextStep(authClient, _context) {
|
|
7340
|
+
var name = this.getName();
|
|
7341
|
+
var inputs = this.getInputs();
|
|
7342
|
+
var _a = this.remediation;
|
|
7343
|
+
_a.href;
|
|
7344
|
+
_a.method;
|
|
7345
|
+
_a.rel;
|
|
7346
|
+
_a.accepts;
|
|
7347
|
+
_a.produces;
|
|
7348
|
+
_a.value;
|
|
7349
|
+
var action = _a.action,
|
|
7350
|
+
rest = __rest(_a, ["href", "method", "rel", "accepts", "produces", "value", "action"]);
|
|
7351
|
+
if (action) {
|
|
7352
|
+
return _Object$assign(_Object$assign(_Object$assign({}, rest), !!inputs.length && {
|
|
7353
|
+
inputs: inputs
|
|
7354
|
+
}), {
|
|
7355
|
+
action: function () {
|
|
7356
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7357
|
+
return _regeneratorRuntime.wrap(function _callee$(_context3) {
|
|
7358
|
+
while (1) {
|
|
7359
|
+
switch (_context3.prev = _context3.next) {
|
|
7360
|
+
case 0:
|
|
7361
|
+
return _context3.abrupt("return", proceed(authClient, _Object$assign({
|
|
7362
|
+
step: name
|
|
7363
|
+
}, params)));
|
|
7364
|
+
case 1:
|
|
7365
|
+
case "end":
|
|
7366
|
+
return _context3.stop();
|
|
7367
|
+
}
|
|
7368
|
+
}
|
|
7369
|
+
}, _callee);
|
|
7370
|
+
}));
|
|
7371
|
+
function action(_x) {
|
|
7372
|
+
return _action.apply(this, arguments);
|
|
7373
|
+
}
|
|
7374
|
+
return action;
|
|
7375
|
+
}()
|
|
7376
|
+
});
|
|
7377
|
+
}
|
|
7378
|
+
return _Object$assign({}, this.remediation);
|
|
7379
|
+
}
|
|
7380
|
+
}, {
|
|
7381
|
+
key: "getInputs",
|
|
7382
|
+
value: function getInputs() {
|
|
7383
|
+
var _context4, _context5, _context6;
|
|
7384
|
+
return _mapInstanceProperty(_context4 = _mapInstanceProperty(_context5 = _filterInstanceProperty(_context6 = this.remediation.value || []).call(_context6, function (_ref2) {
|
|
7385
|
+
var name = _ref2.name;
|
|
7386
|
+
return name !== 'stateHandle';
|
|
7387
|
+
})).call(_context5, unwrapFormValue)).call(_context4, function (input) {
|
|
7388
|
+
input.type = input.type || 'string';
|
|
7389
|
+
return input;
|
|
7390
|
+
});
|
|
7391
|
+
}
|
|
7392
|
+
}]);
|
|
7393
|
+
return GenericRemediator;
|
|
7394
|
+
}(Remediator);
|
|
7395
|
+
|
|
7137
7396
|
var remediators = /*#__PURE__*/Object.freeze({
|
|
7138
7397
|
__proto__: null,
|
|
7139
7398
|
Remediator: Remediator,
|
|
@@ -7154,11 +7413,12 @@ var remediators = /*#__PURE__*/Object.freeze({
|
|
|
7154
7413
|
SelectEnrollProfile: SelectEnrollProfile,
|
|
7155
7414
|
AuthenticatorVerificationData: AuthenticatorVerificationData,
|
|
7156
7415
|
AuthenticatorEnrollmentData: AuthenticatorEnrollmentData,
|
|
7157
|
-
Skip: Skip
|
|
7416
|
+
Skip: Skip,
|
|
7417
|
+
GenericRemediator: GenericRemediator
|
|
7158
7418
|
});
|
|
7159
7419
|
|
|
7160
7420
|
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; } } }; }
|
|
7161
|
-
function _unsupportedIterableToArray$1(o, minLen) { var
|
|
7421
|
+
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); }
|
|
7162
7422
|
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; }
|
|
7163
7423
|
function isTerminalResponse(idxResponse) {
|
|
7164
7424
|
var neededToProceed = idxResponse.neededToProceed,
|
|
@@ -7276,7 +7536,7 @@ function getEnabledFeatures(idxResponse) {
|
|
|
7276
7536
|
}
|
|
7277
7537
|
return res;
|
|
7278
7538
|
}
|
|
7279
|
-
function getAvailableSteps(idxResponse) {
|
|
7539
|
+
function getAvailableSteps(authClient, idxResponse, useGenericRemediator) {
|
|
7280
7540
|
var _context9;
|
|
7281
7541
|
var res = [];
|
|
7282
7542
|
var remediatorMap = _reduceInstanceProperty(_context9 = _Object$values(remediators)).call(_context9, function (map, remediatorClass) {
|
|
@@ -7290,10 +7550,13 @@ function getAvailableSteps(idxResponse) {
|
|
|
7290
7550
|
try {
|
|
7291
7551
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
7292
7552
|
var remediation = _step2.value;
|
|
7293
|
-
var T =
|
|
7553
|
+
var T = getRemediatorClass(remediation, {
|
|
7554
|
+
useGenericRemediator: useGenericRemediator,
|
|
7555
|
+
remediators: remediatorMap
|
|
7556
|
+
});
|
|
7294
7557
|
if (T) {
|
|
7295
7558
|
var remediator = new T(remediation);
|
|
7296
|
-
res.push(remediator.getNextStep(idxResponse.context));
|
|
7559
|
+
res.push(remediator.getNextStep(authClient, idxResponse.context));
|
|
7297
7560
|
}
|
|
7298
7561
|
}
|
|
7299
7562
|
} catch (err) {
|
|
@@ -7301,10 +7564,44 @@ function getAvailableSteps(idxResponse) {
|
|
|
7301
7564
|
} finally {
|
|
7302
7565
|
_iterator2.f();
|
|
7303
7566
|
}
|
|
7567
|
+
var _loop = function _loop() {
|
|
7568
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 1),
|
|
7569
|
+
name = _Object$entries$_i[0];
|
|
7570
|
+
res.push({
|
|
7571
|
+
name: name,
|
|
7572
|
+
action: function () {
|
|
7573
|
+
var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
|
|
7574
|
+
return _regeneratorRuntime.wrap(function _callee$(_context10) {
|
|
7575
|
+
while (1) {
|
|
7576
|
+
switch (_context10.prev = _context10.next) {
|
|
7577
|
+
case 0:
|
|
7578
|
+
return _context10.abrupt("return", proceed(authClient, {
|
|
7579
|
+
actions: [{
|
|
7580
|
+
name: name,
|
|
7581
|
+
params: params
|
|
7582
|
+
}]
|
|
7583
|
+
}));
|
|
7584
|
+
case 1:
|
|
7585
|
+
case "end":
|
|
7586
|
+
return _context10.stop();
|
|
7587
|
+
}
|
|
7588
|
+
}
|
|
7589
|
+
}, _callee);
|
|
7590
|
+
}));
|
|
7591
|
+
function action(_x) {
|
|
7592
|
+
return _action.apply(this, arguments);
|
|
7593
|
+
}
|
|
7594
|
+
return action;
|
|
7595
|
+
}()
|
|
7596
|
+
});
|
|
7597
|
+
};
|
|
7598
|
+
for (var _i = 0, _Object$entries$1 = _Object$entries(idxResponse.actions || {}); _i < _Object$entries$1.length; _i++) {
|
|
7599
|
+
_loop();
|
|
7600
|
+
}
|
|
7304
7601
|
return res;
|
|
7305
7602
|
}
|
|
7306
7603
|
function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
7307
|
-
var
|
|
7604
|
+
var _context11;
|
|
7308
7605
|
var remediations = idxResponse.neededToProceed || [];
|
|
7309
7606
|
var remediation = _findInstanceProperty(remediations).call(remediations, function (r) {
|
|
7310
7607
|
return r.name === remediationName;
|
|
@@ -7313,7 +7610,7 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7313
7610
|
warn("filterValuesForRemediation: \"".concat(remediationName, "\" did not match any remediations"));
|
|
7314
7611
|
return values;
|
|
7315
7612
|
}
|
|
7316
|
-
var valuesForRemediation = _reduceInstanceProperty(
|
|
7613
|
+
var valuesForRemediation = _reduceInstanceProperty(_context11 = remediation.value).call(_context11, function (res, entry) {
|
|
7317
7614
|
var name = entry.name,
|
|
7318
7615
|
value = entry.value;
|
|
7319
7616
|
if (name === 'stateHandle') {
|
|
@@ -7325,8 +7622,20 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
|
|
|
7325
7622
|
}, {});
|
|
7326
7623
|
return valuesForRemediation;
|
|
7327
7624
|
}
|
|
7625
|
+
function getRemediatorClass(remediation, options) {
|
|
7626
|
+
var useGenericRemediator = options.useGenericRemediator,
|
|
7627
|
+
remediators = options.remediators;
|
|
7628
|
+
if (!remediation) {
|
|
7629
|
+
return undefined;
|
|
7630
|
+
}
|
|
7631
|
+
if (useGenericRemediator) {
|
|
7632
|
+
return GenericRemediator;
|
|
7633
|
+
}
|
|
7634
|
+
return remediators[remediation.name];
|
|
7635
|
+
}
|
|
7328
7636
|
function getRemediator(idxRemediations, values, options) {
|
|
7329
7637
|
var remediators = options.remediators;
|
|
7638
|
+
var useGenericRemediator = options.useGenericRemediator;
|
|
7330
7639
|
var remediator;
|
|
7331
7640
|
if (options.step) {
|
|
7332
7641
|
var remediation = _findInstanceProperty(idxRemediations).call(idxRemediations, function (_ref5) {
|
|
@@ -7334,7 +7643,7 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7334
7643
|
return name === options.step;
|
|
7335
7644
|
});
|
|
7336
7645
|
if (remediation) {
|
|
7337
|
-
var T = remediation
|
|
7646
|
+
var T = getRemediatorClass(remediation, options);
|
|
7338
7647
|
return T ? new T(remediation, values, options) : undefined;
|
|
7339
7648
|
} else {
|
|
7340
7649
|
warn("step \"".concat(options.step, "\" did not match any remediations"));
|
|
@@ -7342,32 +7651,36 @@ function getRemediator(idxRemediations, values, options) {
|
|
|
7342
7651
|
}
|
|
7343
7652
|
}
|
|
7344
7653
|
var remediatorCandidates = [];
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7654
|
+
if (useGenericRemediator) {
|
|
7655
|
+
remediatorCandidates.push(new GenericRemediator(idxRemediations[0], values, options));
|
|
7656
|
+
} else {
|
|
7657
|
+
var _iterator3 = _createForOfIteratorHelper$1(idxRemediations),
|
|
7658
|
+
_step3;
|
|
7659
|
+
try {
|
|
7660
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
7661
|
+
var _context12;
|
|
7662
|
+
var _remediation = _step3.value;
|
|
7663
|
+
var isRemeditionInFlow = _includesInstanceProperty(_context12 = _Object$keys(remediators)).call(_context12, _remediation.name);
|
|
7664
|
+
if (!isRemeditionInFlow) {
|
|
7665
|
+
continue;
|
|
7666
|
+
}
|
|
7667
|
+
var _T = getRemediatorClass(_remediation, options);
|
|
7668
|
+
remediator = new _T(_remediation, values, options);
|
|
7669
|
+
if (remediator.canRemediate()) {
|
|
7670
|
+
return remediator;
|
|
7671
|
+
}
|
|
7672
|
+
remediatorCandidates.push(remediator);
|
|
7359
7673
|
}
|
|
7360
|
-
|
|
7674
|
+
} catch (err) {
|
|
7675
|
+
_iterator3.e(err);
|
|
7676
|
+
} finally {
|
|
7677
|
+
_iterator3.f();
|
|
7361
7678
|
}
|
|
7362
|
-
} catch (err) {
|
|
7363
|
-
_iterator3.e(err);
|
|
7364
|
-
} finally {
|
|
7365
|
-
_iterator3.f();
|
|
7366
7679
|
}
|
|
7367
7680
|
return remediatorCandidates[0];
|
|
7368
7681
|
}
|
|
7369
|
-
function getNextStep(remediator, idxResponse) {
|
|
7370
|
-
var nextStep = remediator.getNextStep(idxResponse.context);
|
|
7682
|
+
function getNextStep(authClient, remediator, idxResponse) {
|
|
7683
|
+
var nextStep = remediator.getNextStep(authClient, idxResponse.context);
|
|
7371
7684
|
var canSkip = canSkipFn(idxResponse);
|
|
7372
7685
|
var canResend = canResendFn(idxResponse);
|
|
7373
7686
|
return _Object$assign(_Object$assign(_Object$assign({}, nextStep), canSkip && {
|
|
@@ -7376,7 +7689,7 @@ function getNextStep(remediator, idxResponse) {
|
|
|
7376
7689
|
canResend: canResend
|
|
7377
7690
|
});
|
|
7378
7691
|
}
|
|
7379
|
-
function handleIdxError(e, remediator) {
|
|
7692
|
+
function handleIdxError(authClient, e, remediator) {
|
|
7380
7693
|
var idxResponse = isIdxResponse(e) ? e : null;
|
|
7381
7694
|
if (!idxResponse) {
|
|
7382
7695
|
throw e;
|
|
@@ -7393,7 +7706,7 @@ function handleIdxError(e, remediator) {
|
|
|
7393
7706
|
messages: messages
|
|
7394
7707
|
};
|
|
7395
7708
|
} else {
|
|
7396
|
-
var nextStep = remediator && getNextStep(remediator, idxResponse);
|
|
7709
|
+
var nextStep = remediator && getNextStep(authClient, remediator, idxResponse);
|
|
7397
7710
|
return _Object$assign({
|
|
7398
7711
|
idxResponse: idxResponse,
|
|
7399
7712
|
messages: messages
|
|
@@ -7429,11 +7742,11 @@ function removeActionFromOptions(options, actionName) {
|
|
|
7429
7742
|
actions: actions
|
|
7430
7743
|
});
|
|
7431
7744
|
}
|
|
7432
|
-
function remediate(_x, _x2, _x3) {
|
|
7745
|
+
function remediate(_x, _x2, _x3, _x4) {
|
|
7433
7746
|
return _remediate.apply(this, arguments);
|
|
7434
7747
|
}
|
|
7435
7748
|
function _remediate() {
|
|
7436
|
-
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(idxResponse, values, options) {
|
|
7749
|
+
_remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, idxResponse, values, options) {
|
|
7437
7750
|
var _context2;
|
|
7438
7751
|
var _idxResponse, neededToProceed, interactionCode, _options, flow, remediator, actionFromValues, actionFromOptions, actions, _iterator, _step, _loop, _ret, terminal, messages, nextStep, name, data;
|
|
7439
7752
|
return _regeneratorRuntime.wrap(function _callee$(_context4) {
|
|
@@ -7492,7 +7805,7 @@ function _remediate() {
|
|
|
7492
7805
|
_context3.prev = 13;
|
|
7493
7806
|
_context3.t0 = _context3["catch"](6);
|
|
7494
7807
|
return _context3.abrupt("return", {
|
|
7495
|
-
v: handleIdxError(_context3.t0, remediator)
|
|
7808
|
+
v: handleIdxError(authClient, _context3.t0, remediator)
|
|
7496
7809
|
});
|
|
7497
7810
|
case 16:
|
|
7498
7811
|
if (!(action === 'cancel')) {
|
|
@@ -7507,7 +7820,7 @@ function _remediate() {
|
|
|
7507
7820
|
});
|
|
7508
7821
|
case 18:
|
|
7509
7822
|
return _context3.abrupt("return", {
|
|
7510
|
-
v: remediate(idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7823
|
+
v: remediate(authClient, idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
|
|
7511
7824
|
});
|
|
7512
7825
|
case 19:
|
|
7513
7826
|
remediationAction = _findInstanceProperty(neededToProceed).call(neededToProceed, function (_ref) {
|
|
@@ -7532,11 +7845,11 @@ function _remediate() {
|
|
|
7532
7845
|
_context3.prev = 28;
|
|
7533
7846
|
_context3.t1 = _context3["catch"](21);
|
|
7534
7847
|
return _context3.abrupt("return", {
|
|
7535
|
-
v: handleIdxError(_context3.t1, remediator)
|
|
7848
|
+
v: handleIdxError(authClient, _context3.t1, remediator)
|
|
7536
7849
|
});
|
|
7537
7850
|
case 31:
|
|
7538
7851
|
return _context3.abrupt("return", {
|
|
7539
|
-
v: remediate(idxResponse, values, optionsWithoutExecutedAction)
|
|
7852
|
+
v: remediate(authClient, idxResponse, values, optionsWithoutExecutedAction)
|
|
7540
7853
|
});
|
|
7541
7854
|
case 32:
|
|
7542
7855
|
case "end":
|
|
@@ -7609,7 +7922,7 @@ function _remediate() {
|
|
|
7609
7922
|
case 43:
|
|
7610
7923
|
_context4.prev = 43;
|
|
7611
7924
|
_context4.t2 = _context4["catch"](35);
|
|
7612
|
-
return _context4.abrupt("return", handleIdxError(_context4.t2));
|
|
7925
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t2));
|
|
7613
7926
|
case 46:
|
|
7614
7927
|
if (!(flow === 'default')) {
|
|
7615
7928
|
_context4.next = 48;
|
|
@@ -7627,7 +7940,7 @@ function _remediate() {
|
|
|
7627
7940
|
_context4.next = 52;
|
|
7628
7941
|
break;
|
|
7629
7942
|
}
|
|
7630
|
-
nextStep = getNextStep(remediator, idxResponse);
|
|
7943
|
+
nextStep = getNextStep(authClient, remediator, idxResponse);
|
|
7631
7944
|
return _context4.abrupt("return", {
|
|
7632
7945
|
idxResponse: idxResponse,
|
|
7633
7946
|
nextStep: nextStep,
|
|
@@ -7648,11 +7961,11 @@ function _remediate() {
|
|
|
7648
7961
|
options = _Object$assign(_Object$assign({}, options), {
|
|
7649
7962
|
step: undefined
|
|
7650
7963
|
});
|
|
7651
|
-
return _context4.abrupt("return", remediate(idxResponse, values, options));
|
|
7964
|
+
return _context4.abrupt("return", remediate(authClient, idxResponse, values, options));
|
|
7652
7965
|
case 64:
|
|
7653
7966
|
_context4.prev = 64;
|
|
7654
7967
|
_context4.t3 = _context4["catch"](54);
|
|
7655
|
-
return _context4.abrupt("return", handleIdxError(_context4.t3, remediator));
|
|
7968
|
+
return _context4.abrupt("return", handleIdxError(authClient, _context4.t3, remediator));
|
|
7656
7969
|
case 67:
|
|
7657
7970
|
case "end":
|
|
7658
7971
|
return _context4.stop();
|
|
@@ -7761,11 +8074,13 @@ function initializeValues(options) {
|
|
|
7761
8074
|
return values;
|
|
7762
8075
|
}
|
|
7763
8076
|
function initializeData(authClient, data) {
|
|
8077
|
+
var _a;
|
|
7764
8078
|
var options = data.options;
|
|
7765
8079
|
var flow = options.flow,
|
|
7766
8080
|
withCredentials = options.withCredentials,
|
|
7767
8081
|
remediators = options.remediators,
|
|
7768
|
-
actions = options.actions
|
|
8082
|
+
actions = options.actions,
|
|
8083
|
+
useGenericRemediator = options.useGenericRemediator;
|
|
7769
8084
|
var status = IdxStatus.PENDING;
|
|
7770
8085
|
flow = flow || authClient.idx.getFlow() || 'default';
|
|
7771
8086
|
if (flow) {
|
|
@@ -7775,12 +8090,14 @@ function initializeData(authClient, data) {
|
|
|
7775
8090
|
remediators = remediators || flowSpec.remediators;
|
|
7776
8091
|
actions = actions || flowSpec.actions;
|
|
7777
8092
|
}
|
|
8093
|
+
useGenericRemediator = useGenericRemediator || ((_a = authClient.options.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator) || false;
|
|
7778
8094
|
return _Object$assign(_Object$assign({}, data), {
|
|
7779
8095
|
options: _Object$assign(_Object$assign({}, options), {
|
|
7780
8096
|
flow: flow,
|
|
7781
8097
|
withCredentials: withCredentials,
|
|
7782
8098
|
remediators: remediators,
|
|
7783
|
-
actions: actions
|
|
8099
|
+
actions: actions,
|
|
8100
|
+
useGenericRemediator: useGenericRemediator
|
|
7784
8101
|
}),
|
|
7785
8102
|
status: status
|
|
7786
8103
|
});
|
|
@@ -7790,13 +8107,13 @@ function getDataFromIntrospect(_x, _x2) {
|
|
|
7790
8107
|
}
|
|
7791
8108
|
function _getDataFromIntrospect() {
|
|
7792
8109
|
_getDataFromIntrospect = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, data) {
|
|
7793
|
-
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, idxResponse, meta, interactionHandle, interactResponse;
|
|
8110
|
+
var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, maxAge, idxResponse, meta, interactionHandle, interactResponse;
|
|
7794
8111
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7795
8112
|
while (1) {
|
|
7796
8113
|
switch (_context.prev = _context.next) {
|
|
7797
8114
|
case 0:
|
|
7798
8115
|
options = data.options;
|
|
7799
|
-
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken;
|
|
8116
|
+
stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken, maxAge = options.maxAge;
|
|
7800
8117
|
meta = getSavedTransactionMeta(authClient, {
|
|
7801
8118
|
state: state,
|
|
7802
8119
|
recoveryToken: recoveryToken,
|
|
@@ -7829,7 +8146,8 @@ function _getDataFromIntrospect() {
|
|
|
7829
8146
|
state: state,
|
|
7830
8147
|
scopes: scopes,
|
|
7831
8148
|
activationToken: activationToken,
|
|
7832
|
-
recoveryToken: recoveryToken
|
|
8149
|
+
recoveryToken: recoveryToken,
|
|
8150
|
+
maxAge: maxAge
|
|
7833
8151
|
});
|
|
7834
8152
|
case 14:
|
|
7835
8153
|
interactResponse = _context.sent;
|
|
@@ -7858,18 +8176,18 @@ function _getDataFromIntrospect() {
|
|
|
7858
8176
|
}));
|
|
7859
8177
|
return _getDataFromIntrospect.apply(this, arguments);
|
|
7860
8178
|
}
|
|
7861
|
-
function getDataFromRemediate(_x3) {
|
|
8179
|
+
function getDataFromRemediate(_x3, _x4) {
|
|
7862
8180
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7863
8181
|
}
|
|
7864
8182
|
function _getDataFromRemediate() {
|
|
7865
|
-
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(data) {
|
|
7866
|
-
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
8183
|
+
_getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(authClient, data) {
|
|
8184
|
+
var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, useGenericRemediator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
|
|
7867
8185
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
7868
8186
|
while (1) {
|
|
7869
8187
|
switch (_context2.prev = _context2.next) {
|
|
7870
8188
|
case 0:
|
|
7871
8189
|
idxResponse = data.idxResponse, options = data.options, values = _valuesInstanceProperty(data);
|
|
7872
|
-
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator;
|
|
8190
|
+
autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator, useGenericRemediator = options.useGenericRemediator;
|
|
7873
8191
|
shouldRemediate = autoRemediate !== false && (remediators || actions || step);
|
|
7874
8192
|
if (shouldRemediate) {
|
|
7875
8193
|
_context2.next = 5;
|
|
@@ -7881,12 +8199,13 @@ function _getDataFromRemediate() {
|
|
|
7881
8199
|
stateHandle: idxResponse.rawIdxState.stateHandle
|
|
7882
8200
|
});
|
|
7883
8201
|
_context2.next = 8;
|
|
7884
|
-
return remediate(idxResponse, values, {
|
|
8202
|
+
return remediate(authClient, idxResponse, values, {
|
|
7885
8203
|
remediators: remediators,
|
|
7886
8204
|
actions: actions,
|
|
7887
8205
|
flow: flow,
|
|
7888
8206
|
step: step,
|
|
7889
|
-
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator
|
|
8207
|
+
shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator,
|
|
8208
|
+
useGenericRemediator: useGenericRemediator
|
|
7890
8209
|
});
|
|
7891
8210
|
case 8:
|
|
7892
8211
|
_yield$remediate = _context2.sent;
|
|
@@ -7908,7 +8227,7 @@ function _getDataFromRemediate() {
|
|
|
7908
8227
|
}));
|
|
7909
8228
|
return _getDataFromRemediate.apply(this, arguments);
|
|
7910
8229
|
}
|
|
7911
|
-
function getTokens(
|
|
8230
|
+
function getTokens(_x5, _x6) {
|
|
7912
8231
|
return _getTokens.apply(this, arguments);
|
|
7913
8232
|
}
|
|
7914
8233
|
function _getTokens() {
|
|
@@ -7942,7 +8261,7 @@ function _getTokens() {
|
|
|
7942
8261
|
}));
|
|
7943
8262
|
return _getTokens.apply(this, arguments);
|
|
7944
8263
|
}
|
|
7945
|
-
function finalizeData(
|
|
8264
|
+
function finalizeData(_x7, _x8) {
|
|
7946
8265
|
return _finalizeData.apply(this, arguments);
|
|
7947
8266
|
}
|
|
7948
8267
|
function _finalizeData() {
|
|
@@ -7960,7 +8279,7 @@ function _finalizeData() {
|
|
|
7960
8279
|
if (idxResponse) {
|
|
7961
8280
|
shouldSaveResponse = !!(idxResponse.requestDidSucceed || idxResponse.stepUp);
|
|
7962
8281
|
enabledFeatures = getEnabledFeatures(idxResponse);
|
|
7963
|
-
availableSteps = getAvailableSteps(idxResponse);
|
|
8282
|
+
availableSteps = getAvailableSteps(authClient, idxResponse, options.useGenericRemediator);
|
|
7964
8283
|
messages = getMessagesFromResponse(idxResponse);
|
|
7965
8284
|
terminal = isTerminalResponse(idxResponse);
|
|
7966
8285
|
}
|
|
@@ -8051,7 +8370,7 @@ function handleError(err, data) {
|
|
|
8051
8370
|
shouldClearTransaction: shouldClearTransaction
|
|
8052
8371
|
});
|
|
8053
8372
|
}
|
|
8054
|
-
function run(
|
|
8373
|
+
function run(_x9) {
|
|
8055
8374
|
return _run.apply(this, arguments);
|
|
8056
8375
|
}
|
|
8057
8376
|
function _run() {
|
|
@@ -8082,6 +8401,7 @@ function _run() {
|
|
|
8082
8401
|
proceed,
|
|
8083
8402
|
rawIdxState,
|
|
8084
8403
|
requestDidSucceed,
|
|
8404
|
+
stepUp,
|
|
8085
8405
|
_args5 = arguments;
|
|
8086
8406
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
8087
8407
|
while (1) {
|
|
@@ -8099,7 +8419,7 @@ function _run() {
|
|
|
8099
8419
|
case 6:
|
|
8100
8420
|
data = _context5.sent;
|
|
8101
8421
|
_context5.next = 9;
|
|
8102
|
-
return getDataFromRemediate(data);
|
|
8422
|
+
return getDataFromRemediate(authClient, data);
|
|
8103
8423
|
case 9:
|
|
8104
8424
|
data = _context5.sent;
|
|
8105
8425
|
_context5.next = 15;
|
|
@@ -8130,8 +8450,8 @@ function _run() {
|
|
|
8130
8450
|
});
|
|
8131
8451
|
}
|
|
8132
8452
|
}
|
|
8133
|
-
_ref = idxResponse || {}, actions = _ref.actions, context = _ref.context, neededToProceed = _ref.neededToProceed, proceed = _ref.proceed, rawIdxState = _ref.rawIdxState, requestDidSucceed = _ref.requestDidSucceed;
|
|
8134
|
-
return _context5.abrupt("return", _Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign({
|
|
8453
|
+
_ref = idxResponse || {}, actions = _ref.actions, context = _ref.context, neededToProceed = _ref.neededToProceed, proceed = _ref.proceed, rawIdxState = _ref.rawIdxState, requestDidSucceed = _ref.requestDidSucceed, stepUp = _ref.stepUp;
|
|
8454
|
+
return _context5.abrupt("return", _Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign({
|
|
8135
8455
|
status: status
|
|
8136
8456
|
}, meta && {
|
|
8137
8457
|
meta: meta
|
|
@@ -8147,6 +8467,8 @@ function _run() {
|
|
|
8147
8467
|
messages: messages
|
|
8148
8468
|
}), error && {
|
|
8149
8469
|
error: error
|
|
8470
|
+
}), stepUp && {
|
|
8471
|
+
stepUp: stepUp
|
|
8150
8472
|
}), {
|
|
8151
8473
|
interactionCode: interactionCode,
|
|
8152
8474
|
actions: actions,
|
|
@@ -8284,52 +8606,6 @@ function _handleEmailVerifyCallback() {
|
|
|
8284
8606
|
return _handleEmailVerifyCallback.apply(this, arguments);
|
|
8285
8607
|
}
|
|
8286
8608
|
|
|
8287
|
-
function canProceed(authClient) {
|
|
8288
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8289
|
-
var meta = getSavedTransactionMeta(authClient, options);
|
|
8290
|
-
return !!(meta || options.stateHandle);
|
|
8291
|
-
}
|
|
8292
|
-
function proceed(_x) {
|
|
8293
|
-
return _proceed.apply(this, arguments);
|
|
8294
|
-
}
|
|
8295
|
-
function _proceed() {
|
|
8296
|
-
_proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
|
|
8297
|
-
var options,
|
|
8298
|
-
flow,
|
|
8299
|
-
state,
|
|
8300
|
-
meta,
|
|
8301
|
-
_args = arguments;
|
|
8302
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8303
|
-
while (1) {
|
|
8304
|
-
switch (_context.prev = _context.next) {
|
|
8305
|
-
case 0:
|
|
8306
|
-
options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
8307
|
-
if (canProceed(authClient, options)) {
|
|
8308
|
-
_context.next = 3;
|
|
8309
|
-
break;
|
|
8310
|
-
}
|
|
8311
|
-
throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
|
|
8312
|
-
case 3:
|
|
8313
|
-
flow = options.flow, state = options.state;
|
|
8314
|
-
if (!flow) {
|
|
8315
|
-
meta = getSavedTransactionMeta(authClient, {
|
|
8316
|
-
state: state
|
|
8317
|
-
});
|
|
8318
|
-
flow = meta === null || meta === void 0 ? void 0 : meta.flow;
|
|
8319
|
-
}
|
|
8320
|
-
return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
|
|
8321
|
-
flow: flow
|
|
8322
|
-
})));
|
|
8323
|
-
case 6:
|
|
8324
|
-
case "end":
|
|
8325
|
-
return _context.stop();
|
|
8326
|
-
}
|
|
8327
|
-
}
|
|
8328
|
-
}, _callee);
|
|
8329
|
-
}));
|
|
8330
|
-
return _proceed.apply(this, arguments);
|
|
8331
|
-
}
|
|
8332
|
-
|
|
8333
8609
|
function poll(_x) {
|
|
8334
8610
|
return _poll.apply(this, arguments);
|
|
8335
8611
|
}
|
|
@@ -8618,7 +8894,7 @@ function _unlockAccount() {
|
|
|
8618
8894
|
var OktaUserAgent = function () {
|
|
8619
8895
|
function OktaUserAgent() {
|
|
8620
8896
|
_classCallCheck(this, OktaUserAgent);
|
|
8621
|
-
this.environments = ["okta-auth-js/".concat("6.
|
|
8897
|
+
this.environments = ["okta-auth-js/".concat("6.5.1")];
|
|
8622
8898
|
}
|
|
8623
8899
|
_createClass(OktaUserAgent, [{
|
|
8624
8900
|
key: "addEnvironment",
|
|
@@ -8636,7 +8912,7 @@ var OktaUserAgent = function () {
|
|
|
8636
8912
|
}, {
|
|
8637
8913
|
key: "getVersion",
|
|
8638
8914
|
value: function getVersion() {
|
|
8639
|
-
return "6.
|
|
8915
|
+
return "6.5.1";
|
|
8640
8916
|
}
|
|
8641
8917
|
}, {
|
|
8642
8918
|
key: "maybeAddNodeEnvironment",
|