cidaas-javascript-sdk 3.1.0 → 3.1.2

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.
@@ -1,1556 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- exports.__esModule = true;
39
- exports.WebAuth = void 0;
40
- var oidc_client_ts_1 = require("oidc-client-ts");
41
- var CryptoJS = require("crypto-js");
42
- var authentication_1 = require("../authentication");
43
- var Helper_1 = require("./Helper");
44
- var LoginService_1 = require("./LoginService");
45
- var UserService_1 = require("./UserService");
46
- var TokenService_1 = require("./TokenService");
47
- var VerificationService_1 = require("./VerificationService");
48
- var ConsentService_1 = require("./ConsentService");
49
- var WebAuth = /** @class */ (function () {
50
- function WebAuth(settings) {
51
- try {
52
- var usermanager = new oidc_client_ts_1.UserManager(settings);
53
- window.webAuthSettings = settings;
54
- window.usermanager = usermanager;
55
- window.localeSettings = null;
56
- window.authentication = new authentication_1.Authentication(window.webAuthSettings, window.usermanager);
57
- window.usermanager.events.addSilentRenewError(function (error) {
58
- throw new Helper_1.CustomException("Error while renewing silent login", 500);
59
- });
60
- if (!settings.mode) {
61
- window.webAuthSettings.mode = 'redirect';
62
- }
63
- }
64
- catch (ex) {
65
- console.log(ex);
66
- }
67
- }
68
- /**
69
- * @param string
70
- * @returns
71
- */
72
- WebAuth.prototype.base64URL = function (string) {
73
- return string.toString(CryptoJS.enc.Base64).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
74
- };
75
- ;
76
- // prototype methods
77
- /**
78
- * login
79
- */
80
- WebAuth.prototype.loginWithBrowser = function () {
81
- try {
82
- if (!window.webAuthSettings && !window.authentication) {
83
- throw new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417);
84
- }
85
- switch (window.webAuthSettings.mode) {
86
- case 'redirect':
87
- window.authentication.redirectSignIn('login');
88
- break;
89
- case 'window':
90
- window.authentication.popupSignIn();
91
- break;
92
- case 'silent':
93
- window.authentication.silentSignIn();
94
- break;
95
- }
96
- }
97
- catch (ex) {
98
- console.log(ex);
99
- }
100
- };
101
- ;
102
- /**
103
- * register
104
- */
105
- WebAuth.prototype.registerWithBrowser = function () {
106
- try {
107
- if (!window.webAuthSettings && !window.authentication) {
108
- throw new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417);
109
- }
110
- switch (window.webAuthSettings.mode) {
111
- case 'redirect':
112
- window.authentication.redirectSignIn('register');
113
- break;
114
- case 'window':
115
- window.authentication.popupSignIn();
116
- break;
117
- case 'silent':
118
- window.authentication.silentSignIn();
119
- break;
120
- }
121
- }
122
- catch (ex) {
123
- console.log(ex);
124
- }
125
- };
126
- ;
127
- /**
128
- * login callback
129
- * @returns
130
- */
131
- WebAuth.prototype.loginCallback = function () {
132
- return new Promise(function (resolve, reject) {
133
- try {
134
- if (!window.webAuthSettings && !window.authentication) {
135
- throw new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417);
136
- }
137
- switch (window.webAuthSettings.mode) {
138
- case 'redirect':
139
- window.authentication.redirectSignInCallback().then(function (user) {
140
- resolve(user);
141
- })["catch"](function (ex) {
142
- reject(ex);
143
- });
144
- break;
145
- case 'window':
146
- window.authentication.popupSignInCallback();
147
- break;
148
- case 'silent':
149
- window.authentication.silentSignInCallbackV2().then(function (data) {
150
- resolve(data);
151
- })["catch"](function (error) {
152
- reject(error);
153
- });
154
- break;
155
- }
156
- }
157
- catch (ex) {
158
- console.log(ex);
159
- }
160
- });
161
- };
162
- ;
163
- /**
164
- * get user info
165
- * @returns
166
- */
167
- WebAuth.prototype.getUserInfo = function () {
168
- return __awaiter(this, void 0, void 0, function () {
169
- var e_1;
170
- return __generator(this, function (_a) {
171
- switch (_a.label) {
172
- case 0:
173
- _a.trys.push([0, 4, , 5]);
174
- if (!window.usermanager) return [3 /*break*/, 2];
175
- return [4 /*yield*/, window.usermanager.getUser()];
176
- case 1: return [2 /*return*/, _a.sent()];
177
- case 2: throw new Helper_1.CustomException("UserManager cannot be empty", 417);
178
- case 3: return [3 /*break*/, 5];
179
- case 4:
180
- e_1 = _a.sent();
181
- throw e_1;
182
- case 5: return [2 /*return*/];
183
- }
184
- });
185
- });
186
- };
187
- ;
188
- /**
189
- * logout
190
- * @returns
191
- */
192
- WebAuth.prototype.logout = function () {
193
- return new Promise(function (resolve, reject) {
194
- try {
195
- if (!window.webAuthSettings && !window.authentication) {
196
- throw new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417);
197
- }
198
- if (window.webAuthSettings.mode == 'redirect') {
199
- window.authentication.redirectSignOut().then(function (result) {
200
- resolve(result);
201
- return;
202
- });
203
- }
204
- else if (window.webAuthSettings.mode == 'window') {
205
- window.authentication.popupSignOut();
206
- }
207
- else if (window.webAuthSettings.mode == 'silent') {
208
- window.authentication.redirectSignOut();
209
- }
210
- else {
211
- resolve(undefined);
212
- }
213
- }
214
- catch (ex) {
215
- reject(ex);
216
- }
217
- });
218
- };
219
- ;
220
- /**
221
- * logout callback
222
- * @returns
223
- */
224
- WebAuth.prototype.logoutCallback = function () {
225
- return new Promise(function (resolve, reject) {
226
- try {
227
- if (!window.webAuthSettings && !window.authentication) {
228
- throw new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417);
229
- }
230
- if (window.webAuthSettings.mode == 'redirect') {
231
- window.authentication.redirectSignOutCallback().then(function (resp) {
232
- resolve(resp);
233
- });
234
- }
235
- else if (window.webAuthSettings.mode == 'window') {
236
- window.authentication.popupSignOutCallback();
237
- }
238
- else if (window.webAuthSettings.mode == 'silent') {
239
- window.authentication.redirectSignOutCallback();
240
- }
241
- }
242
- catch (ex) {
243
- reject(ex);
244
- }
245
- });
246
- };
247
- ;
248
- /**
249
- * get login url
250
- * @returns
251
- */
252
- WebAuth.prototype.getLoginURL = function () {
253
- var settings = window.webAuthSettings;
254
- if (!settings.response_type) {
255
- settings.response_type = "code";
256
- }
257
- if (!settings.scope) {
258
- settings.scope = "email openid profile mobile";
259
- }
260
- var loginURL = "";
261
- window.usermanager._client.createSigninRequest(settings).then(function (signInRequest) {
262
- loginURL = signInRequest.url;
263
- });
264
- var timeRemaining = 5000;
265
- while (timeRemaining > 0) {
266
- if (loginURL) {
267
- break;
268
- }
269
- setTimeout(function () {
270
- timeRemaining -= 100;
271
- }, 100);
272
- }
273
- return loginURL;
274
- };
275
- ;
276
- /**
277
- * get request id
278
- * @returns
279
- */
280
- WebAuth.prototype.getRequestId = function () {
281
- return new Promise(function (resolve, reject) {
282
- try {
283
- var respone_type = window.webAuthSettings.response_type;
284
- if (!respone_type) {
285
- respone_type = "token";
286
- }
287
- var response_mode = window.webAuthSettings.response_mode;
288
- if (!response_mode) {
289
- response_mode = "fragment";
290
- }
291
- var bodyParams = {
292
- "client_id": window.webAuthSettings.client_id,
293
- "redirect_uri": window.webAuthSettings.redirect_uri,
294
- "response_type": respone_type,
295
- "response_mode": response_mode,
296
- "scope": window.webAuthSettings.scope,
297
- "nonce": new Date().getTime().toString()
298
- };
299
- var http = new XMLHttpRequest();
300
- var _serviceURL = window.webAuthSettings.authority + "/authz-srv/authrequest/authz/generate";
301
- http.onreadystatechange = function () {
302
- if (http.readyState == 4) {
303
- if (http.responseText) {
304
- resolve(JSON.parse(http.responseText));
305
- }
306
- else {
307
- resolve(false);
308
- }
309
- }
310
- };
311
- http.open("POST", _serviceURL, true);
312
- http.setRequestHeader("Content-type", "application/json");
313
- if (window.localeSettings) {
314
- http.setRequestHeader("accept-language", window.localeSettings);
315
- }
316
- http.send(JSON.stringify(bodyParams));
317
- }
318
- catch (ex) {
319
- reject(ex);
320
- }
321
- });
322
- };
323
- ;
324
- /**
325
- * get missing fields
326
- * @param options
327
- * @returns
328
- */
329
- WebAuth.prototype.getMissingFields = function (options) {
330
- var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + options.requestId + "/" + options.trackId;
331
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
332
- };
333
- ;
334
- /**
335
- * get Tenant info
336
- * @returns
337
- */
338
- WebAuth.prototype.getTenantInfo = function () {
339
- var _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
340
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
341
- };
342
- ;
343
- /**
344
- * logout api call
345
- * @param options
346
- */
347
- WebAuth.prototype.logoutUser = function (options) {
348
- try {
349
- window.location.href = window.webAuthSettings.authority + "/session/end_session?access_token_hint=" + options.access_token + "&post_logout_redirect_uri=" + window.webAuthSettings.post_logout_redirect_uri;
350
- }
351
- catch (ex) {
352
- throw new Helper_1.CustomException(ex, 417);
353
- }
354
- };
355
- ;
356
- /**
357
- * get Client Info
358
- * @param options
359
- * @returns
360
- */
361
- WebAuth.prototype.getClientInfo = function (options) {
362
- var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
363
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
364
- };
365
- ;
366
- /**
367
- * get all devices associated to the client
368
- * @param options
369
- * @returns
370
- */
371
- WebAuth.prototype.getDevicesInfo = function (options) {
372
- options.userAgent = window.navigator.userAgent;
373
- var _serviceURL = window.webAuthSettings.authority + "/device-srv/devices";
374
- if (window.navigator.userAgent) {
375
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "GET");
376
- }
377
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
378
- };
379
- ;
380
- /**
381
- * delete a device
382
- * @param options
383
- * @returns
384
- */
385
- WebAuth.prototype.deleteDevice = function (options) {
386
- var _serviceURL = window.webAuthSettings.authority + "/device-srv/device/" + options.device_id;
387
- options.userAgent = window.navigator.userAgent;
388
- if (window.navigator.userAgent) {
389
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "DELETE");
390
- }
391
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "DELETE");
392
- };
393
- ;
394
- /**
395
- * get Registration setup
396
- * @param options
397
- * @returns
398
- */
399
- WebAuth.prototype.getRegistrationSetup = function (options) {
400
- return new Promise(function (resolve, reject) {
401
- try {
402
- var http = new XMLHttpRequest();
403
- var _serviceURL = window.webAuthSettings.authority + "/registration-setup-srv/public/list?acceptlanguage=" + options.acceptlanguage + "&requestId=" + options.requestId;
404
- http.onreadystatechange = function () {
405
- if (http.readyState == 4) {
406
- if (http.responseText) {
407
- var parsedResponse = JSON.parse(http.responseText);
408
- if (parsedResponse && parsedResponse.data && parsedResponse.data.length > 0) {
409
- var registrationFields = parsedResponse.data;
410
- }
411
- resolve(parsedResponse);
412
- }
413
- else {
414
- resolve(false);
415
- }
416
- }
417
- };
418
- http.open("GET", _serviceURL, true);
419
- http.setRequestHeader("Content-type", "application/json");
420
- if (window.localeSettings) {
421
- http.setRequestHeader("accept-language", window.localeSettings);
422
- }
423
- http.send();
424
- }
425
- catch (ex) {
426
- reject(ex);
427
- }
428
- });
429
- };
430
- ;
431
- /**
432
- * get unreviewed devices
433
- * @param access_token
434
- * @param sub
435
- * @returns
436
- */
437
- WebAuth.prototype.getUnreviewedDevices = function (access_token, sub) {
438
- var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/unreviewlist/" + sub;
439
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", access_token);
440
- };
441
- ;
442
- /**
443
- * get reviewed devices
444
- * @param access_token
445
- * @param sub
446
- * @returns
447
- */
448
- WebAuth.prototype.getReviewedDevices = function (access_token, sub) {
449
- var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/reviewlist/" + sub;
450
- return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", access_token);
451
- };
452
- ;
453
- /**
454
- * review device
455
- * @param options
456
- * @param access_token
457
- * @returns
458
- */
459
- WebAuth.prototype.reviewDevice = function (options, access_token) {
460
- var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/updatereview";
461
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "PUT", access_token);
462
- };
463
- ;
464
- /**
465
- * get device info
466
- * @returns
467
- */
468
- WebAuth.prototype.getDeviceInfo = function () {
469
- var _this = this;
470
- return new Promise(function (resolve, reject) {
471
- try {
472
- var value = ('; ' + document.cookie).split("; cidaas_dr=").pop().split(';')[0];
473
- var options = { userAgent: "" };
474
- if (!value) {
475
- (function () { return __awaiter(_this, void 0, void 0, function () {
476
- var http, _serviceURL;
477
- return __generator(this, function (_a) {
478
- options.userAgent = window.navigator.userAgent;
479
- http = new XMLHttpRequest();
480
- _serviceURL = window.webAuthSettings.authority + "/device-srv/deviceinfo";
481
- http.onreadystatechange = function () {
482
- if (http.readyState == 4) {
483
- resolve(JSON.parse(http.responseText));
484
- }
485
- };
486
- http.open("POST", _serviceURL, true);
487
- http.setRequestHeader("Content-type", "application/json");
488
- if (window.localeSettings) {
489
- http.setRequestHeader("accept-language", window.localeSettings);
490
- }
491
- http.send(JSON.stringify(options));
492
- return [2 /*return*/];
493
- });
494
- }); })();
495
- }
496
- }
497
- catch (ex) {
498
- reject(ex);
499
- }
500
- });
501
- };
502
- ;
503
- /**
504
- * get user info
505
- * @param options
506
- * @returns
507
- */
508
- WebAuth.prototype.getUserProfile = function (options) {
509
- return UserService_1.UserService.getUserProfile(options);
510
- };
511
- ;
512
- /**
513
- * renew token using refresh token
514
- * @param options
515
- * @returns
516
- */
517
- WebAuth.prototype.renewToken = function (options) {
518
- return TokenService_1.TokenService.renewToken(options);
519
- };
520
- ;
521
- /**
522
- * get access token from code
523
- * @param options
524
- * @returns
525
- */
526
- WebAuth.prototype.getAccessToken = function (options) {
527
- return TokenService_1.TokenService.getAccessToken(options);
528
- };
529
- ;
530
- /**
531
- * validate access token
532
- * @param options
533
- * @returns
534
- */
535
- WebAuth.prototype.validateAccessToken = function (options) {
536
- return TokenService_1.TokenService.validateAccessToken(options);
537
- };
538
- ;
539
- /**
540
- * login with username and password
541
- * @param options
542
- */
543
- WebAuth.prototype.loginWithCredentials = function (options) {
544
- LoginService_1.LoginService.loginWithCredentials(options);
545
- };
546
- ;
547
- /**
548
- * login with username and password and return response
549
- * @param options
550
- * @returns
551
- */
552
- WebAuth.prototype.loginWithCredentialsAsynFn = function (options) {
553
- return __awaiter(this, void 0, void 0, function () {
554
- return __generator(this, function (_a) {
555
- switch (_a.label) {
556
- case 0: return [4 /*yield*/, LoginService_1.LoginService.loginWithCredentialsAsynFn(options)];
557
- case 1:
558
- _a.sent();
559
- return [2 /*return*/];
560
- }
561
- });
562
- });
563
- };
564
- ;
565
- /**
566
- * login with social
567
- * @param options
568
- * @param queryParams
569
- */
570
- WebAuth.prototype.loginWithSocial = function (options, queryParams) {
571
- LoginService_1.LoginService.loginWithSocial(options, queryParams);
572
- };
573
- ;
574
- /**
575
- * register with social
576
- * @param options
577
- * @param queryParams
578
- */
579
- WebAuth.prototype.registerWithSocial = function (options, queryParams) {
580
- LoginService_1.LoginService.registerWithSocial(options, queryParams);
581
- };
582
- ;
583
- /**
584
- * register user
585
- * @param options
586
- * @param headers
587
- * @returns
588
- */
589
- WebAuth.prototype.register = function (options, headers) {
590
- return UserService_1.UserService.register(options, headers);
591
- };
592
- ;
593
- /**
594
- * get invite info
595
- * @param options
596
- * @returns
597
- */
598
- WebAuth.prototype.getInviteUserDetails = function (options) {
599
- return UserService_1.UserService.getInviteUserDetails(options);
600
- };
601
- ;
602
- /**
603
- * get Communication status
604
- * @param options
605
- * @returns
606
- */
607
- WebAuth.prototype.getCommunicationStatus = function (options) {
608
- return UserService_1.UserService.getCommunicationStatus(options);
609
- };
610
- ;
611
- /**
612
- * initiate verification
613
- * @param options
614
- * @returns
615
- */
616
- WebAuth.prototype.initiateAccountVerification = function (options) {
617
- VerificationService_1.VerificationService.initiateAccountVerification(options);
618
- };
619
- ;
620
- /**
621
- * initiate verification and return response
622
- * @param options
623
- * @returns
624
- */
625
- WebAuth.prototype.initiateAccountVerificationAsynFn = function (options) {
626
- return __awaiter(this, void 0, void 0, function () {
627
- return __generator(this, function (_a) {
628
- switch (_a.label) {
629
- case 0: return [4 /*yield*/, VerificationService_1.VerificationService.initiateAccountVerificationAsynFn(options)];
630
- case 1: return [2 /*return*/, _a.sent()];
631
- }
632
- });
633
- });
634
- };
635
- ;
636
- /**
637
- * verify account
638
- * @param options
639
- * @returns
640
- */
641
- WebAuth.prototype.verifyAccount = function (options) {
642
- return VerificationService_1.VerificationService.verifyAccount(options);
643
- };
644
- ;
645
- /**
646
- * initiate reset password
647
- * @param options
648
- * @returns
649
- */
650
- WebAuth.prototype.initiateResetPassword = function (options) {
651
- return UserService_1.UserService.initiateResetPassword(options);
652
- };
653
- ;
654
- /**
655
- * handle reset password
656
- * @param options
657
- */
658
- WebAuth.prototype.handleResetPassword = function (options) {
659
- return UserService_1.UserService.handleResetPassword(options);
660
- };
661
- ;
662
- /**
663
- * reset password
664
- * @param options
665
- */
666
- WebAuth.prototype.resetPassword = function (options) {
667
- return UserService_1.UserService.resetPassword(options);
668
- };
669
- ;
670
- /**
671
- * get mfa list v2
672
- * @param options
673
- * @returns
674
- */
675
- WebAuth.prototype.getMFAListV2 = function (options) {
676
- return VerificationService_1.VerificationService.getMFAListV2(options);
677
- };
678
- ;
679
- /**
680
- * cancel mfa v2
681
- * @param options
682
- * @returns
683
- */
684
- WebAuth.prototype.cancelMFAV2 = function (options) {
685
- return VerificationService_1.VerificationService.cancelMFAV2(options);
686
- };
687
- ;
688
- /**
689
- * passwordless login
690
- * @param options
691
- */
692
- WebAuth.prototype.passwordlessLogin = function (options) {
693
- LoginService_1.LoginService.passwordlessLogin(options);
694
- };
695
- ;
696
- /**
697
- * get user consent details
698
- * @param options
699
- * @returns
700
- */
701
- WebAuth.prototype.getConsentDetailsV2 = function (options) {
702
- return ConsentService_1.ConsentService.getConsentDetailsV2(options);
703
- };
704
- ;
705
- /**
706
- * accept consent v2
707
- * @param options
708
- * @returns
709
- */
710
- WebAuth.prototype.acceptConsentV2 = function (options) {
711
- return ConsentService_1.ConsentService.acceptConsentV2(options);
712
- };
713
- ;
714
- /**
715
- * get scope consent details
716
- * @param options
717
- * @returns
718
- */
719
- WebAuth.prototype.getScopeConsentDetails = function (options) {
720
- return TokenService_1.TokenService.getScopeConsentDetails(options);
721
- };
722
- ;
723
- /**
724
- * get scope consent version details
725
- * @param options
726
- * @returns
727
- */
728
- WebAuth.prototype.getScopeConsentVersionDetailsV2 = function (options) {
729
- return ConsentService_1.ConsentService.getScopeConsentVersionDetailsV2(options);
730
- };
731
- ;
732
- /**
733
- * accept scope Consent
734
- * @param options
735
- * @returns
736
- */
737
- WebAuth.prototype.acceptScopeConsent = function (options) {
738
- return ConsentService_1.ConsentService.acceptScopeConsent(options);
739
- };
740
- ;
741
- /**
742
- * scope consent continue login
743
- * @param options
744
- */
745
- WebAuth.prototype.scopeConsentContinue = function (options) {
746
- LoginService_1.LoginService.scopeConsentContinue(options);
747
- };
748
- ;
749
- /**
750
- * accept claim Consent
751
- * @param options
752
- * @returns
753
- */
754
- WebAuth.prototype.acceptClaimConsent = function (options) {
755
- return ConsentService_1.ConsentService.acceptClaimConsent(options);
756
- };
757
- ;
758
- /**
759
- * claim consent continue login
760
- * @param options
761
- */
762
- WebAuth.prototype.claimConsentContinue = function (options) {
763
- LoginService_1.LoginService.claimConsentContinue(options);
764
- };
765
- ;
766
- /**
767
- * revoke claim Consent
768
- * @param options
769
- * @returns
770
- */
771
- WebAuth.prototype.revokeClaimConsent = function (options) {
772
- return ConsentService_1.ConsentService.revokeClaimConsent(options);
773
- };
774
- ;
775
- /**
776
- * get Deduplication details
777
- * @param options
778
- * @returns
779
- */
780
- WebAuth.prototype.getDeduplicationDetails = function (options) {
781
- return UserService_1.UserService.getDeduplicationDetails(options);
782
- };
783
- ;
784
- /**
785
- * deduplication login
786
- * @param options
787
- */
788
- WebAuth.prototype.deduplicationLogin = function (options) {
789
- UserService_1.UserService.deduplicationLogin(options);
790
- };
791
- ;
792
- /**
793
- * register Deduplication
794
- * @param options
795
- * @returns
796
- */
797
- WebAuth.prototype.registerDeduplication = function (options) {
798
- return UserService_1.UserService.registerDeduplication(options);
799
- };
800
- ;
801
- /**
802
- * accepts any as the request
803
- * consent continue login
804
- * @param options
805
- */
806
- WebAuth.prototype.consentContinue = function (options) {
807
- LoginService_1.LoginService.consentContinue(options);
808
- };
809
- ;
810
- /**
811
- * mfa continue login
812
- * @param options
813
- */
814
- WebAuth.prototype.mfaContinue = function (options) {
815
- LoginService_1.LoginService.mfaContinue(options);
816
- };
817
- ;
818
- /**
819
- * change password continue
820
- * @param options
821
- */
822
- WebAuth.prototype.firstTimeChangePassword = function (options) {
823
- LoginService_1.LoginService.firstTimeChangePassword(options);
824
- };
825
- ;
826
- /**
827
- * change password
828
- * @param options
829
- * @param access_token
830
- * @returns
831
- */
832
- WebAuth.prototype.changePassword = function (options, access_token) {
833
- return UserService_1.UserService.changePassword(options, access_token);
834
- };
835
- ;
836
- /**
837
- * update profile
838
- * @param options
839
- * @param access_token
840
- * @param sub
841
- * @returns
842
- */
843
- WebAuth.prototype.updateProfile = function (options, access_token, sub) {
844
- return UserService_1.UserService.updateProfile(options, access_token, sub);
845
- };
846
- ;
847
- /**
848
- * get user activities
849
- * @param options
850
- * @param access_token
851
- * @returns
852
- */
853
- WebAuth.prototype.getUserActivities = function (options, access_token) {
854
- var _serviceURL = window.webAuthSettings.authority + "/useractivity-srv/latestactivity";
855
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
856
- };
857
- ;
858
- /**
859
- * @param access_token
860
- * @returns
861
- */
862
- WebAuth.prototype.getAllVerificationList = function (access_token) {
863
- return VerificationService_1.VerificationService.getAllVerificationList(access_token);
864
- };
865
- ;
866
- /**
867
- * initiate link accoount
868
- * @param options
869
- * @param access_token
870
- * @returns
871
- */
872
- WebAuth.prototype.initiateLinkAccount = function (options, access_token) {
873
- return UserService_1.UserService.initiateLinkAccount(options, access_token);
874
- };
875
- ;
876
- /**
877
- * complete link accoount
878
- * @param options
879
- * @param access_token
880
- * @returns
881
- */
882
- WebAuth.prototype.completeLinkAccount = function (options, access_token) {
883
- return UserService_1.UserService.completeLinkAccount(options, access_token);
884
- };
885
- ;
886
- /**
887
- * get linked users
888
- * @param access_token
889
- * @param sub
890
- * @returns
891
- */
892
- WebAuth.prototype.getLinkedUsers = function (access_token, sub) {
893
- return UserService_1.UserService.getLinkedUsers(access_token, sub);
894
- };
895
- ;
896
- /**
897
- * unlink accoount
898
- * @param access_token
899
- * @param identityId
900
- * @returns
901
- */
902
- WebAuth.prototype.unlinkAccount = function (access_token, identityId) {
903
- return UserService_1.UserService.unlinkAccount(access_token, identityId);
904
- };
905
- ;
906
- /**
907
- * image upload
908
- * @param options
909
- * @param access_token
910
- * @returns
911
- */
912
- WebAuth.prototype.updateProfileImage = function (options, access_token) {
913
- var _serviceURL = window.webAuthSettings.authority + "/image-srv/profile/upload";
914
- return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
915
- };
916
- ;
917
- /**
918
- * updateSuggestMFA
919
- * @param track_id
920
- * @param options
921
- * @returns
922
- */
923
- WebAuth.prototype.updateSuggestMFA = function (track_id, options) {
924
- return TokenService_1.TokenService.updateSuggestMFA(track_id, options);
925
- };
926
- ;
927
- /**
928
- * enrollVerification
929
- * @param options
930
- * @returns
931
- */
932
- WebAuth.prototype.enrollVerification = function (options) {
933
- return VerificationService_1.VerificationService.enrollVerification(options);
934
- };
935
- ;
936
- /**
937
- * @deprecated This function is no longer supported, instead use {this.updateStatus()}
938
- * @param status_id
939
- * @returns
940
- */
941
- WebAuth.prototype.updateSocket = function (status_id) {
942
- return VerificationService_1.VerificationService.updateStatus(status_id);
943
- };
944
- ;
945
- /**
946
- * update the status of notification
947
- * @param status_id
948
- * @returns
949
- */
950
- WebAuth.prototype.updateStatus = function (status_id) {
951
- return VerificationService_1.VerificationService.updateStatus(status_id);
952
- };
953
- ;
954
- /**
955
- * setupFidoVerification
956
- * @param options
957
- * @returns
958
- */
959
- WebAuth.prototype.setupFidoVerification = function (options) {
960
- return VerificationService_1.VerificationService.setupFidoVerification(options);
961
- };
962
- ;
963
- /**
964
- * checkVerificationTypeConfigured
965
- * @param options
966
- * @returns
967
- */
968
- WebAuth.prototype.checkVerificationTypeConfigured = function (options) {
969
- return VerificationService_1.VerificationService.checkVerificationTypeConfigured(options);
970
- };
971
- ;
972
- /**
973
- * deleteUserAccount
974
- * @param options
975
- * @returns
976
- */
977
- WebAuth.prototype.deleteUserAccount = function (options) {
978
- return UserService_1.UserService.deleteUserAccount(options);
979
- };
980
- ;
981
- /**
982
- * getMissingFieldsLogin
983
- * @param trackId
984
- * @returns
985
- */
986
- WebAuth.prototype.getMissingFieldsLogin = function (trackId) {
987
- return TokenService_1.TokenService.getMissingFieldsLogin(trackId);
988
- };
989
- ;
990
- /**
991
- * progressiveRegistration
992
- * @param options
993
- * @param headers
994
- * @returns
995
- */
996
- WebAuth.prototype.progressiveRegistration = function (options, headers) {
997
- return LoginService_1.LoginService.progressiveRegistration(options, headers);
998
- };
999
- ;
1000
- /**
1001
- * loginAfterRegister
1002
- * @param options
1003
- */
1004
- WebAuth.prototype.loginAfterRegister = function (options) {
1005
- LoginService_1.LoginService.loginAfterRegister(options);
1006
- };
1007
- ;
1008
- /**
1009
- * device code flow - verify
1010
- * @param code
1011
- */
1012
- WebAuth.prototype.deviceCodeVerify = function (code) {
1013
- TokenService_1.TokenService.deviceCodeVerify(code);
1014
- };
1015
- /**
1016
- * check if an user exists
1017
- * @param options
1018
- * @returns
1019
- */
1020
- WebAuth.prototype.userCheckExists = function (options) {
1021
- return UserService_1.UserService.userCheckExists(options);
1022
- };
1023
- ;
1024
- /**
1025
- * To set accept language
1026
- * @param acceptLanguage
1027
- */
1028
- WebAuth.prototype.setAcceptLanguageHeader = function (acceptLanguage) {
1029
- window.localeSettings = acceptLanguage;
1030
- };
1031
- /**
1032
- * initiate mfa v2
1033
- * @param options
1034
- * @returns
1035
- */
1036
- WebAuth.prototype.initiateMFAV2 = function (options) {
1037
- return VerificationService_1.VerificationService.initiateMFAV2(options);
1038
- };
1039
- ;
1040
- /**
1041
- * initiateVerification
1042
- * @param options
1043
- */
1044
- WebAuth.prototype.initiateVerification = function (options) {
1045
- options.type = options.verification_type;
1046
- this.initiateMFAV2(options);
1047
- };
1048
- ;
1049
- /**
1050
- * initiate email v2
1051
- * @param options
1052
- */
1053
- WebAuth.prototype.initiateEmailV2 = function (options) {
1054
- options.type = "email";
1055
- this.initiateMFAV2(options);
1056
- };
1057
- ;
1058
- /**
1059
- * initiate sms v2
1060
- * @param options
1061
- */
1062
- WebAuth.prototype.initiateSMSV2 = function (options) {
1063
- options.type = "sms";
1064
- this.initiateMFAV2(options);
1065
- };
1066
- ;
1067
- /**
1068
- * initiate ivr v2
1069
- * @param options
1070
- */
1071
- WebAuth.prototype.initiateIVRV2 = function (options) {
1072
- options.type = "ivr";
1073
- this.initiateMFAV2(options);
1074
- };
1075
- ;
1076
- /**
1077
- * initiate backupcode v2
1078
- * @param options
1079
- */
1080
- WebAuth.prototype.initiateBackupcodeV2 = function (options) {
1081
- options.type = "backupcode";
1082
- this.initiateMFAV2(options);
1083
- };
1084
- ;
1085
- /**
1086
- * initiate totp v2
1087
- * @param options
1088
- */
1089
- WebAuth.prototype.initiateTOTPV2 = function (options) {
1090
- options.type = "totp";
1091
- this.initiateMFAV2(options);
1092
- };
1093
- ;
1094
- /**
1095
- * initiate pattern v2
1096
- * @param options
1097
- */
1098
- WebAuth.prototype.initiatePatternV2 = function (options) {
1099
- options.type = "pattern";
1100
- this.initiateMFAV2(options);
1101
- };
1102
- ;
1103
- /**
1104
- * initiate touchid v2
1105
- * @param options
1106
- */
1107
- WebAuth.prototype.initiateTouchIdV2 = function (options) {
1108
- options.type = "touchid";
1109
- this.initiateMFAV2(options);
1110
- };
1111
- ;
1112
- /**
1113
- * initiate smart push v2
1114
- * @param options
1115
- */
1116
- WebAuth.prototype.initiateSmartPushV2 = function (options) {
1117
- options.type = "push";
1118
- this.initiateMFAV2(options);
1119
- };
1120
- ;
1121
- /**
1122
- * initiate face v2
1123
- * @param options
1124
- */
1125
- WebAuth.prototype.initiateFaceV2 = function (options) {
1126
- options.type = "face";
1127
- this.initiateMFAV2(options);
1128
- };
1129
- ;
1130
- /**
1131
- * initiate voice v2
1132
- * @param options
1133
- */
1134
- WebAuth.prototype.initiateVoiceV2 = function (options) {
1135
- options.type = "voice";
1136
- this.initiateMFAV2(options);
1137
- };
1138
- ;
1139
- /**
1140
- * @deprecated
1141
- * @param options
1142
- * @param verificationType
1143
- * @returns
1144
- */
1145
- WebAuth.prototype.initiateMfaV1 = function (options, verificationType) {
1146
- return VerificationService_1.VerificationService.initiateMfaV1(options, verificationType);
1147
- };
1148
- /**
1149
- * @deprecated
1150
- * initiate email - v1
1151
- * @param options
1152
- */
1153
- WebAuth.prototype.initiateEmail = function (options) {
1154
- var verificationType = "EMAIL";
1155
- this.initiateMfaV1(options, verificationType);
1156
- };
1157
- ;
1158
- /**
1159
- * @deprecated
1160
- * initiate SMS - v1
1161
- * @param options
1162
- */
1163
- WebAuth.prototype.initiateSMS = function (options) {
1164
- var verificationType = "SMS";
1165
- this.initiateMfaV1(options, verificationType);
1166
- };
1167
- ;
1168
- /**
1169
- * @deprecated
1170
- * initiate IVR - v1
1171
- * @param options
1172
- */
1173
- WebAuth.prototype.initiateIVR = function (options) {
1174
- var verificationType = "IVR";
1175
- this.initiateMfaV1(options, verificationType);
1176
- };
1177
- ;
1178
- /**
1179
- * @deprecated
1180
- * initiate backup code - v1
1181
- * @param options
1182
- */
1183
- WebAuth.prototype.initiateBackupcode = function (options) {
1184
- var verificationType = "BACKUPCODE";
1185
- this.initiateMfaV1(options, verificationType);
1186
- };
1187
- ;
1188
- /**
1189
- * @deprecated
1190
- * initiate TOTP - v1
1191
- * @param options
1192
- */
1193
- WebAuth.prototype.initiateTOTP = function (options) {
1194
- var verificationType = "TOTP";
1195
- this.initiateMfaV1(options, verificationType);
1196
- };
1197
- ;
1198
- /**
1199
- * @deprecated
1200
- * initiate pattern - v1
1201
- * @param options
1202
- */
1203
- WebAuth.prototype.initiatePattern = function (options) {
1204
- var verificationType = "PATTERN";
1205
- this.initiateMfaV1(options, verificationType);
1206
- };
1207
- ;
1208
- /**
1209
- * @deprecated
1210
- * initiate touchid - v1
1211
- * @param options
1212
- */
1213
- WebAuth.prototype.initiateTouchId = function (options) {
1214
- var verificationType = "TOUCHID";
1215
- this.initiateMfaV1(options, verificationType);
1216
- };
1217
- ;
1218
- /**
1219
- * @deprecated
1220
- * initiate push - v1
1221
- * @param options
1222
- */ WebAuth.prototype.initiateSmartPush = function (options) {
1223
- var verificationType = "PUSH";
1224
- this.initiateMfaV1(options, verificationType);
1225
- };
1226
- ;
1227
- /**
1228
- * @deprecated
1229
- * initiate face - v1
1230
- * @param options
1231
- */
1232
- WebAuth.prototype.initiateFace = function (options) {
1233
- var verificationType = "FACE";
1234
- this.initiateMfaV1(options, verificationType);
1235
- };
1236
- ;
1237
- /**
1238
- * @deprecated
1239
- * initiate Voice - v1
1240
- * @param options
1241
- */
1242
- WebAuth.prototype.initiateVoice = function (options) {
1243
- var verificationType = "VOICE";
1244
- this.initiateMfaV1(options, verificationType);
1245
- };
1246
- ;
1247
- /**
1248
- * authenticate mfa v2
1249
- * @param options
1250
- * @returns
1251
- */
1252
- WebAuth.prototype.authenticateMFAV2 = function (options) {
1253
- return VerificationService_1.VerificationService.authenticateMFAV2(options);
1254
- };
1255
- ;
1256
- /**
1257
- * authenticateVerification
1258
- * @param options
1259
- */
1260
- WebAuth.prototype.authenticateVerification = function (options) {
1261
- options.type = options.verification_type;
1262
- this.authenticateMFAV2(options);
1263
- };
1264
- ;
1265
- /**
1266
- * authenticate email v2
1267
- * @param options
1268
- */
1269
- WebAuth.prototype.authenticateEmailV2 = function (options) {
1270
- options.type = "email";
1271
- this.authenticateMFAV2(options);
1272
- };
1273
- ;
1274
- /**
1275
- * authenticate sms v2
1276
- * @param options
1277
- */
1278
- WebAuth.prototype.authenticateSMSV2 = function (options) {
1279
- options.type = "sms";
1280
- this.authenticateMFAV2(options);
1281
- };
1282
- ;
1283
- /**
1284
- * authenticate ivr v2
1285
- * @param options
1286
- */
1287
- WebAuth.prototype.authenticateIVRV2 = function (options) {
1288
- options.type = "ivr";
1289
- this.authenticateMFAV2(options);
1290
- };
1291
- ;
1292
- /**
1293
- * authenticate backupcode v2
1294
- * @param options
1295
- */
1296
- WebAuth.prototype.authenticateBackupcodeV2 = function (options) {
1297
- options.type = "backupcode";
1298
- this.authenticateMFAV2(options);
1299
- };
1300
- ;
1301
- /**
1302
- * authenticate totp v2
1303
- * @param options
1304
- */
1305
- WebAuth.prototype.authenticateTOTPV2 = function (options) {
1306
- options.type = "totp";
1307
- this.authenticateMFAV2(options);
1308
- };
1309
- ;
1310
- /**
1311
- * authenticateVerification form type (for face)
1312
- * @param options
1313
- * @returns
1314
- */
1315
- WebAuth.prototype.authenticateFaceVerification = function (options) {
1316
- return VerificationService_1.VerificationService.authenticateFaceVerification(options);
1317
- };
1318
- ;
1319
- /**
1320
- * @deprecated
1321
- * setup verification - v1
1322
- * @param options
1323
- * @param access_token
1324
- * @param verificationType
1325
- * @returns
1326
- */
1327
- WebAuth.prototype.setupVerificationV1 = function (options, access_token, verificationType) {
1328
- return VerificationService_1.VerificationService.setupVerificationV1(options, access_token, verificationType);
1329
- };
1330
- /**
1331
- * @deprecated
1332
- * setup email - v1
1333
- * @param options
1334
- * @param access_token
1335
- */
1336
- WebAuth.prototype.setupEmail = function (options, access_token) {
1337
- var verificationType = "EMAIL";
1338
- this.setupVerificationV1(options, access_token, verificationType);
1339
- };
1340
- ;
1341
- /**
1342
- * @deprecated
1343
- * setup sms - v1
1344
- * @param options
1345
- * @param access_token
1346
- */
1347
- WebAuth.prototype.setupSMS = function (options, access_token) {
1348
- var verificationType = "SMS";
1349
- this.setupVerificationV1(options, access_token, verificationType);
1350
- };
1351
- ;
1352
- /**
1353
- * @deprecated
1354
- * setup ivr - v1
1355
- * @param options
1356
- * @param access_token
1357
- */
1358
- WebAuth.prototype.setupIVR = function (options, access_token) {
1359
- var verificationType = "IVR";
1360
- this.setupVerificationV1(options, access_token, verificationType);
1361
- };
1362
- ;
1363
- /**
1364
- * @deprecated
1365
- * setup backupcode - v1
1366
- * @param options
1367
- * @param access_token
1368
- */
1369
- WebAuth.prototype.setupBackupcode = function (options, access_token) {
1370
- var verificationType = "BACKUPCODE";
1371
- this.setupVerificationV1(options, access_token, verificationType);
1372
- };
1373
- ;
1374
- /**
1375
- * @deprecated
1376
- * setup totp - v1
1377
- * @param options
1378
- * @param access_token
1379
- */
1380
- WebAuth.prototype.setupTOTP = function (options, access_token) {
1381
- var verificationType = "TOTP";
1382
- this.setupVerificationV1(options, access_token, verificationType);
1383
- };
1384
- ;
1385
- /**
1386
- * @deprecated
1387
- * setup pattern - v1
1388
- * @param options
1389
- * @param access_token
1390
- */
1391
- WebAuth.prototype.setupPattern = function (options, access_token) {
1392
- var verificationType = "PATTERN";
1393
- this.setupVerificationV1(options, access_token, verificationType);
1394
- };
1395
- ;
1396
- /**
1397
- * @deprecated
1398
- * setup touch - v1
1399
- * @param options
1400
- * @param access_token
1401
- */
1402
- WebAuth.prototype.setupTouchId = function (options, access_token) {
1403
- var verificationType = "TOUCHID";
1404
- this.setupVerificationV1(options, access_token, verificationType);
1405
- };
1406
- ;
1407
- /**
1408
- * @deprecated
1409
- * setup smart push - v1
1410
- * @param options
1411
- * @param access_token
1412
- */
1413
- WebAuth.prototype.setupSmartPush = function (options, access_token) {
1414
- var verificationType = "PUSH";
1415
- this.setupVerificationV1(options, access_token, verificationType);
1416
- };
1417
- ;
1418
- /**
1419
- * @deprecated
1420
- * setup face - v1
1421
- * @param options
1422
- * @param access_token
1423
- */
1424
- WebAuth.prototype.setupFace = function (options, access_token) {
1425
- var verificationType = "FACE";
1426
- this.setupVerificationV1(options, access_token, verificationType);
1427
- };
1428
- ;
1429
- /**
1430
- * @deprecated
1431
- * setup voice - v1
1432
- * @param options
1433
- * @param access_token
1434
- */
1435
- WebAuth.prototype.setupVoice = function (options, access_token) {
1436
- var verificationType = "VOICE";
1437
- this.setupVerificationV1(options, access_token, verificationType);
1438
- };
1439
- ;
1440
- /**
1441
- * @deprecated
1442
- * enroll verification - v1
1443
- * @param options
1444
- * @param access_token
1445
- * @param verificationType
1446
- * @returns
1447
- */
1448
- WebAuth.prototype.enrollVerificationV1 = function (options, access_token, verificationType) {
1449
- return VerificationService_1.VerificationService.enrollVerificationV1(options, access_token, verificationType);
1450
- };
1451
- /**
1452
- * @deprecated
1453
- * enroll email - v1
1454
- * @param options
1455
- * @param access_token
1456
- */
1457
- WebAuth.prototype.enrollEmail = function (options, access_token) {
1458
- var verificationType = "EMAIL";
1459
- this.enrollVerificationV1(options, access_token, verificationType);
1460
- };
1461
- ;
1462
- /**
1463
- * @deprecated
1464
- * enroll SMS - v1
1465
- * @param options
1466
- * @param access_token
1467
- */
1468
- WebAuth.prototype.enrollSMS = function (options, access_token) {
1469
- var verificationType = "SMS";
1470
- this.enrollVerificationV1(options, access_token, verificationType);
1471
- };
1472
- ;
1473
- /**
1474
- * @deprecated
1475
- * enroll IVR - v1
1476
- * @param options
1477
- * @param access_token
1478
- */
1479
- WebAuth.prototype.enrollIVR = function (options, access_token) {
1480
- var verificationType = "IVR";
1481
- this.enrollVerificationV1(options, access_token, verificationType);
1482
- };
1483
- ;
1484
- /**
1485
- * @deprecated
1486
- * enroll TOTP - v1
1487
- * @param options
1488
- * @param access_token
1489
- */
1490
- WebAuth.prototype.enrollTOTP = function (options, access_token) {
1491
- var verificationType = "TOTP";
1492
- this.enrollVerificationV1(options, access_token, verificationType);
1493
- };
1494
- ;
1495
- /**
1496
- * @deprecated
1497
- * authenticate mfa - v1
1498
- * @param verificationType
1499
- * @returns
1500
- */
1501
- WebAuth.prototype.authenticateMfaV1 = function (options, verificationType) {
1502
- return VerificationService_1.VerificationService.authenticateMfaV1(options, verificationType);
1503
- };
1504
- /**
1505
- * @deprecated
1506
- * authenticate email - v1
1507
- * @param options
1508
- */
1509
- WebAuth.prototype.authenticateEmail = function (options) {
1510
- var verificationType = "EMAIL";
1511
- this.authenticateMfaV1(options, verificationType);
1512
- };
1513
- ;
1514
- /**
1515
- * @deprecated
1516
- * authenticate sms - v1
1517
- * @param options
1518
- */
1519
- WebAuth.prototype.authenticateSMS = function (options) {
1520
- var verificationType = "SMS";
1521
- this.authenticateMfaV1(options, verificationType);
1522
- };
1523
- ;
1524
- /**
1525
- * @deprecated
1526
- * authenticate ivr - v1
1527
- * @param options
1528
- */
1529
- WebAuth.prototype.authenticateIVR = function (options) {
1530
- var verificationType = "IVR";
1531
- this.authenticateMfaV1(options, verificationType);
1532
- };
1533
- ;
1534
- /**
1535
- * @deprecated
1536
- * authenticate totp - v1
1537
- * @param options
1538
- */
1539
- WebAuth.prototype.authenticateTOTP = function (options) {
1540
- var verificationType = "TOTP";
1541
- this.authenticateMfaV1(options, verificationType);
1542
- };
1543
- ;
1544
- /**
1545
- * @deprecated
1546
- * authenticate backupcode - v1
1547
- * @param options
1548
- */
1549
- WebAuth.prototype.authenticateBackupcode = function (options) {
1550
- var verificationType = "BACKUPCODE";
1551
- this.authenticateMfaV1(options, verificationType);
1552
- };
1553
- ;
1554
- return WebAuth;
1555
- }());
1556
- exports.WebAuth = WebAuth;