@lifeready/core 1.1.18 → 1.1.20

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.
Files changed (38) hide show
  1. package/bundles/lifeready-core.umd.js +284 -204
  2. package/bundles/lifeready-core.umd.js.map +1 -1
  3. package/bundles/lifeready-core.umd.min.js +1 -1
  4. package/bundles/lifeready-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/_common/utils.js +27 -3
  6. package/esm2015/lib/auth/auth.config.js +1 -1
  7. package/esm2015/lib/auth/auth.types.js +1 -1
  8. package/esm2015/lib/auth/life-ready-auth.service.js +83 -13
  9. package/esm2015/lib/file-upload/file-upload.service.js +12 -20
  10. package/esm2015/lib/idle/idle.service.js +8 -15
  11. package/esm2015/lib/key/key.service.js +4 -4
  12. package/esm2015/lib/lbop/lbop.service.js +4 -4
  13. package/esm2015/lib/life-ready.config.js +8 -12
  14. package/esm2015/lib/life-ready.module.js +5 -5
  15. package/esm2015/lib/password/password.service.js +11 -17
  16. package/esm2015/lib/profile/profile.service.js +4 -4
  17. package/esm2015/lib/register/register.service.js +4 -4
  18. package/esm2015/lib/time/time.service.js +4 -16
  19. package/esm2015/lib/tp-password-reset/tp-password-reset-user.service.js +4 -4
  20. package/fesm2015/lifeready-core.js +196 -146
  21. package/fesm2015/lifeready-core.js.map +1 -1
  22. package/lib/_common/utils.d.ts +10 -0
  23. package/lib/auth/auth.config.d.ts +2 -2
  24. package/lib/auth/auth.types.d.ts +0 -1
  25. package/lib/auth/life-ready-auth.service.d.ts +14 -5
  26. package/lib/file-upload/file-upload.service.d.ts +4 -4
  27. package/lib/idle/idle.service.d.ts +2 -2
  28. package/lib/key/key.service.d.ts +2 -2
  29. package/lib/lbop/lbop.service.d.ts +2 -2
  30. package/lib/life-ready.config.d.ts +6 -3
  31. package/lib/life-ready.module.d.ts +2 -2
  32. package/lib/password/password.service.d.ts +6 -5
  33. package/lib/profile/profile.service.d.ts +2 -2
  34. package/lib/register/register.service.d.ts +2 -2
  35. package/lib/time/time.service.d.ts +0 -1
  36. package/lib/tp-password-reset/tp-password-reset-user.service.d.ts +2 -2
  37. package/lifeready-core.metadata.json +1 -1
  38. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('apollo-angular'), require('@dagrejs/graphlib'), require('lodash'), require('node-jose'), require('@aws-amplify/auth/lib-esm/Auth'), require('graphql-tag'), require('moment'), require('@apollo/client/core'), require('@apollo/client/link/context'), require('@apollo/client/link/retry'), require('ngx-cookie-service'), require('graphql/language/printer'), require('@aws-amplify/auth'), require('@aws-amplify/core'), require('rxjs'), require('@angular/common/http'), require('@ng-idle/core'), require('@ng-idle/keepalive'), require('slip39')) :
3
- typeof define === 'function' && define.amd ? define('@lifeready/core', ['exports', '@angular/core', 'apollo-angular', '@dagrejs/graphlib', 'lodash', 'node-jose', '@aws-amplify/auth/lib-esm/Auth', 'graphql-tag', 'moment', '@apollo/client/core', '@apollo/client/link/context', '@apollo/client/link/retry', 'ngx-cookie-service', 'graphql/language/printer', '@aws-amplify/auth', '@aws-amplify/core', 'rxjs', '@angular/common/http', '@ng-idle/core', '@ng-idle/keepalive', 'slip39'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.lifeready = global.lifeready || {}, global.lifeready.core = {}), global.ng.core, global['apollo-angular'], global['@dagrejs/graphlib'], global.lodash, global['node-jose'], global['@aws-amplify/auth/lib-esm/Auth'], global['graphql-tag'], global.moment, global['@apollo/client/core'], global['@apollo/client/link/context'], global['@apollo/client/link/retry'], global['ngx-cookie-service'], global['graphql/language/printer'], global['@aws-amplify/auth'], global['@aws-amplify/core'], global.rxjs, global.ng.common.http, global['@ng-idle/core'], global['@ng-idle/keepalive'], global.slip39));
5
- }(this, (function (exports, i0, i1, graphlib, _, nodeJose, i4, gql, moment_, core, context, retry, i2, gqlPrinter, Auth, core$1, rxjs, i2$1, i3, i4$1, slip39) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('apollo-angular'), require('@dagrejs/graphlib'), require('lodash'), require('node-jose'), require('@aws-amplify/auth/lib-esm/Auth'), require('graphql-tag'), require('moment'), require('@apollo/client/core'), require('@apollo/client/link/context'), require('@apollo/client/link/retry'), require('ngx-cookie-service'), require('graphql/language/printer'), require('@aws-amplify/auth'), require('@angular/common/http'), require('@aws-amplify/core'), require('rxjs'), require('@ng-idle/core'), require('@ng-idle/keepalive'), require('slip39')) :
3
+ typeof define === 'function' && define.amd ? define('@lifeready/core', ['exports', '@angular/core', 'apollo-angular', '@dagrejs/graphlib', 'lodash', 'node-jose', '@aws-amplify/auth/lib-esm/Auth', 'graphql-tag', 'moment', '@apollo/client/core', '@apollo/client/link/context', '@apollo/client/link/retry', 'ngx-cookie-service', 'graphql/language/printer', '@aws-amplify/auth', '@angular/common/http', '@aws-amplify/core', 'rxjs', '@ng-idle/core', '@ng-idle/keepalive', 'slip39'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.lifeready = global.lifeready || {}, global.lifeready.core = {}), global.ng.core, global['apollo-angular'], global['@dagrejs/graphlib'], global.lodash, global['node-jose'], global['@aws-amplify/auth/lib-esm/Auth'], global['graphql-tag'], global.moment, global['@apollo/client/core'], global['@apollo/client/link/context'], global['@apollo/client/link/retry'], global['ngx-cookie-service'], global['graphql/language/printer'], global['@aws-amplify/auth'], global.ng.common.http, global['@aws-amplify/core'], global.rxjs, global['@ng-idle/core'], global['@ng-idle/keepalive'], global.slip39));
5
+ }(this, (function (exports, i0, i1, graphlib, _, nodeJose, i4, gql, moment_, core, context, retry, i2, gqlPrinter, Auth, i2$1, core$1, rxjs, i3, i4$1, slip39) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -532,6 +532,112 @@
532
532
  return LrBadStateException;
533
533
  }(LrException));
534
534
 
535
+ // promote everything to a promise.
536
+ function promiseAllMayAsync(values) {
537
+ if (!Array.isArray(values)) {
538
+ throw new Error('not array');
539
+ }
540
+ if (values.some(function (value) { return value === null || value === void 0 ? void 0 : value.then; })) {
541
+ var ret = Promise.all(values);
542
+ return ret;
543
+ }
544
+ else {
545
+ return values;
546
+ }
547
+ }
548
+ function remap(obj, values) {
549
+ var e_1, _b;
550
+ var ret = {};
551
+ try {
552
+ for (var _c = __values(Object.keys(obj).entries()), _d = _c.next(); !_d.done; _d = _c.next()) {
553
+ var _e = __read(_d.value, 2), i = _e[0], key = _e[1];
554
+ ret[key] = values[i];
555
+ }
556
+ }
557
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
558
+ finally {
559
+ try {
560
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
561
+ }
562
+ finally { if (e_1) throw e_1.error; }
563
+ }
564
+ return ret;
565
+ }
566
+ function mapValuesMayAsync(obj,
567
+ // callback can either return a Promise, or a value.
568
+ // The Promise<any> type is redundant but it shows that it can return a promise
569
+ callback) {
570
+ var values = promiseAllMayAsync(Object.entries(obj).map(function (_b) {
571
+ var _c = __read(_b, 2), key = _c[0], value = _c[1];
572
+ return callback(value, key, obj);
573
+ }));
574
+ if (values.then) {
575
+ return values.then(function (resolvedValues) { return remap(obj, resolvedValues); });
576
+ }
577
+ else {
578
+ return remap(obj, values);
579
+ }
580
+ }
581
+ function mapValuesAsync(obj,
582
+ // callback can either return a Promise, or a value.
583
+ // The Promise<any> type is redundant but it shows that it can return a promise
584
+ // By default, it returns the value without any process, so you can use
585
+ // this to simply wait for all promises in an object to resolve.
586
+ callback) {
587
+ var values = Promise.all(Object.entries(obj).map(function (_b) {
588
+ var _c = __read(_b, 2), key = _c[0], value = _c[1];
589
+ return callback ? callback(value, key, obj) : value;
590
+ }));
591
+ return values.then(function (resolvedValues) { return remap(obj, resolvedValues); });
592
+ }
593
+ /**
594
+ * Returns the defaultValue when value is undefined
595
+ * @param value The value to check
596
+ * @param defaultValue The value to return if value is undefined.
597
+ */
598
+ function undefinedDefault(value, defaultValue) {
599
+ return value === undefined ? defaultValue : value;
600
+ }
601
+ function getAccessJwtToken(auth) {
602
+ return __awaiter(this, void 0, void 0, function () {
603
+ var error_1;
604
+ return __generator(this, function (_b) {
605
+ switch (_b.label) {
606
+ case 0:
607
+ _b.trys.push([0, 2, , 3]);
608
+ return [4 /*yield*/, auth.currentSession()];
609
+ case 1: return [2 /*return*/, (_b.sent()).getAccessToken().getJwtToken()];
610
+ case 2:
611
+ error_1 = _b.sent();
612
+ // The error thrown by Cognito is of type string.
613
+ if (error_1 == 'No current user') {
614
+ return [2 /*return*/, ''];
615
+ }
616
+ throw error_1;
617
+ case 3: return [2 /*return*/];
618
+ }
619
+ });
620
+ });
621
+ }
622
+ function httpOptions(auth, config) {
623
+ var _a;
624
+ return __awaiter(this, void 0, void 0, function () {
625
+ var token, debugUsername;
626
+ return __generator(this, function (_b) {
627
+ switch (_b.label) {
628
+ case 0: return [4 /*yield*/, getAccessJwtToken(auth)];
629
+ case 1:
630
+ token = _b.sent();
631
+ debugUsername = (_a = config.debug) === null || _a === void 0 ? void 0 : _a.username;
632
+ return [2 /*return*/, {
633
+ withCredentials: true,
634
+ headers: Object.assign(Object.assign({}, (token && { authorization: "Bearer " + token })), (debugUsername && { 'x-kc-dev-user': debugUsername })),
635
+ }];
636
+ }
637
+ });
638
+ });
639
+ }
640
+
535
641
  // Ref: https://stackoverflow.com/questions/59735280/angular-8-moment-error-cannot-call-a-namespace-moment
536
642
  var moment = moment___namespace;
537
643
  var ServerTimeQuery = gql__default['default'](templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query {\n serverTime {\n timestamp\n }\n }\n"], ["\n query {\n serverTime {\n timestamp\n }\n }\n"])));
@@ -546,33 +652,13 @@
546
652
  this.offsetMs = null; // Millisecond offset of local clock.
547
653
  this.verified = false; // Verified with independent time source
548
654
  }
549
- TimeService.prototype.getAccessToken = function () {
550
- return __awaiter(this, void 0, void 0, function () {
551
- var error_1;
552
- return __generator(this, function (_a) {
553
- switch (_a.label) {
554
- case 0:
555
- _a.trys.push([0, 2, , 3]);
556
- return [4 /*yield*/, this.auth.currentAuthenticatedUser()];
557
- case 1: return [2 /*return*/, (_a.sent())
558
- .getSignInUserSession()
559
- .getAccessToken()
560
- .getJwtToken()];
561
- case 2:
562
- error_1 = _a.sent();
563
- return [2 /*return*/, '']; // Not authenticated
564
- case 3: return [2 /*return*/];
565
- }
566
- });
567
- });
568
- };
569
655
  // Get time from independent source to confirm.
570
656
  TimeService.prototype.verifyCognito = function () {
571
657
  return __awaiter(this, void 0, void 0, function () {
572
658
  var accessToken, response, now, verifyTime, serverTime, diff;
573
659
  return __generator(this, function (_a) {
574
660
  switch (_a.label) {
575
- case 0: return [4 /*yield*/, this.getAccessToken()];
661
+ case 0: return [4 /*yield*/, getAccessJwtToken(this.auth)];
576
662
  case 1:
577
663
  accessToken = _a.sent();
578
664
  if (!accessToken) {
@@ -652,7 +738,7 @@
652
738
  if (!this.VERIFY_ENABLED) return [3 /*break*/, 3];
653
739
  _a = !this.verified;
654
740
  if (!_a) return [3 /*break*/, 2];
655
- return [4 /*yield*/, this.getAccessToken()];
741
+ return [4 /*yield*/, getAccessJwtToken(this.auth)];
656
742
  case 1:
657
743
  _a = (_b.sent());
658
744
  _b.label = 2;
@@ -1283,7 +1369,10 @@
1283
1369
  { type: WebCryptoService }
1284
1370
  ]; };
1285
1371
 
1286
- var LR_CONFIG = new i0.InjectionToken('LR.AUTH');
1372
+ // The injection token string is set to be the same as the const stand name since you
1373
+ // can possibly have different tokens with the same type (i.e. KcConfig). So it would not
1374
+ // be appropriate to use "KcConfig" as the token string.
1375
+ var KC_CONFIG = new i0.InjectionToken('KC_CONFIG');
1287
1376
  var RETRY_ERROR_CODES = [exports.LrApiErrorCode.CONCURRENT_ACCESS];
1288
1377
  var configureApollo = function (config, auth) {
1289
1378
  var defaultOptions = {
@@ -1302,25 +1391,13 @@
1302
1391
  var authLink = context.setContext(function (_, _b) {
1303
1392
  var headers = _b.headers;
1304
1393
  return __awaiter(void 0, void 0, void 0, function () {
1305
- var accessJwt, _a_1;
1394
+ var options;
1306
1395
  return __generator(this, function (_b) {
1307
1396
  switch (_b.label) {
1308
- case 0:
1309
- accessJwt = null;
1310
- _b.label = 1;
1397
+ case 0: return [4 /*yield*/, httpOptions(auth, config)];
1311
1398
  case 1:
1312
- _b.trys.push([1, 3, , 4]);
1313
- return [4 /*yield*/, auth.currentSession()];
1314
- case 2:
1315
- accessJwt = (_b.sent()).getAccessToken();
1316
- return [3 /*break*/, 4];
1317
- case 3:
1318
- _a_1 = _b.sent();
1319
- console.log('User not signed in');
1320
- return [3 /*break*/, 4];
1321
- case 4: return [2 /*return*/, {
1322
- headers: Object.assign(Object.assign({}, headers), { authorization: accessJwt ? "Bearer " + accessJwt.jwtToken : '' }),
1323
- }];
1399
+ options = _b.sent();
1400
+ return [2 /*return*/, Object.assign(Object.assign({}, options), { headers: Object.assign(Object.assign({}, headers), options.headers) })];
1324
1401
  }
1325
1402
  });
1326
1403
  });
@@ -1723,14 +1800,14 @@
1723
1800
  };
1724
1801
  return KeyService;
1725
1802
  }());
1726
- KeyService.ɵprov = i0.ɵɵdefineInjectable({ factory: function KeyService_Factory() { return new KeyService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(PersistService)); }, token: KeyService, providedIn: "root" });
1803
+ KeyService.ɵprov = i0.ɵɵdefineInjectable({ factory: function KeyService_Factory() { return new KeyService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(PersistService)); }, token: KeyService, providedIn: "root" });
1727
1804
  KeyService.decorators = [
1728
1805
  { type: i0.Injectable, args: [{
1729
1806
  providedIn: 'root',
1730
1807
  },] }
1731
1808
  ];
1732
1809
  KeyService.ctorParameters = function () { return [
1733
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
1810
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
1734
1811
  { type: PersistService }
1735
1812
  ]; };
1736
1813
 
@@ -2381,76 +2458,6 @@
2381
2458
  };
2382
2459
  }
2383
2460
 
2384
- /* eslint-disable @typescript-eslint/no-explicit-any */
2385
- // Promise.all always returns a promise, even if all the values are not async.
2386
- // During processing of deep hierarchies of nested objects we don't always need to
2387
- // promote everything to a promise.
2388
- function promiseAllMayAsync(values) {
2389
- if (!Array.isArray(values)) {
2390
- throw new Error('not array');
2391
- }
2392
- if (values.some(function (value) { return value === null || value === void 0 ? void 0 : value.then; })) {
2393
- var ret = Promise.all(values);
2394
- return ret;
2395
- }
2396
- else {
2397
- return values;
2398
- }
2399
- }
2400
- function remap(obj, values) {
2401
- var e_1, _a;
2402
- var ret = {};
2403
- try {
2404
- for (var _b = __values(Object.keys(obj).entries()), _c = _b.next(); !_c.done; _c = _b.next()) {
2405
- var _d = __read(_c.value, 2), i = _d[0], key = _d[1];
2406
- ret[key] = values[i];
2407
- }
2408
- }
2409
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2410
- finally {
2411
- try {
2412
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2413
- }
2414
- finally { if (e_1) throw e_1.error; }
2415
- }
2416
- return ret;
2417
- }
2418
- function mapValuesMayAsync(obj,
2419
- // callback can either return a Promise, or a value.
2420
- // The Promise<any> type is redundant but it shows that it can return a promise
2421
- callback) {
2422
- var values = promiseAllMayAsync(Object.entries(obj).map(function (_a) {
2423
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
2424
- return callback(value, key, obj);
2425
- }));
2426
- if (values.then) {
2427
- return values.then(function (resolvedValues) { return remap(obj, resolvedValues); });
2428
- }
2429
- else {
2430
- return remap(obj, values);
2431
- }
2432
- }
2433
- function mapValuesAsync(obj,
2434
- // callback can either return a Promise, or a value.
2435
- // The Promise<any> type is redundant but it shows that it can return a promise
2436
- // By default, it returns the value without any process, so you can use
2437
- // this to simply wait for all promises in an object to resolve.
2438
- callback) {
2439
- var values = Promise.all(Object.entries(obj).map(function (_a) {
2440
- var _b = __read(_a, 2), key = _b[0], value = _b[1];
2441
- return callback ? callback(value, key, obj) : value;
2442
- }));
2443
- return values.then(function (resolvedValues) { return remap(obj, resolvedValues); });
2444
- }
2445
- /**
2446
- * Returns the defaultValue when value is undefined
2447
- * @param value The value to check
2448
- * @param defaultValue The value to return if value is undefined.
2449
- */
2450
- function undefinedDefault(value, defaultValue) {
2451
- return value === undefined ? defaultValue : value;
2452
- }
2453
-
2454
2461
  var DefaultProcessorOptions = {
2455
2462
  hasKeys: true,
2456
2463
  };
@@ -3963,25 +3970,21 @@
3963
3970
  };
3964
3971
  IdleService.prototype.keepalivePost = function () {
3965
3972
  return __awaiter(this, void 0, void 0, function () {
3966
- var cognitoUser, keepaliveResult;
3967
- return __generator(this, function (_a) {
3968
- switch (_a.label) {
3969
- case 0: return [4 /*yield*/, this.auth.currentAuthenticatedUser()];
3970
- case 1:
3971
- cognitoUser = _a.sent();
3972
- return [4 /*yield*/, this.http
3973
- .post(this.config.authUrl + "auth/keepalive/", null, {
3974
- withCredentials: true,
3975
- headers: {
3976
- Authorization: "Bearer " + cognitoUser
3977
- .getSignInUserSession()
3978
- .getAccessToken()
3979
- .getJwtToken(),
3980
- },
3981
- })
3982
- .toPromise()];
3973
+ var keepaliveResult, _a, _b, _c;
3974
+ return __generator(this, function (_d) {
3975
+ switch (_d.label) {
3976
+ case 0:
3977
+ _b = (_a = this.http)
3978
+ .post;
3979
+ _c = [this.config.authUrl + "auth/keepalive/", null];
3980
+ // /auth/keepalive/ will be extending the sessions cookie.
3981
+ return [4 /*yield*/, httpOptions(this.auth, this.config)];
3982
+ case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([
3983
+ // /auth/keepalive/ will be extending the sessions cookie.
3984
+ _d.sent()]))
3985
+ .toPromise()];
3983
3986
  case 2:
3984
- keepaliveResult = _a.sent();
3987
+ keepaliveResult = _d.sent();
3985
3988
  return [2 /*return*/, {
3986
3989
  keepaliveResult: keepaliveResult,
3987
3990
  expiresAfterSeconds: this.idle.getIdle() +
@@ -4069,14 +4072,14 @@
4069
4072
  };
4070
4073
  return IdleService;
4071
4074
  }());
4072
- IdleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IdleService_Factory() { return new IdleService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i3.Idle), i0.ɵɵinject(i4$1.Keepalive), i0.ɵɵinject(KeyService), i0.ɵɵinject(i4.AuthClass)); }, token: IdleService, providedIn: "root" });
4075
+ IdleService.ɵprov = i0.ɵɵdefineInjectable({ factory: function IdleService_Factory() { return new IdleService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i3.Idle), i0.ɵɵinject(i4$1.Keepalive), i0.ɵɵinject(KeyService), i0.ɵɵinject(i4.AuthClass)); }, token: IdleService, providedIn: "root" });
4073
4076
  IdleService.decorators = [
4074
4077
  { type: i0.Injectable, args: [{
4075
4078
  providedIn: 'root',
4076
4079
  },] }
4077
4080
  ];
4078
4081
  IdleService.ctorParameters = function () { return [
4079
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
4082
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
4080
4083
  { type: i2$1.HttpClient },
4081
4084
  { type: i3.Idle },
4082
4085
  { type: i4$1.Keepalive },
@@ -4992,14 +4995,14 @@
4992
4995
  };
4993
4996
  return ProfileService;
4994
4997
  }());
4995
- ProfileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProfileService_Factory() { return new ProfileService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(KeyService), i0.ɵɵinject(KeyMetaService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(EncryptionService)); }, token: ProfileService, providedIn: "root" });
4998
+ ProfileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProfileService_Factory() { return new ProfileService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(KeyService), i0.ɵɵinject(KeyMetaService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(EncryptionService)); }, token: ProfileService, providedIn: "root" });
4996
4999
  ProfileService.decorators = [
4997
5000
  { type: i0.Injectable, args: [{
4998
5001
  providedIn: 'root',
4999
5002
  },] }
5000
5003
  ];
5001
5004
  ProfileService.ctorParameters = function () { return [
5002
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
5005
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
5003
5006
  { type: i2$1.HttpClient },
5004
5007
  { type: LrApolloService },
5005
5008
  { type: KeyService },
@@ -5021,7 +5024,7 @@
5021
5024
  return PasswordCheck;
5022
5025
  }());
5023
5026
  var PasswordService = /** @class */ (function () {
5024
- function PasswordService(config, http, apollo, auth, profileService, keyFactory, encryptionService, keyGraph, webCryptoService, idleService) {
5027
+ function PasswordService(config, http, apollo, auth, profileService, keyFactory, encryptionService, keyGraph, webCryptoService) {
5025
5028
  this.config = config;
5026
5029
  this.http = http;
5027
5030
  this.apollo = apollo;
@@ -5031,7 +5034,6 @@
5031
5034
  this.encryptionService = encryptionService;
5032
5035
  this.keyGraph = keyGraph;
5033
5036
  this.webCryptoService = webCryptoService;
5034
- this.idleService = idleService;
5035
5037
  this.CLIENT_NONCE_LENGTH = 32;
5036
5038
  }
5037
5039
  PasswordService.prototype.checkPassword = function (plainPassword) {
@@ -5213,7 +5215,7 @@
5213
5215
  // a network timeout for example. But we don't know if it's the response that timed out and
5214
5216
  // the idp password change was actually carried out. So we have to be extra conservative and
5215
5217
  // only act on a clear success. Otherwise we go into recover mode.
5216
- return [4 /*yield*/, this.changePasswordComplete(cognitoUser.getSignInUserSession().getAccessToken().getJwtToken(), true, token)];
5218
+ return [4 /*yield*/, this.changePasswordComplete({ useNewPassword: true, token: token })];
5217
5219
  case 9:
5218
5220
  // --Potential Failure Point 3--
5219
5221
  // IdP password change
@@ -5227,17 +5229,20 @@
5227
5229
  });
5228
5230
  });
5229
5231
  };
5230
- PasswordService.prototype.changePasswordComplete = function (accessToken, useNewPassword, token) {
5231
- if (token === void 0) { token = null; }
5232
+ PasswordService.prototype.changePasswordComplete = function (options) {
5232
5233
  return __awaiter(this, void 0, void 0, function () {
5233
- return __generator(this, function (_a) {
5234
- return [2 /*return*/, this.http
5235
- .post(this.config.authUrl + "users/password-change-complete/", Object.assign({ use_new_password: useNewPassword }, (token && { token: token })), {
5236
- headers: {
5237
- Authorization: "Bearer " + accessToken,
5238
- },
5239
- })
5240
- .toPromise()];
5234
+ var useNewPassword, token, _a, _b, _c;
5235
+ return __generator(this, function (_d) {
5236
+ switch (_d.label) {
5237
+ case 0:
5238
+ useNewPassword = options.useNewPassword, token = options.token;
5239
+ _b = (_a = this.http)
5240
+ .post;
5241
+ _c = [this.config.authUrl + "users/password-change-complete/", Object.assign({ use_new_password: useNewPassword }, (token && { token: token }))];
5242
+ return [4 /*yield*/, httpOptions(this.auth, this.config)];
5243
+ case 1: return [2 /*return*/, _b.apply(_a, _c.concat([_d.sent()]))
5244
+ .toPromise()];
5245
+ }
5241
5246
  });
5242
5247
  });
5243
5248
  };
@@ -5390,14 +5395,14 @@
5390
5395
  };
5391
5396
  return PasswordService;
5392
5397
  }());
5393
- PasswordService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PasswordService_Factory() { return new PasswordService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(ProfileService), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(WebCryptoService), i0.ɵɵinject(IdleService)); }, token: PasswordService, providedIn: "root" });
5398
+ PasswordService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PasswordService_Factory() { return new PasswordService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(ProfileService), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(WebCryptoService)); }, token: PasswordService, providedIn: "root" });
5394
5399
  PasswordService.decorators = [
5395
5400
  { type: i0.Injectable, args: [{
5396
5401
  providedIn: 'root',
5397
5402
  },] }
5398
5403
  ];
5399
5404
  PasswordService.ctorParameters = function () { return [
5400
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
5405
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
5401
5406
  { type: i2$1.HttpClient },
5402
5407
  { type: LrApolloService },
5403
5408
  { type: i4.AuthClass },
@@ -5405,8 +5410,7 @@
5405
5410
  { type: KeyFactoryService },
5406
5411
  { type: EncryptionService },
5407
5412
  { type: KeyGraphService },
5408
- { type: WebCryptoService },
5409
- { type: IdleService }
5413
+ { type: WebCryptoService }
5410
5414
  ]; };
5411
5415
 
5412
5416
  var TP_PASSWORD_RESET_CLIENT_NONCE_LENGTH = 32;
@@ -6193,7 +6197,7 @@
6193
6197
  return function () { return authService.initialise(); };
6194
6198
  };
6195
6199
  var LifeReadyAuthService = /** @class */ (function () {
6196
- function LifeReadyAuthService(config, auth, keyFactory, keyService, profileService, keyGraphService, passwordService, idleService, lrGraphQL, tpPasswordResetProcessorService, persistService, encryptionService, assemblyController) {
6200
+ function LifeReadyAuthService(config, auth, keyFactory, keyService, profileService, keyGraphService, passwordService, idleService, lrGraphQL, tpPasswordResetProcessorService, persistService, encryptionService, assemblyController, http) {
6197
6201
  this.config = config;
6198
6202
  this.auth = auth;
6199
6203
  this.keyFactory = keyFactory;
@@ -6207,11 +6211,17 @@
6207
6211
  this.persistService = persistService;
6208
6212
  this.encryptionService = encryptionService;
6209
6213
  this.assemblyController = assemblyController;
6214
+ this.http = http;
6210
6215
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6211
6216
  this.hubSubject = new rxjs.ReplaySubject(1);
6212
6217
  // Could use rxjs observables here. But trying to have kc-client use as little angular
6213
6218
  // features as possible. Rxjs is not used anywhere else in kc-client.
6214
6219
  this.logoutListeners = new Set();
6220
+ if (!i0.isDevMode()) {
6221
+ if (this.config.debug != null) {
6222
+ throw new LrBadLogicException('In production mode, "config.debug" must be set to null');
6223
+ }
6224
+ }
6215
6225
  }
6216
6226
  LifeReadyAuthService.prototype.initialise = function () {
6217
6227
  return __awaiter(this, void 0, void 0, function () {
@@ -6222,6 +6232,84 @@
6222
6232
  });
6223
6233
  });
6224
6234
  };
6235
+ LifeReadyAuthService.prototype.debugLogin = function (username, password) {
6236
+ // This will fail if debug is null. But when debug is null, this function
6237
+ // should not be called.
6238
+ this.config.debug.username = username;
6239
+ return this.debugLoadUser(password);
6240
+ };
6241
+ // ------------------------------------------------------------------------
6242
+ // ------------------------------------------------------------------------
6243
+ // ------------------------------------------------------------------------
6244
+ /**
6245
+ * Login using the server side session method.
6246
+ */
6247
+ LifeReadyAuthService.prototype.debugLoginUsingSession = function (username) {
6248
+ return this.http
6249
+ .get(this.config.apiUrl +
6250
+ 'debug_only/users/login/?username=' +
6251
+ encodeURIComponent(username), {
6252
+ // Non-obvious alert: if you want the cookies to be set, you must use the
6253
+ // "withCredentials" header. I would have thought the withCredentials header
6254
+ // is only used to send the cookies with the requests. But, if you don't include
6255
+ // the "withCredentials" header, the cookies in the response DOES NOT get set!
6256
+ //
6257
+ // ref: https://github.com/github/fetch/issues/386#issuecomment-243229388
6258
+ withCredentials: true,
6259
+ })
6260
+ .toPromise();
6261
+ };
6262
+ LifeReadyAuthService.prototype.debugLoadUser = function (password) {
6263
+ return __awaiter(this, void 0, void 0, function () {
6264
+ var _b, currentUser, contactCard, userPlans, passKey, masterKey, _c, _d, _e, _f;
6265
+ return __generator(this, function (_g) {
6266
+ switch (_g.label) {
6267
+ case 0: return [4 /*yield*/, this.profileService.getCurrentUser()];
6268
+ case 1:
6269
+ _b = _g.sent(), currentUser = _b.currentUser, contactCard = _b.contactCard, userPlans = _b.userPlans;
6270
+ return [4 /*yield*/, this.keyFactory.derivePassKey(Object.assign({ password: password }, currentUser.currentUserKey.passKey.passKeyParams))];
6271
+ case 2:
6272
+ passKey = (_g.sent()).jwk;
6273
+ return [4 /*yield*/, this.keyGraphService.unwrapWithPassKey(currentUser.currentUserKey.passKey.id, passKey, currentUser.currentUserKey.masterKey.id)];
6274
+ case 3:
6275
+ masterKey = _g.sent();
6276
+ return [4 /*yield*/, this.idleService.persistMasterKey(masterKey)];
6277
+ case 4:
6278
+ _g.sent();
6279
+ return [4 /*yield*/, this.keyGraphService.populateKeys(currentUser.currentUserKey)];
6280
+ case 5:
6281
+ _g.sent();
6282
+ _c = {
6283
+ id: currentUser.id,
6284
+ sub: 'DEBUG_MODE',
6285
+ username: currentUser.username,
6286
+ currentUserKey: currentUser.currentUserKey,
6287
+ email: 'DEBUG_MODE',
6288
+ emailVerified: false,
6289
+ phone: 'DEBUG_MODE',
6290
+ phoneVerified: false
6291
+ };
6292
+ _e = (_d = Object).assign;
6293
+ _f = [{}];
6294
+ return [4 /*yield*/, this.profileService.decryptContactCard(contactCard)];
6295
+ case 6: return [2 /*return*/, (_c.contactCard = _e.apply(_d, _f.concat([(_g.sent())])),
6296
+ _c.userDelete = currentUser.userDelete,
6297
+ _c.userPlans = userPlans,
6298
+ _c.hasTPVaultAccess = this.mapTPVaultAccess(currentUser.features),
6299
+ _c.features = currentUser.features,
6300
+ _c.sessionEncryptionKey = currentUser.sessionEncryptionKey,
6301
+ _c)];
6302
+ }
6303
+ });
6304
+ });
6305
+ };
6306
+ LifeReadyAuthService.prototype.getAccessJwtToken = function () {
6307
+ return __awaiter(this, void 0, void 0, function () {
6308
+ return __generator(this, function (_b) {
6309
+ return [2 /*return*/, getAccessJwtToken(this.auth)];
6310
+ });
6311
+ });
6312
+ };
6225
6313
  LifeReadyAuthService.prototype.importPassword = function (plainPassword) {
6226
6314
  return this.keyFactory.importPassword(plainPassword);
6227
6315
  };
@@ -6459,16 +6547,13 @@
6459
6547
  };
6460
6548
  LifeReadyAuthService.prototype.handlePasswordRecovery = function (user) {
6461
6549
  return __awaiter(this, void 0, void 0, function () {
6462
- var jwtToken;
6463
6550
  return __generator(this, function (_b) {
6464
6551
  switch (_b.label) {
6465
6552
  case 0:
6466
6553
  if (!(user.recoveryStatus !== exports.RecoveryStatus.NONE)) return [3 /*break*/, 2];
6467
- jwtToken = user
6468
- .getSignInUserSession()
6469
- .getAccessToken()
6470
- .getJwtToken();
6471
- return [4 /*yield*/, this.passwordService.changePasswordComplete(jwtToken, user.recoveryStatus === exports.RecoveryStatus.NEW_PASSWORD)];
6554
+ return [4 /*yield*/, this.passwordService.changePasswordComplete({
6555
+ useNewPassword: user.recoveryStatus === exports.RecoveryStatus.NEW_PASSWORD,
6556
+ })];
6472
6557
  case 1:
6473
6558
  _b.sent();
6474
6559
  _b.label = 2;
@@ -6584,7 +6669,6 @@
6584
6669
  sub: this.getUserAttribute('sub', userAttributes),
6585
6670
  username: currentUser.username,
6586
6671
  currentUserKey: currentUser.currentUserKey,
6587
- getAccessJwtToken: function () { return cognitoUser.getSignInUserSession().getAccessToken().getJwtToken(); },
6588
6672
  email: this.getUserAttribute('email', userAttributes),
6589
6673
  emailVerified: this.getUserAttribute('email_verified', userAttributes) === 'true',
6590
6674
  phone: this.getUserAttribute('phone_number', userAttributes),
@@ -6609,6 +6693,7 @@
6609
6693
  return this.hubSubject;
6610
6694
  };
6611
6695
  LifeReadyAuthService.prototype.logout = function () {
6696
+ var _a;
6612
6697
  return __awaiter(this, void 0, void 0, function () {
6613
6698
  return __generator(this, function (_b) {
6614
6699
  switch (_b.label) {
@@ -6624,6 +6709,9 @@
6624
6709
  return [4 /*yield*/, Promise.all([this.auth.signOut(), this.profileService.signOut()])];
6625
6710
  case 2:
6626
6711
  _b.sent();
6712
+ if ((_a = this.config.debug) === null || _a === void 0 ? void 0 : _a.username) {
6713
+ this.config.debug.username = null;
6714
+ }
6627
6715
  return [2 /*return*/];
6628
6716
  }
6629
6717
  });
@@ -6845,14 +6933,14 @@
6845
6933
  };
6846
6934
  return LifeReadyAuthService;
6847
6935
  }());
6848
- LifeReadyAuthService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LifeReadyAuthService_Factory() { return new LifeReadyAuthService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(KeyService), i0.ɵɵinject(ProfileService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(PasswordService), i0.ɵɵinject(IdleService), i0.ɵɵinject(exports.ɵf), i0.ɵɵinject(exports.ɵg), i0.ɵɵinject(PersistService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(exports.ɵi)); }, token: LifeReadyAuthService, providedIn: "root" });
6936
+ LifeReadyAuthService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LifeReadyAuthService_Factory() { return new LifeReadyAuthService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(KeyService), i0.ɵɵinject(ProfileService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(PasswordService), i0.ɵɵinject(IdleService), i0.ɵɵinject(exports.ɵf), i0.ɵɵinject(exports.ɵg), i0.ɵɵinject(PersistService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(exports.ɵi), i0.ɵɵinject(i2$1.HttpClient)); }, token: LifeReadyAuthService, providedIn: "root" });
6849
6937
  LifeReadyAuthService.decorators = [
6850
6938
  { type: i0.Injectable, args: [{
6851
6939
  providedIn: 'root',
6852
6940
  },] }
6853
6941
  ];
6854
6942
  LifeReadyAuthService.ctorParameters = function () { return [
6855
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
6943
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
6856
6944
  { type: i4.AuthClass },
6857
6945
  { type: KeyFactoryService },
6858
6946
  { type: KeyService },
@@ -6864,7 +6952,8 @@
6864
6952
  { type: exports.ɵg },
6865
6953
  { type: PersistService },
6866
6954
  { type: EncryptionService },
6867
- { type: exports.ɵi }
6955
+ { type: exports.ɵi },
6956
+ { type: i2$1.HttpClient }
6868
6957
  ]; };
6869
6958
 
6870
6959
  (function (FileType) {
@@ -7790,10 +7879,10 @@
7790
7879
  ], exports.ContactCard2Service);
7791
7880
 
7792
7881
  var FileUploadService = /** @class */ (function () {
7793
- function FileUploadService(config, http, lrAuth) {
7882
+ function FileUploadService(config, http, auth) {
7794
7883
  this.config = config;
7795
7884
  this.http = http;
7796
- this.lrAuth = lrAuth;
7885
+ this.auth = auth;
7797
7886
  }
7798
7887
  FileUploadService.prototype.downloadEncryptedFile = function (fileStateNodeId) {
7799
7888
  return __awaiter(this, void 0, void 0, function () {
@@ -7810,26 +7899,22 @@
7810
7899
  };
7811
7900
  FileUploadService.prototype.downloadEncryptedFile2 = function (fileStateNodeId) {
7812
7901
  return __awaiter(this, void 0, void 0, function () {
7813
- var url, content, _a, _b, _c, _d, _e, _f;
7814
- return __generator(this, function (_g) {
7815
- switch (_g.label) {
7902
+ var url, content, _a, _b, _c, _d, _e, _f, _g, _h;
7903
+ return __generator(this, function (_j) {
7904
+ switch (_j.label) {
7816
7905
  case 0:
7817
7906
  url = this.config.apiUrl + "files/download/?file_state_node_id=" + fileStateNodeId;
7818
7907
  _b = (_a = this.http)
7819
7908
  .get;
7820
7909
  _c = [url];
7821
- _d = {
7822
- responseType: 'text'
7823
- };
7824
- _e = {};
7825
- _f = "Bearer ";
7826
- return [4 /*yield*/, this.lrAuth.getUser()];
7827
- case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([(_d.headers = (_e.Authorization = _f + (_g.sent()).getAccessJwtToken(),
7828
- _e),
7829
- _d)]))
7910
+ _e = (_d = Object).assign;
7911
+ _g = (_f = Object).assign;
7912
+ _h = [{}];
7913
+ return [4 /*yield*/, httpOptions(this.auth, this.config)];
7914
+ case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([_e.apply(_d, [_g.apply(_f, _h.concat([(_j.sent())])), { responseType: 'text' }])]))
7830
7915
  .toPromise()];
7831
7916
  case 2:
7832
- content = _g.sent();
7917
+ content = _j.sent();
7833
7918
  return [2 /*return*/, content];
7834
7919
  }
7835
7920
  });
@@ -7851,9 +7936,9 @@
7851
7936
  };
7852
7937
  FileUploadService.prototype.uploadEncryptedFile = function (options) {
7853
7938
  return __awaiter(this, void 0, void 0, function () {
7854
- var encryptedContent, fileName, formData, content_resource, _a, _b, _c, _d, _e, _f;
7855
- return __generator(this, function (_g) {
7856
- switch (_g.label) {
7939
+ var encryptedContent, fileName, formData, content_resource, _a, _b, _c;
7940
+ return __generator(this, function (_d) {
7941
+ switch (_d.label) {
7857
7942
  case 0:
7858
7943
  encryptedContent = options.encryptedContent, fileName = options.fileName;
7859
7944
  formData = new FormData();
@@ -7861,16 +7946,11 @@
7861
7946
  _b = (_a = this.http)
7862
7947
  .post;
7863
7948
  _c = [this.config.apiUrl + "files/upload/", formData];
7864
- _d = {};
7865
- _e = {};
7866
- _f = "Bearer ";
7867
- return [4 /*yield*/, this.lrAuth.getUser()];
7868
- case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([(_d.headers = (_e.Authorization = _f + (_g.sent()).getAccessJwtToken(),
7869
- _e),
7870
- _d)]))
7949
+ return [4 /*yield*/, httpOptions(this.auth, this.config)];
7950
+ case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([_d.sent()]))
7871
7951
  .toPromise()];
7872
7952
  case 2:
7873
- content_resource = (_g.sent()).content_resource;
7953
+ content_resource = (_d.sent()).content_resource;
7874
7954
  return [2 /*return*/, content_resource];
7875
7955
  }
7876
7956
  });
@@ -7878,16 +7958,16 @@
7878
7958
  };
7879
7959
  return FileUploadService;
7880
7960
  }());
7881
- FileUploadService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileUploadService_Factory() { return new FileUploadService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LifeReadyAuthService)); }, token: FileUploadService, providedIn: "root" });
7961
+ FileUploadService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileUploadService_Factory() { return new FileUploadService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i4.AuthClass)); }, token: FileUploadService, providedIn: "root" });
7882
7962
  FileUploadService.decorators = [
7883
7963
  { type: i0.Injectable, args: [{
7884
7964
  providedIn: 'root',
7885
7965
  },] }
7886
7966
  ];
7887
7967
  FileUploadService.ctorParameters = function () { return [
7888
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
7968
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
7889
7969
  { type: i2$1.HttpClient },
7890
- { type: LifeReadyAuthService }
7970
+ { type: i4.AuthClass }
7891
7971
  ]; };
7892
7972
 
7893
7973
  var LockFragment = gqlTyped(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\nfragment LockFragment on LockField {\n created\n modified\n version\n expiryTime\n state\n}"], ["\nfragment LockFragment on LockField {\n created\n modified\n version\n expiryTime\n state\n}"])));
@@ -10732,14 +10812,14 @@
10732
10812
  };
10733
10813
  return LbopService;
10734
10814
  }());
10735
- LbopService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LbopService_Factory() { return new LbopService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(LifeReadyAuthService), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(KeyService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(PasswordService)); }, token: LbopService, providedIn: "root" });
10815
+ LbopService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LbopService_Factory() { return new LbopService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(LrApolloService), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(LifeReadyAuthService), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(KeyService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(KeyGraphService), i0.ɵɵinject(PasswordService)); }, token: LbopService, providedIn: "root" });
10736
10816
  LbopService.decorators = [
10737
10817
  { type: i0.Injectable, args: [{
10738
10818
  providedIn: 'root',
10739
10819
  },] }
10740
10820
  ];
10741
10821
  LbopService.ctorParameters = function () { return [
10742
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
10822
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
10743
10823
  { type: i2$1.HttpClient },
10744
10824
  { type: LrApolloService },
10745
10825
  { type: i4.AuthClass },
@@ -10760,7 +10840,7 @@
10760
10840
  ngModule: LifeReadyModule,
10761
10841
  providers: [
10762
10842
  {
10763
- provide: LR_CONFIG,
10843
+ provide: KC_CONFIG,
10764
10844
  useValue: config,
10765
10845
  },
10766
10846
  {
@@ -10770,7 +10850,7 @@
10770
10850
  {
10771
10851
  provide: i0.APP_INITIALIZER,
10772
10852
  useFactory: configureAmplifyAuth,
10773
- deps: [LR_CONFIG, i4.AuthClass],
10853
+ deps: [KC_CONFIG, i4.AuthClass],
10774
10854
  multi: true,
10775
10855
  },
10776
10856
  {
@@ -10782,7 +10862,7 @@
10782
10862
  {
10783
10863
  provide: i1.APOLLO_OPTIONS,
10784
10864
  useFactory: configureApollo,
10785
- deps: [LR_CONFIG, i4.AuthClass],
10865
+ deps: [KC_CONFIG, i4.AuthClass],
10786
10866
  },
10787
10867
  ],
10788
10868
  };
@@ -12843,14 +12923,14 @@
12843
12923
  };
12844
12924
  return RegisterService;
12845
12925
  }());
12846
- RegisterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function RegisterService_Factory() { return new RegisterService(i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(PasswordService)); }, token: RegisterService, providedIn: "root" });
12926
+ RegisterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function RegisterService_Factory() { return new RegisterService(i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(i4.AuthClass), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(PasswordService)); }, token: RegisterService, providedIn: "root" });
12847
12927
  RegisterService.decorators = [
12848
12928
  { type: i0.Injectable, args: [{
12849
12929
  providedIn: 'root',
12850
12930
  },] }
12851
12931
  ];
12852
12932
  RegisterService.ctorParameters = function () { return [
12853
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
12933
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
12854
12934
  { type: i4.AuthClass },
12855
12935
  { type: i2$1.HttpClient },
12856
12936
  { type: KeyFactoryService },
@@ -14293,7 +14373,7 @@
14293
14373
  };
14294
14374
  return TpPasswordResetUserService;
14295
14375
  }(LrService));
14296
- exports.TpPasswordResetUserService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TpPasswordResetUserService_Factory() { return new exports.TpPasswordResetUserService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(LR_CONFIG), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(PasswordService), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i4.AuthClass)); }, token: exports.TpPasswordResetUserService, providedIn: "root" });
14376
+ exports.TpPasswordResetUserService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TpPasswordResetUserService_Factory() { return new exports.TpPasswordResetUserService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(KC_CONFIG), i0.ɵɵinject(KeyFactoryService), i0.ɵɵinject(EncryptionService), i0.ɵɵinject(PasswordService), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i4.AuthClass)); }, token: exports.TpPasswordResetUserService, providedIn: "root" });
14297
14377
  exports.TpPasswordResetUserService.decorators = [
14298
14378
  { type: i0.Injectable, args: [{
14299
14379
  providedIn: 'root',
@@ -14302,7 +14382,7 @@
14302
14382
  exports.TpPasswordResetUserService.ctorParameters = function () { return [
14303
14383
  { type: i0.NgZone },
14304
14384
  { type: i0.Injector },
14305
- { type: undefined, decorators: [{ type: i0.Inject, args: [LR_CONFIG,] }] },
14385
+ { type: undefined, decorators: [{ type: i0.Inject, args: [KC_CONFIG,] }] },
14306
14386
  { type: KeyFactoryService },
14307
14387
  { type: EncryptionService },
14308
14388
  { type: PasswordService },
@@ -14929,6 +15009,7 @@
14929
15009
  exports.GetVaultsQuery = GetVaultsQuery;
14930
15010
  exports.IdleService = IdleService;
14931
15011
  exports.InitiateOtkMutation = InitiateOtkMutation;
15012
+ exports.KC_CONFIG = KC_CONFIG;
14932
15013
  exports.KeyExchangeFields = KeyExchangeFields;
14933
15014
  exports.KeyExchangeQuery = KeyExchangeQuery;
14934
15015
  exports.KeyExchangeService = KeyExchangeService;
@@ -14936,7 +15017,6 @@
14936
15017
  exports.KeyExchangesQuery = KeyExchangesQuery;
14937
15018
  exports.KeyGraphField = KeyGraphField;
14938
15019
  exports.KeyGraphFragment = KeyGraphFragment;
14939
- exports.LR_CONFIG = LR_CONFIG;
14940
15020
  exports.LbopQuery = LbopQuery;
14941
15021
  exports.LbopService = LbopService;
14942
15022
  exports.LbopsQuery = LbopsQuery;