cidaas-javascript-sdk 3.0.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -2
- package/README.md +6 -2
- package/package.json +19 -8
- package/src/main/authentication/index.ts +1 -1
- package/src/main/web-auth/ConsentService.ts +7 -29
- package/src/main/web-auth/Entities.ts +0 -43
- package/src/main/web-auth/Helper.ts +4 -4
- package/src/main/web-auth/TokenService.ts +31 -120
- package/src/main/web-auth/UserService.ts +23 -158
- package/src/main/web-auth/VerificationService.ts +16 -36
- package/src/main/web-auth/WebAuth.ts +48 -241
- package/types/main/authentication/index.js +1 -1
- package/types/main/web-auth/ConsentService.js +7 -31
- package/types/main/web-auth/Entities.d.ts +68 -109
- package/types/main/web-auth/Entities.js +1 -13
- package/types/main/web-auth/Helper.d.ts +3 -3
- package/types/main/web-auth/Helper.js +4 -4
- package/types/main/web-auth/LoginService.d.ts +5 -4
- package/types/main/web-auth/LoginService.js +1 -1
- package/types/main/web-auth/TokenService.js +31 -127
- package/types/main/web-auth/UserService.d.ts +3 -3
- package/types/main/web-auth/UserService.js +38 -135
- package/types/main/web-auth/VerificationService.js +16 -38
- package/types/main/web-auth/WebAuth.d.ts +8 -17
- package/types/main/web-auth/WebAuth.js +62 -273
|
@@ -39,7 +39,6 @@ exports.__esModule = true;
|
|
|
39
39
|
exports.WebAuth = void 0;
|
|
40
40
|
var oidc_client_ts_1 = require("oidc-client-ts");
|
|
41
41
|
var CryptoJS = require("crypto-js");
|
|
42
|
-
var fingerprintjs_1 = require("@fingerprintjs/fingerprintjs");
|
|
43
42
|
var authentication_1 = require("../authentication");
|
|
44
43
|
var Helper_1 = require("./Helper");
|
|
45
44
|
var LoginService_1 = require("./LoginService");
|
|
@@ -66,21 +65,6 @@ var WebAuth = /** @class */ (function () {
|
|
|
66
65
|
console.log(ex);
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
|
-
/**
|
|
70
|
-
* generate code verifier
|
|
71
|
-
*/
|
|
72
|
-
WebAuth.prototype.generateCodeVerifier = function () {
|
|
73
|
-
this.code_verifier = crypto.randomUUID().replace(/-/g, "");
|
|
74
|
-
};
|
|
75
|
-
;
|
|
76
|
-
/**
|
|
77
|
-
* @param code_verifier
|
|
78
|
-
* @returns
|
|
79
|
-
*/
|
|
80
|
-
WebAuth.prototype.generateCodeChallenge = function (code_verifier) {
|
|
81
|
-
return this.base64URL(CryptoJS.SHA256(code_verifier));
|
|
82
|
-
};
|
|
83
|
-
;
|
|
84
68
|
/**
|
|
85
69
|
* @param string
|
|
86
70
|
* @returns
|
|
@@ -273,17 +257,19 @@ var WebAuth = /** @class */ (function () {
|
|
|
273
257
|
if (!settings.scope) {
|
|
274
258
|
settings.scope = "email openid profile mobile";
|
|
275
259
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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);
|
|
285
272
|
}
|
|
286
|
-
loginURL += "&scope=" + settings.scope;
|
|
287
273
|
return loginURL;
|
|
288
274
|
};
|
|
289
275
|
;
|
|
@@ -341,31 +327,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
341
327
|
* @returns
|
|
342
328
|
*/
|
|
343
329
|
WebAuth.prototype.getMissingFields = function (options) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
var http = new XMLHttpRequest();
|
|
347
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + options.requestId + "/" + options.trackId;
|
|
348
|
-
http.onreadystatechange = function () {
|
|
349
|
-
if (http.readyState == 4) {
|
|
350
|
-
if (http.responseText) {
|
|
351
|
-
resolve(JSON.parse(http.responseText));
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
resolve(false);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
http.open("GET", _serviceURL, true);
|
|
359
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
360
|
-
if (window.localeSettings) {
|
|
361
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
362
|
-
}
|
|
363
|
-
http.send();
|
|
364
|
-
}
|
|
365
|
-
catch (ex) {
|
|
366
|
-
reject(ex);
|
|
367
|
-
}
|
|
368
|
-
});
|
|
330
|
+
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + options.requestId + "/" + options.trackId;
|
|
331
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
|
|
369
332
|
};
|
|
370
333
|
;
|
|
371
334
|
/**
|
|
@@ -373,31 +336,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
373
336
|
* @returns
|
|
374
337
|
*/
|
|
375
338
|
WebAuth.prototype.getTenantInfo = function () {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
var http = new XMLHttpRequest();
|
|
379
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
|
|
380
|
-
http.onreadystatechange = function () {
|
|
381
|
-
if (http.readyState == 4) {
|
|
382
|
-
if (http.responseText) {
|
|
383
|
-
resolve(JSON.parse(http.responseText));
|
|
384
|
-
}
|
|
385
|
-
else {
|
|
386
|
-
resolve(false);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
};
|
|
390
|
-
http.open("GET", _serviceURL, true);
|
|
391
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
392
|
-
if (window.localeSettings) {
|
|
393
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
394
|
-
}
|
|
395
|
-
http.send();
|
|
396
|
-
}
|
|
397
|
-
catch (ex) {
|
|
398
|
-
reject(ex);
|
|
399
|
-
}
|
|
400
|
-
});
|
|
339
|
+
var _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
|
|
340
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
|
|
401
341
|
};
|
|
402
342
|
;
|
|
403
343
|
/**
|
|
@@ -419,31 +359,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
419
359
|
* @returns
|
|
420
360
|
*/
|
|
421
361
|
WebAuth.prototype.getClientInfo = function (options) {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
var http = new XMLHttpRequest();
|
|
425
|
-
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
|
|
426
|
-
http.onreadystatechange = function () {
|
|
427
|
-
if (http.readyState == 4) {
|
|
428
|
-
if (http.responseText) {
|
|
429
|
-
resolve(JSON.parse(http.responseText));
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
resolve(false);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
http.open("GET", _serviceURL, true);
|
|
437
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
438
|
-
if (window.localeSettings) {
|
|
439
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
440
|
-
}
|
|
441
|
-
http.send();
|
|
442
|
-
}
|
|
443
|
-
catch (ex) {
|
|
444
|
-
reject(ex);
|
|
445
|
-
}
|
|
446
|
-
});
|
|
362
|
+
var _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
|
|
363
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET");
|
|
447
364
|
};
|
|
448
365
|
;
|
|
449
366
|
/**
|
|
@@ -452,35 +369,12 @@ var WebAuth = /** @class */ (function () {
|
|
|
452
369
|
* @returns
|
|
453
370
|
*/
|
|
454
371
|
WebAuth.prototype.getDevicesInfo = function (options) {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
if (http.readyState == 4) {
|
|
462
|
-
if (http.responseText) {
|
|
463
|
-
resolve(JSON.parse(http.responseText));
|
|
464
|
-
}
|
|
465
|
-
else {
|
|
466
|
-
resolve(false);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
http.open("GET", _serviceURL, true);
|
|
471
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
472
|
-
if (window.localeSettings) {
|
|
473
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
474
|
-
}
|
|
475
|
-
if (window.navigator.userAgent) {
|
|
476
|
-
http.send(JSON.stringify(options));
|
|
477
|
-
}
|
|
478
|
-
http.send();
|
|
479
|
-
}
|
|
480
|
-
catch (ex) {
|
|
481
|
-
reject(ex);
|
|
482
|
-
}
|
|
483
|
-
});
|
|
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");
|
|
484
378
|
};
|
|
485
379
|
;
|
|
486
380
|
/**
|
|
@@ -489,35 +383,12 @@ var WebAuth = /** @class */ (function () {
|
|
|
489
383
|
* @returns
|
|
490
384
|
*/
|
|
491
385
|
WebAuth.prototype.deleteDevice = function (options) {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
if (http.readyState == 4) {
|
|
499
|
-
if (http.responseText) {
|
|
500
|
-
resolve(JSON.parse(http.responseText));
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
resolve(false);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
};
|
|
507
|
-
http.open("DELETE", _serviceURL, true);
|
|
508
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
509
|
-
if (window.localeSettings) {
|
|
510
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
511
|
-
}
|
|
512
|
-
if (window.navigator.userAgent) {
|
|
513
|
-
http.send(JSON.stringify(options));
|
|
514
|
-
}
|
|
515
|
-
http.send();
|
|
516
|
-
}
|
|
517
|
-
catch (ex) {
|
|
518
|
-
reject(ex);
|
|
519
|
-
}
|
|
520
|
-
});
|
|
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");
|
|
521
392
|
};
|
|
522
393
|
;
|
|
523
394
|
/**
|
|
@@ -564,32 +435,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
564
435
|
* @returns
|
|
565
436
|
*/
|
|
566
437
|
WebAuth.prototype.getUnreviewedDevices = function (access_token, sub) {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
var http = new XMLHttpRequest();
|
|
570
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/unreviewlist/" + sub;
|
|
571
|
-
http.onreadystatechange = function () {
|
|
572
|
-
if (http.readyState == 4) {
|
|
573
|
-
if (http.responseText) {
|
|
574
|
-
resolve(JSON.parse(http.responseText));
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
resolve(false);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
http.open("GET", _serviceURL, true);
|
|
582
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
583
|
-
http.setRequestHeader("Authorization", "Bearer ".concat(access_token));
|
|
584
|
-
if (window.localeSettings) {
|
|
585
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
586
|
-
}
|
|
587
|
-
http.send();
|
|
588
|
-
}
|
|
589
|
-
catch (ex) {
|
|
590
|
-
throw new Helper_1.CustomException(ex, 417);
|
|
591
|
-
}
|
|
592
|
-
});
|
|
438
|
+
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/unreviewlist/" + sub;
|
|
439
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", access_token);
|
|
593
440
|
};
|
|
594
441
|
;
|
|
595
442
|
/**
|
|
@@ -599,32 +446,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
599
446
|
* @returns
|
|
600
447
|
*/
|
|
601
448
|
WebAuth.prototype.getReviewedDevices = function (access_token, sub) {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
var http = new XMLHttpRequest();
|
|
605
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/reviewlist/" + sub;
|
|
606
|
-
http.onreadystatechange = function () {
|
|
607
|
-
if (http.readyState == 4) {
|
|
608
|
-
if (http.responseText) {
|
|
609
|
-
resolve(JSON.parse(http.responseText));
|
|
610
|
-
}
|
|
611
|
-
else {
|
|
612
|
-
resolve(false);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
http.open("GET", _serviceURL, true);
|
|
617
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
618
|
-
http.setRequestHeader("Authorization", "Bearer ".concat(access_token));
|
|
619
|
-
if (window.localeSettings) {
|
|
620
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
621
|
-
}
|
|
622
|
-
http.send();
|
|
623
|
-
}
|
|
624
|
-
catch (ex) {
|
|
625
|
-
throw new Helper_1.CustomException(ex, 417);
|
|
626
|
-
}
|
|
627
|
-
});
|
|
449
|
+
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/reviewlist/" + sub;
|
|
450
|
+
return Helper_1.Helper.createPostPromise(undefined, _serviceURL, false, "GET", access_token);
|
|
628
451
|
};
|
|
629
452
|
;
|
|
630
453
|
/**
|
|
@@ -634,32 +457,8 @@ var WebAuth = /** @class */ (function () {
|
|
|
634
457
|
* @returns
|
|
635
458
|
*/
|
|
636
459
|
WebAuth.prototype.reviewDevice = function (options, access_token) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
var http = new XMLHttpRequest();
|
|
640
|
-
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/updatereview";
|
|
641
|
-
http.onreadystatechange = function () {
|
|
642
|
-
if (http.readyState == 4) {
|
|
643
|
-
if (http.responseText) {
|
|
644
|
-
resolve(JSON.parse(http.responseText));
|
|
645
|
-
}
|
|
646
|
-
else {
|
|
647
|
-
resolve(false);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
http.open("PUT", _serviceURL, true);
|
|
652
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
653
|
-
http.setRequestHeader("Authorization", "Bearer ".concat(access_token));
|
|
654
|
-
if (window.localeSettings) {
|
|
655
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
656
|
-
}
|
|
657
|
-
http.send(JSON.stringify(options));
|
|
658
|
-
}
|
|
659
|
-
catch (ex) {
|
|
660
|
-
throw new Helper_1.CustomException(ex, 417);
|
|
661
|
-
}
|
|
662
|
-
});
|
|
460
|
+
var _serviceURL = window.webAuthSettings.authority + "/reports-srv/device/updatereview";
|
|
461
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "PUT", access_token);
|
|
663
462
|
};
|
|
664
463
|
;
|
|
665
464
|
/**
|
|
@@ -671,36 +470,26 @@ var WebAuth = /** @class */ (function () {
|
|
|
671
470
|
return new Promise(function (resolve, reject) {
|
|
672
471
|
try {
|
|
673
472
|
var value = ('; ' + document.cookie).split("; cidaas_dr=").pop().split(';')[0];
|
|
674
|
-
var
|
|
675
|
-
var options = { fingerprint: "", userAgent: "" };
|
|
473
|
+
var options = { userAgent: "" };
|
|
676
474
|
if (!value) {
|
|
677
475
|
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
678
|
-
var
|
|
476
|
+
var http, _serviceURL;
|
|
679
477
|
return __generator(this, function (_a) {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
if (http.readyState == 4) {
|
|
693
|
-
resolve(JSON.parse(http.responseText));
|
|
694
|
-
}
|
|
695
|
-
};
|
|
696
|
-
http.open("POST", _serviceURL, true);
|
|
697
|
-
http.setRequestHeader("Content-type", "application/json");
|
|
698
|
-
if (window.localeSettings) {
|
|
699
|
-
http.setRequestHeader("accept-language", window.localeSettings);
|
|
700
|
-
}
|
|
701
|
-
http.send(JSON.stringify(options));
|
|
702
|
-
return [2 /*return*/];
|
|
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);
|
|
703
490
|
}
|
|
491
|
+
http.send(JSON.stringify(options));
|
|
492
|
+
return [2 /*return*/];
|
|
704
493
|
});
|
|
705
494
|
}); })();
|
|
706
495
|
}
|
|
@@ -867,7 +656,7 @@ var WebAuth = /** @class */ (function () {
|
|
|
867
656
|
* @param options
|
|
868
657
|
*/
|
|
869
658
|
WebAuth.prototype.handleResetPassword = function (options) {
|
|
870
|
-
UserService_1.UserService.handleResetPassword(options);
|
|
659
|
+
return UserService_1.UserService.handleResetPassword(options);
|
|
871
660
|
};
|
|
872
661
|
;
|
|
873
662
|
/**
|
|
@@ -875,7 +664,7 @@ var WebAuth = /** @class */ (function () {
|
|
|
875
664
|
* @param options
|
|
876
665
|
*/
|
|
877
666
|
WebAuth.prototype.resetPassword = function (options) {
|
|
878
|
-
UserService_1.UserService.resetPassword(options);
|
|
667
|
+
return UserService_1.UserService.resetPassword(options);
|
|
879
668
|
};
|
|
880
669
|
;
|
|
881
670
|
/**
|
|
@@ -1063,7 +852,7 @@ var WebAuth = /** @class */ (function () {
|
|
|
1063
852
|
*/
|
|
1064
853
|
WebAuth.prototype.getUserActivities = function (options, access_token) {
|
|
1065
854
|
var _serviceURL = window.webAuthSettings.authority + "/useractivity-srv/latestactivity";
|
|
1066
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
855
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
|
|
1067
856
|
};
|
|
1068
857
|
;
|
|
1069
858
|
/**
|
|
@@ -1122,7 +911,7 @@ var WebAuth = /** @class */ (function () {
|
|
|
1122
911
|
*/
|
|
1123
912
|
WebAuth.prototype.updateProfileImage = function (options, access_token) {
|
|
1124
913
|
var _serviceURL = window.webAuthSettings.authority + "/image-srv/profile/upload";
|
|
1125
|
-
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, access_token);
|
|
914
|
+
return Helper_1.Helper.createPostPromise(options, _serviceURL, false, "POST", access_token);
|
|
1126
915
|
};
|
|
1127
916
|
;
|
|
1128
917
|
/**
|
|
@@ -1744,21 +1533,21 @@ var WebAuth = /** @class */ (function () {
|
|
|
1744
1533
|
;
|
|
1745
1534
|
/**
|
|
1746
1535
|
* @deprecated
|
|
1747
|
-
* authenticate
|
|
1536
|
+
* authenticate totp - v1
|
|
1748
1537
|
* @param options
|
|
1749
1538
|
*/
|
|
1750
|
-
WebAuth.prototype.
|
|
1751
|
-
var verificationType = "
|
|
1539
|
+
WebAuth.prototype.authenticateTOTP = function (options) {
|
|
1540
|
+
var verificationType = "TOTP";
|
|
1752
1541
|
this.authenticateMfaV1(options, verificationType);
|
|
1753
1542
|
};
|
|
1754
1543
|
;
|
|
1755
1544
|
/**
|
|
1756
1545
|
* @deprecated
|
|
1757
|
-
* authenticate
|
|
1546
|
+
* authenticate backupcode - v1
|
|
1758
1547
|
* @param options
|
|
1759
1548
|
*/
|
|
1760
|
-
WebAuth.prototype.
|
|
1761
|
-
var verificationType = "
|
|
1549
|
+
WebAuth.prototype.authenticateBackupcode = function (options) {
|
|
1550
|
+
var verificationType = "BACKUPCODE";
|
|
1762
1551
|
this.authenticateMfaV1(options, verificationType);
|
|
1763
1552
|
};
|
|
1764
1553
|
;
|