cidaas-javascript-sdk 4.2.2 → 4.2.4

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,3 +1,4 @@
1
+ "use strict";
1
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -7,17 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
9
  });
9
10
  };
10
- import { Authentication, OidcManager } from '../authentication';
11
- import { Helper, CustomException } from "./Helper";
12
- import { LoginService } from "./LoginService";
13
- import { UserService } from "./UserService";
14
- import { TokenService } from "./TokenService";
15
- import { VerificationService } from "./VerificationService";
16
- import { ConsentService } from "./ConsentService";
17
- export const createPreloginWebauth = (authority) => {
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WebAuth = exports.createPreloginWebauth = void 0;
13
+ const authentication_1 = require("../authentication");
14
+ const Helper_1 = require("./Helper");
15
+ const LoginService_1 = require("./LoginService");
16
+ const UserService_1 = require("./UserService");
17
+ const TokenService_1 = require("./TokenService");
18
+ const VerificationService_1 = require("./VerificationService");
19
+ const ConsentService_1 = require("./ConsentService");
20
+ const createPreloginWebauth = (authority) => {
18
21
  return new WebAuth({ 'authority': authority });
19
22
  };
20
- export class WebAuth {
23
+ exports.createPreloginWebauth = createPreloginWebauth;
24
+ class WebAuth {
21
25
  constructor(settings) {
22
26
  try {
23
27
  if (!settings.response_type) {
@@ -29,13 +33,13 @@ export class WebAuth {
29
33
  if (settings.authority && settings.authority.charAt(settings.authority.length - 1) === '/') {
30
34
  settings.authority = settings.authority.slice(0, settings.authority.length - 1);
31
35
  }
32
- var usermanager = new OidcManager(settings);
36
+ var usermanager = new authentication_1.OidcManager(settings);
33
37
  window.webAuthSettings = settings;
34
38
  window.usermanager = usermanager;
35
39
  window.localeSettings = null;
36
- window.authentication = new Authentication(window.webAuthSettings, window.usermanager);
40
+ window.authentication = new authentication_1.Authentication(window.webAuthSettings, window.usermanager);
37
41
  window.usermanager.events.addSilentRenewError(function () {
38
- throw new CustomException("Error while renewing silent login", 500);
42
+ throw new Helper_1.CustomException("Error while renewing silent login", 500);
39
43
  });
40
44
  }
41
45
  catch (ex) {
@@ -49,7 +53,7 @@ export class WebAuth {
49
53
  */
50
54
  loginWithBrowser(options) {
51
55
  if (!window.webAuthSettings || !window.authentication) {
52
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
56
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
53
57
  }
54
58
  return window.authentication.loginOrRegisterWithBrowser('login', options);
55
59
  }
@@ -64,7 +68,7 @@ export class WebAuth {
64
68
  */
65
69
  popupSignIn(options) {
66
70
  if (!window.webAuthSettings || !window.authentication) {
67
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
71
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
68
72
  }
69
73
  return window.authentication.popupSignIn(options);
70
74
  }
@@ -79,7 +83,7 @@ export class WebAuth {
79
83
  */
80
84
  silentSignIn(options) {
81
85
  if (!window.webAuthSettings || !window.authentication) {
82
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
86
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
83
87
  }
84
88
  return window.authentication.silentSignIn(options);
85
89
  }
@@ -90,7 +94,7 @@ export class WebAuth {
90
94
  */
91
95
  registerWithBrowser(options) {
92
96
  if (!window.webAuthSettings || !window.authentication) {
93
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
97
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
94
98
  }
95
99
  return window.authentication.loginOrRegisterWithBrowser('register', options);
96
100
  }
@@ -105,7 +109,7 @@ export class WebAuth {
105
109
  */
106
110
  loginCallback(url) {
107
111
  if (!window.webAuthSettings || !window.authentication) {
108
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
112
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
109
113
  }
110
114
  return window.authentication.loginCallback(url);
111
115
  }
@@ -119,7 +123,7 @@ export class WebAuth {
119
123
  */
120
124
  popupSignInCallback(url, keepOpen) {
121
125
  if (!window.webAuthSettings || !window.authentication) {
122
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
126
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
123
127
  }
124
128
  return window.authentication.popupSignInCallback(url, keepOpen);
125
129
  }
@@ -130,7 +134,7 @@ export class WebAuth {
130
134
  */
131
135
  silentSignInCallback(url) {
132
136
  if (!window.webAuthSettings || !window.authentication) {
133
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
137
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
134
138
  }
135
139
  return window.authentication.silentSignInCallback(url);
136
140
  }
@@ -150,7 +154,7 @@ export class WebAuth {
150
154
  getUserInfo() {
151
155
  return __awaiter(this, void 0, void 0, function* () {
152
156
  if (!window.usermanager) {
153
- return Promise.reject(new CustomException("UserManager cannot be empty", 417));
157
+ return Promise.reject(new Helper_1.CustomException("UserManager cannot be empty", 417));
154
158
  }
155
159
  return yield window.usermanager.getUser();
156
160
  });
@@ -162,7 +166,7 @@ export class WebAuth {
162
166
  */
163
167
  logout(options) {
164
168
  if (!window.webAuthSettings || !window.authentication) {
165
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
169
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
166
170
  }
167
171
  return window.authentication.logout(options);
168
172
  }
@@ -173,7 +177,7 @@ export class WebAuth {
173
177
  */
174
178
  popupSignOut(options) {
175
179
  if (!window.webAuthSettings || !window.authentication) {
176
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
180
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
177
181
  }
178
182
  return window.authentication.popupSignOut(options);
179
183
  }
@@ -184,7 +188,7 @@ export class WebAuth {
184
188
  */
185
189
  logoutCallback(url) {
186
190
  if (!window.webAuthSettings || !window.authentication) {
187
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
191
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
188
192
  }
189
193
  return window.authentication.logoutCallback(url);
190
194
  }
@@ -196,7 +200,7 @@ export class WebAuth {
196
200
  */
197
201
  popupSignOutCallback(url, keepOpen) {
198
202
  if (!window.webAuthSettings || !window.authentication) {
199
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
203
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
200
204
  }
201
205
  url = url || window.webAuthSettings.post_logout_redirect_uri;
202
206
  return window.authentication.popupSignOutCallback(url, keepOpen);
@@ -217,7 +221,7 @@ export class WebAuth {
217
221
  */
218
222
  getLoginURL(options) {
219
223
  if (!window.webAuthSettings || !window.authentication) {
220
- return Promise.reject(new CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
224
+ return Promise.reject(new Helper_1.CustomException("Settings or Authentication instance in OIDC cannot be empty", 417));
221
225
  }
222
226
  return new Promise((resolve, reject) => {
223
227
  try {
@@ -247,7 +251,7 @@ export class WebAuth {
247
251
  const ui_locales = window.webAuthSettings.ui_locales;
248
252
  const options = Object.assign({ 'client_id': window.webAuthSettings.client_id, 'redirect_uri': window.webAuthSettings.redirect_uri, 'response_type': (_a = window.webAuthSettings.response_type) !== null && _a !== void 0 ? _a : 'token', "response_mode": (_b = window.webAuthSettings.response_mode) !== null && _b !== void 0 ? _b : 'fragment', "scope": window.webAuthSettings.scope, "nonce": new Date().getTime().toString() }, (ui_locales && { ui_locales } || {}));
249
253
  const serviceURL = window.webAuthSettings.authority + '/authz-srv/authrequest/authz/generate';
250
- return Helper.createHttpPromise(options, serviceURL, false, "POST");
254
+ return Helper_1.Helper.createHttpPromise(options, serviceURL, false, "POST");
251
255
  }
252
256
  ;
253
257
  /**
@@ -263,7 +267,7 @@ export class WebAuth {
263
267
  */
264
268
  getTenantInfo() {
265
269
  const _serviceURL = window.webAuthSettings.authority + "/public-srv/tenantinfo/basic";
266
- return Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
270
+ return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
267
271
  }
268
272
  ;
269
273
  /**
@@ -296,7 +300,7 @@ export class WebAuth {
296
300
  */
297
301
  getClientInfo(options) {
298
302
  const _serviceURL = window.webAuthSettings.authority + "/public-srv/public/" + options.requestId;
299
- return Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
303
+ return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
300
304
  }
301
305
  ;
302
306
  /**
@@ -317,9 +321,9 @@ export class WebAuth {
317
321
  options.userAgent = window.navigator.userAgent;
318
322
  const _serviceURL = window.webAuthSettings.authority + "/device-srv/devices";
319
323
  if (window.navigator.userAgent) {
320
- return Helper.createHttpPromise(options, _serviceURL, false, "GET", accessToken);
324
+ return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "GET", accessToken);
321
325
  }
322
- return Helper.createHttpPromise(undefined, _serviceURL, false, "GET", accessToken);
326
+ return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET", accessToken);
323
327
  }
324
328
  ;
325
329
  /**
@@ -342,9 +346,9 @@ export class WebAuth {
342
346
  const _serviceURL = window.webAuthSettings.authority + "/device-srv/device/" + options.device_id;
343
347
  options.userAgent = window.navigator.userAgent;
344
348
  if (window.navigator.userAgent) {
345
- return Helper.createHttpPromise(options, _serviceURL, false, "DELETE", accessToken);
349
+ return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "DELETE", accessToken);
346
350
  }
347
- return Helper.createHttpPromise(undefined, _serviceURL, false, "DELETE", accessToken);
351
+ return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "DELETE", accessToken);
348
352
  }
349
353
  ;
350
354
  /**
@@ -364,7 +368,7 @@ export class WebAuth {
364
368
  */
365
369
  getRegistrationSetup(options) {
366
370
  const serviceURL = window.webAuthSettings.authority + '/registration-setup-srv/public/list?acceptlanguage=' + options.acceptlanguage + '&requestId=' + options.requestId;
367
- return Helper.createHttpPromise(undefined, serviceURL, false, 'GET');
371
+ return Helper_1.Helper.createHttpPromise(undefined, serviceURL, false, 'GET');
368
372
  }
369
373
  ;
370
374
  /**
@@ -386,7 +390,7 @@ export class WebAuth {
386
390
  userAgent: window.navigator.userAgent
387
391
  };
388
392
  const serviceURL = window.webAuthSettings.authority + '/device-srv/deviceinfo';
389
- return Helper.createHttpPromise(options, serviceURL, false, 'POST');
393
+ return Helper_1.Helper.createHttpPromise(options, serviceURL, false, 'POST');
390
394
  }
391
395
  }
392
396
  ;
@@ -396,7 +400,7 @@ export class WebAuth {
396
400
  * @returns
397
401
  */
398
402
  getUserProfile(options) {
399
- return UserService.getUserProfile(options);
403
+ return UserService_1.UserService.getUserProfile(options);
400
404
  }
401
405
  ;
402
406
  /**
@@ -405,7 +409,7 @@ export class WebAuth {
405
409
  * @returns
406
410
  */
407
411
  renewToken(options) {
408
- return TokenService.renewToken(options);
412
+ return TokenService_1.TokenService.renewToken(options);
409
413
  }
410
414
  ;
411
415
  /**
@@ -414,7 +418,7 @@ export class WebAuth {
414
418
  * @returns
415
419
  */
416
420
  getAccessToken(options) {
417
- return TokenService.getAccessToken(options);
421
+ return TokenService_1.TokenService.getAccessToken(options);
418
422
  }
419
423
  ;
420
424
  /**
@@ -423,7 +427,7 @@ export class WebAuth {
423
427
  * @returns
424
428
  */
425
429
  validateAccessToken(options) {
426
- return TokenService.validateAccessToken(options);
430
+ return TokenService_1.TokenService.validateAccessToken(options);
427
431
  }
428
432
  ;
429
433
  /**
@@ -431,7 +435,7 @@ export class WebAuth {
431
435
  * @param options
432
436
  */
433
437
  loginWithCredentials(options) {
434
- LoginService.loginWithCredentials(options);
438
+ LoginService_1.LoginService.loginWithCredentials(options);
435
439
  }
436
440
  ;
437
441
  /**
@@ -440,7 +444,7 @@ export class WebAuth {
440
444
  * @param queryParams
441
445
  */
442
446
  loginWithSocial(options, queryParams) {
443
- LoginService.loginWithSocial(options, queryParams);
447
+ LoginService_1.LoginService.loginWithSocial(options, queryParams);
444
448
  }
445
449
  ;
446
450
  /**
@@ -449,7 +453,7 @@ export class WebAuth {
449
453
  * @param queryParams
450
454
  */
451
455
  registerWithSocial(options, queryParams) {
452
- LoginService.registerWithSocial(options, queryParams);
456
+ LoginService_1.LoginService.registerWithSocial(options, queryParams);
453
457
  }
454
458
  ;
455
459
  /**
@@ -459,7 +463,7 @@ export class WebAuth {
459
463
  * @returns
460
464
  */
461
465
  register(options, headers) {
462
- return UserService.register(options, headers);
466
+ return UserService_1.UserService.register(options, headers);
463
467
  }
464
468
  ;
465
469
  /**
@@ -468,7 +472,7 @@ export class WebAuth {
468
472
  * @returns
469
473
  */
470
474
  getInviteUserDetails(options) {
471
- return UserService.getInviteUserDetails(options);
475
+ return UserService_1.UserService.getInviteUserDetails(options);
472
476
  }
473
477
  ;
474
478
  /**
@@ -477,7 +481,7 @@ export class WebAuth {
477
481
  * @returns
478
482
  */
479
483
  getCommunicationStatus(options, headers) {
480
- return UserService.getCommunicationStatus(options, headers);
484
+ return UserService_1.UserService.getCommunicationStatus(options, headers);
481
485
  }
482
486
  ;
483
487
  /**
@@ -486,7 +490,7 @@ export class WebAuth {
486
490
  * @returns
487
491
  */
488
492
  initiateAccountVerification(options) {
489
- VerificationService.initiateAccountVerification(options);
493
+ VerificationService_1.VerificationService.initiateAccountVerification(options);
490
494
  }
491
495
  ;
492
496
  /**
@@ -495,7 +499,7 @@ export class WebAuth {
495
499
  * @returns
496
500
  */
497
501
  verifyAccount(options) {
498
- return VerificationService.verifyAccount(options);
502
+ return VerificationService_1.VerificationService.verifyAccount(options);
499
503
  }
500
504
  ;
501
505
  /**
@@ -504,7 +508,7 @@ export class WebAuth {
504
508
  * @returns
505
509
  */
506
510
  initiateResetPassword(options) {
507
- return UserService.initiateResetPassword(options);
511
+ return UserService_1.UserService.initiateResetPassword(options);
508
512
  }
509
513
  ;
510
514
  /**
@@ -512,7 +516,7 @@ export class WebAuth {
512
516
  * @param options
513
517
  */
514
518
  handleResetPassword(options) {
515
- return UserService.handleResetPassword(options);
519
+ return UserService_1.UserService.handleResetPassword(options);
516
520
  }
517
521
  ;
518
522
  /**
@@ -520,7 +524,7 @@ export class WebAuth {
520
524
  * @param options
521
525
  */
522
526
  resetPassword(options) {
523
- return UserService.resetPassword(options);
527
+ return UserService_1.UserService.resetPassword(options);
524
528
  }
525
529
  ;
526
530
  /**
@@ -529,7 +533,7 @@ export class WebAuth {
529
533
  * @returns
530
534
  */
531
535
  getMFAList(options) {
532
- return VerificationService.getMFAList(options);
536
+ return VerificationService_1.VerificationService.getMFAList(options);
533
537
  }
534
538
  ;
535
539
  /**
@@ -538,7 +542,7 @@ export class WebAuth {
538
542
  * @returns
539
543
  */
540
544
  cancelMFA(options) {
541
- return VerificationService.cancelMFA(options);
545
+ return VerificationService_1.VerificationService.cancelMFA(options);
542
546
  }
543
547
  ;
544
548
  /**
@@ -546,7 +550,7 @@ export class WebAuth {
546
550
  * @param options
547
551
  */
548
552
  passwordlessLogin(options) {
549
- LoginService.passwordlessLogin(options);
553
+ LoginService_1.LoginService.passwordlessLogin(options);
550
554
  }
551
555
  ;
552
556
  /**
@@ -555,7 +559,7 @@ export class WebAuth {
555
559
  * @returns
556
560
  */
557
561
  getConsentDetails(options) {
558
- return ConsentService.getConsentDetails(options);
562
+ return ConsentService_1.ConsentService.getConsentDetails(options);
559
563
  }
560
564
  ;
561
565
  /**
@@ -564,7 +568,7 @@ export class WebAuth {
564
568
  * @returns
565
569
  */
566
570
  acceptConsent(options) {
567
- return ConsentService.acceptConsent(options);
571
+ return ConsentService_1.ConsentService.acceptConsent(options);
568
572
  }
569
573
  ;
570
574
  /**
@@ -573,7 +577,7 @@ export class WebAuth {
573
577
  * @returns
574
578
  */
575
579
  loginPrecheck(options) {
576
- return TokenService.loginPrecheck(options);
580
+ return TokenService_1.TokenService.loginPrecheck(options);
577
581
  }
578
582
  ;
579
583
  /**
@@ -582,7 +586,7 @@ export class WebAuth {
582
586
  * @returns
583
587
  */
584
588
  getConsentVersionDetails(options) {
585
- return ConsentService.getConsentVersionDetails(options);
589
+ return ConsentService_1.ConsentService.getConsentVersionDetails(options);
586
590
  }
587
591
  ;
588
592
  /**
@@ -591,7 +595,7 @@ export class WebAuth {
591
595
  * @returns
592
596
  */
593
597
  acceptScopeConsent(options) {
594
- return ConsentService.acceptScopeConsent(options);
598
+ return ConsentService_1.ConsentService.acceptScopeConsent(options);
595
599
  }
596
600
  ;
597
601
  /**
@@ -600,7 +604,7 @@ export class WebAuth {
600
604
  * @returns
601
605
  */
602
606
  acceptClaimConsent(options) {
603
- return ConsentService.acceptClaimConsent(options);
607
+ return ConsentService_1.ConsentService.acceptClaimConsent(options);
604
608
  }
605
609
  ;
606
610
  /**
@@ -609,7 +613,7 @@ export class WebAuth {
609
613
  * @returns
610
614
  */
611
615
  revokeClaimConsent(options) {
612
- return ConsentService.revokeClaimConsent(options);
616
+ return ConsentService_1.ConsentService.revokeClaimConsent(options);
613
617
  }
614
618
  ;
615
619
  /**
@@ -618,7 +622,7 @@ export class WebAuth {
618
622
  * @returns
619
623
  */
620
624
  getDeduplicationDetails(options) {
621
- return UserService.getDeduplicationDetails(options);
625
+ return UserService_1.UserService.getDeduplicationDetails(options);
622
626
  }
623
627
  ;
624
628
  /**
@@ -626,7 +630,7 @@ export class WebAuth {
626
630
  * @param options
627
631
  */
628
632
  deduplicationLogin(options) {
629
- UserService.deduplicationLogin(options);
633
+ UserService_1.UserService.deduplicationLogin(options);
630
634
  }
631
635
  ;
632
636
  /**
@@ -635,7 +639,7 @@ export class WebAuth {
635
639
  * @returns
636
640
  */
637
641
  registerDeduplication(options) {
638
- return UserService.registerDeduplication(options);
642
+ return UserService_1.UserService.registerDeduplication(options);
639
643
  }
640
644
  ;
641
645
  /**
@@ -644,7 +648,7 @@ export class WebAuth {
644
648
  * @param options
645
649
  */
646
650
  consentContinue(options) {
647
- LoginService.consentContinue(options);
651
+ LoginService_1.LoginService.consentContinue(options);
648
652
  }
649
653
  ;
650
654
  /**
@@ -652,7 +656,7 @@ export class WebAuth {
652
656
  * @param options
653
657
  */
654
658
  mfaContinue(options) {
655
- LoginService.mfaContinue(options);
659
+ LoginService_1.LoginService.mfaContinue(options);
656
660
  }
657
661
  ;
658
662
  /**
@@ -660,7 +664,7 @@ export class WebAuth {
660
664
  * @param options
661
665
  */
662
666
  firstTimeChangePassword(options) {
663
- LoginService.firstTimeChangePassword(options);
667
+ LoginService_1.LoginService.firstTimeChangePassword(options);
664
668
  }
665
669
  ;
666
670
  /**
@@ -670,7 +674,7 @@ export class WebAuth {
670
674
  * @returns
671
675
  */
672
676
  changePassword(options, access_token) {
673
- return UserService.changePassword(options, access_token);
677
+ return UserService_1.UserService.changePassword(options, access_token);
674
678
  }
675
679
  ;
676
680
  /**
@@ -681,7 +685,7 @@ export class WebAuth {
681
685
  * @returns
682
686
  */
683
687
  updateProfile(options, access_token, sub) {
684
- return UserService.updateProfile(options, access_token, sub);
688
+ return UserService_1.UserService.updateProfile(options, access_token, sub);
685
689
  }
686
690
  ;
687
691
  /**
@@ -706,14 +710,14 @@ export class WebAuth {
706
710
  */
707
711
  getUserActivities(options, accessToken) {
708
712
  const serviceURL = window.webAuthSettings.authority + '/activity-streams-srv/user-activities';
709
- return Helper.createHttpPromise(options, serviceURL, false, 'POST', accessToken);
713
+ return Helper_1.Helper.createHttpPromise(options, serviceURL, false, 'POST', accessToken);
710
714
  }
711
715
  /**
712
716
  * @param access_token
713
717
  * @returns
714
718
  */
715
719
  getAllVerificationList(access_token) {
716
- return VerificationService.getAllVerificationList(access_token);
720
+ return VerificationService_1.VerificationService.getAllVerificationList(access_token);
717
721
  }
718
722
  ;
719
723
  /**
@@ -723,7 +727,7 @@ export class WebAuth {
723
727
  * @returns
724
728
  */
725
729
  initiateLinkAccount(options, access_token) {
726
- return UserService.initiateLinkAccount(options, access_token);
730
+ return UserService_1.UserService.initiateLinkAccount(options, access_token);
727
731
  }
728
732
  ;
729
733
  /**
@@ -733,7 +737,7 @@ export class WebAuth {
733
737
  * @returns
734
738
  */
735
739
  completeLinkAccount(options, access_token) {
736
- return UserService.completeLinkAccount(options, access_token);
740
+ return UserService_1.UserService.completeLinkAccount(options, access_token);
737
741
  }
738
742
  ;
739
743
  /**
@@ -743,7 +747,7 @@ export class WebAuth {
743
747
  * @returns
744
748
  */
745
749
  getLinkedUsers(access_token, sub) {
746
- return UserService.getLinkedUsers(access_token, sub);
750
+ return UserService_1.UserService.getLinkedUsers(access_token, sub);
747
751
  }
748
752
  ;
749
753
  /**
@@ -753,7 +757,7 @@ export class WebAuth {
753
757
  * @returns
754
758
  */
755
759
  unlinkAccount(access_token, identityId) {
756
- return UserService.unlinkAccount(access_token, identityId);
760
+ return UserService_1.UserService.unlinkAccount(access_token, identityId);
757
761
  }
758
762
  ;
759
763
  /**
@@ -790,7 +794,7 @@ export class WebAuth {
790
794
  const formdata = new FormData(form);
791
795
  formdata.set('image_key', options.image_key);
792
796
  formdata.set('photo', options.photo, options.filename);
793
- return Helper.createHttpPromise(options, serviceURL, undefined, 'POST', access_token, null, formdata);
797
+ return Helper_1.Helper.createHttpPromise(options, serviceURL, undefined, 'POST', access_token, null, formdata);
794
798
  }
795
799
  ;
796
800
  /**
@@ -799,7 +803,7 @@ export class WebAuth {
799
803
  * @returns
800
804
  */
801
805
  initiateEnrollment(options, accessToken) {
802
- return VerificationService.initiateEnrollment(options, accessToken);
806
+ return VerificationService_1.VerificationService.initiateEnrollment(options, accessToken);
803
807
  }
804
808
  ;
805
809
  /**
@@ -808,7 +812,7 @@ export class WebAuth {
808
812
  * @returns
809
813
  */
810
814
  getEnrollmentStatus(status_id, accessToken) {
811
- return VerificationService.getEnrollmentStatus(status_id, accessToken);
815
+ return VerificationService_1.VerificationService.getEnrollmentStatus(status_id, accessToken);
812
816
  }
813
817
  ;
814
818
  /**
@@ -817,7 +821,7 @@ export class WebAuth {
817
821
  * @returns
818
822
  */
819
823
  enrollVerification(options) {
820
- return VerificationService.enrollVerification(options);
824
+ return VerificationService_1.VerificationService.enrollVerification(options);
821
825
  }
822
826
  ;
823
827
  /**
@@ -826,7 +830,7 @@ export class WebAuth {
826
830
  * @returns
827
831
  */
828
832
  checkVerificationTypeConfigured(options) {
829
- return VerificationService.checkVerificationTypeConfigured(options);
833
+ return VerificationService_1.VerificationService.checkVerificationTypeConfigured(options);
830
834
  }
831
835
  ;
832
836
  /**
@@ -835,7 +839,7 @@ export class WebAuth {
835
839
  * @returns
836
840
  */
837
841
  deleteUserAccount(options) {
838
- return UserService.deleteUserAccount(options);
842
+ return UserService_1.UserService.deleteUserAccount(options);
839
843
  }
840
844
  ;
841
845
  /**
@@ -860,10 +864,10 @@ export class WebAuth {
860
864
  getMissingFields(trackId, useSocialProvider) {
861
865
  if (useSocialProvider) {
862
866
  const _serviceURL = window.webAuthSettings.authority + "/public-srv/public/trackinfo/" + useSocialProvider.requestId + "/" + trackId;
863
- return Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
867
+ return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, false, "GET");
864
868
  }
865
869
  else {
866
- return TokenService.getMissingFields(trackId);
870
+ return TokenService_1.TokenService.getMissingFields(trackId);
867
871
  }
868
872
  }
869
873
  ;
@@ -874,21 +878,29 @@ export class WebAuth {
874
878
  * @returns
875
879
  */
876
880
  progressiveRegistration(options, headers) {
877
- return LoginService.progressiveRegistration(options, headers);
881
+ return LoginService_1.LoginService.progressiveRegistration(options, headers);
882
+ }
883
+ ;
884
+ /**
885
+ * loginAfterRegister
886
+ * @param options
887
+ */
888
+ loginAfterRegister(options) {
889
+ LoginService_1.LoginService.loginAfterRegister(options);
878
890
  }
879
891
  ;
880
892
  /**
881
893
  * device code flow - initiate
882
894
  */
883
895
  initiateDeviceCode(clientId) {
884
- return TokenService.initiateDeviceCode(clientId);
896
+ return TokenService_1.TokenService.initiateDeviceCode(clientId);
885
897
  }
886
898
  /**
887
899
  * device code flow - verify
888
900
  * @param code
889
901
  */
890
902
  deviceCodeVerify(code) {
891
- TokenService.deviceCodeVerify(code);
903
+ TokenService_1.TokenService.deviceCodeVerify(code);
892
904
  }
893
905
  /**
894
906
  * check if an user exists
@@ -896,7 +908,7 @@ export class WebAuth {
896
908
  * @returns
897
909
  */
898
910
  userCheckExists(options) {
899
- return UserService.userCheckExists(options);
911
+ return UserService_1.UserService.userCheckExists(options);
900
912
  }
901
913
  ;
902
914
  /**
@@ -914,9 +926,9 @@ export class WebAuth {
914
926
  initiateMFA(options, accessToken) {
915
927
  // TODO: remove accessToken parameter in the next major release
916
928
  if (accessToken) {
917
- return VerificationService.initiateMFA(options, accessToken);
929
+ return VerificationService_1.VerificationService.initiateMFA(options, accessToken);
918
930
  }
919
- return VerificationService.initiateMFA(options);
931
+ return VerificationService_1.VerificationService.initiateMFA(options);
920
932
  }
921
933
  ;
922
934
  /**
@@ -925,14 +937,15 @@ export class WebAuth {
925
937
  * @returns
926
938
  */
927
939
  authenticateMFA(options) {
928
- return VerificationService.authenticateMFA(options);
940
+ return VerificationService_1.VerificationService.authenticateMFA(options);
929
941
  }
930
942
  ;
931
943
  /**
932
944
  * offline token check
933
945
  */
934
946
  offlineTokenCheck(accessToken) {
935
- return TokenService.offlineTokenCheck(accessToken);
947
+ return TokenService_1.TokenService.offlineTokenCheck(accessToken);
936
948
  }
937
949
  ;
938
950
  }
951
+ exports.WebAuth = WebAuth;