@odx/auth 4.0.7 → 5.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.
Files changed (64) hide show
  1. package/README.md +3 -0
  2. package/esm2020/index.mjs +1 -1
  3. package/esm2020/lib/auth.component.mjs +4 -4
  4. package/esm2020/lib/auth.config.mjs +4 -3
  5. package/esm2020/lib/auth.directive.mjs +4 -4
  6. package/esm2020/lib/auth.guard.mjs +1 -1
  7. package/esm2020/lib/auth.i18n.mjs +1 -1
  8. package/esm2020/lib/auth.module.mjs +5 -5
  9. package/esm2020/lib/auth.providers.mjs +8 -7
  10. package/esm2020/lib/auth.service.mjs +42 -37
  11. package/esm2020/lib/auth.typings.mjs +1 -1
  12. package/esm2020/lib/components/auth-actions/auth-actions.component.mjs +4 -4
  13. package/esm2020/lib/components/auth-loading-screen/auth-loading-screen.component.mjs +6 -6
  14. package/esm2020/lib/components/index.mjs +1 -1
  15. package/esm2020/lib/directives/auth-action.directive.mjs +6 -6
  16. package/esm2020/lib/directives/index.mjs +1 -1
  17. package/esm2020/lib/directives/sign-in.directive.mjs +4 -4
  18. package/esm2020/lib/directives/sign-out.directive.mjs +4 -4
  19. package/esm2020/lib/helpers/create-inititals.mjs +1 -1
  20. package/esm2020/lib/helpers/handle-auth-error.mjs +1 -1
  21. package/esm2020/lib/helpers/handle-oauth-event.mjs +1 -1
  22. package/esm2020/lib/helpers/index.mjs +1 -1
  23. package/esm2020/lib/helpers/resolve-email.mjs +1 -1
  24. package/esm2020/lib/helpers/resolve-username.mjs +1 -1
  25. package/esm2020/lib/models/auth-environment.mjs +1 -1
  26. package/esm2020/lib/models/auth-http-cache.mjs +4 -4
  27. package/esm2020/lib/models/auth-plugin-manager.mjs +10 -5
  28. package/esm2020/lib/models/authorized-handler.mjs +1 -1
  29. package/esm2020/lib/models/index.mjs +1 -1
  30. package/esm2020/lib/models/offline-auth-error-handler.mjs +1 -1
  31. package/esm2020/lib/plugins/core-identity.plugin.mjs +1 -1
  32. package/esm2020/lib/plugins/index.mjs +1 -2
  33. package/esm2020/lib/plugins/user-profile-link.plugin.mjs +1 -1
  34. package/esm2020/lib/unauth.guard.mjs +1 -1
  35. package/esm2020/odx-auth.mjs +1 -1
  36. package/esm2020/plugins/service-connect/index.mjs +1 -1
  37. package/esm2020/plugins/service-connect/lib/dtos/get-service-connect-rights-response.dto.mjs +1 -1
  38. package/esm2020/plugins/service-connect/lib/dtos/index.mjs +1 -1
  39. package/esm2020/plugins/service-connect/lib/helpers/build-service-connect-url.mjs +1 -1
  40. package/esm2020/plugins/service-connect/lib/helpers/has-roles-or-rights-handler.mjs +1 -1
  41. package/esm2020/plugins/service-connect/lib/helpers/has-roles-or-rights.mjs +1 -1
  42. package/esm2020/plugins/service-connect/lib/helpers/index.mjs +1 -1
  43. package/esm2020/plugins/service-connect/lib/helpers/service-connect-plugin-factory.mjs +1 -1
  44. package/esm2020/plugins/service-connect/lib/service-connect-rights.directive.mjs +4 -4
  45. package/esm2020/plugins/service-connect/lib/service-connect-rights.guard.mjs +1 -1
  46. package/esm2020/plugins/service-connect/lib/service-connect-rights.plugin.mjs +1 -1
  47. package/esm2020/plugins/service-connect/lib/service-connect.config.mjs +1 -1
  48. package/esm2020/plugins/service-connect/lib/service-connect.typings.mjs +1 -1
  49. package/esm2020/plugins/service-connect/odx-auth-plugins-service-connect.mjs +1 -1
  50. package/fesm2015/odx-auth-plugins-service-connect.mjs +3 -3
  51. package/fesm2015/odx-auth-plugins-service-connect.mjs.map +1 -1
  52. package/fesm2015/odx-auth.mjs +93 -87
  53. package/fesm2015/odx-auth.mjs.map +1 -1
  54. package/fesm2020/odx-auth-plugins-service-connect.mjs +3 -3
  55. package/fesm2020/odx-auth-plugins-service-connect.mjs.map +1 -1
  56. package/fesm2020/odx-auth.mjs +89 -90
  57. package/fesm2020/odx-auth.mjs.map +1 -1
  58. package/lib/auth.config.d.ts +2 -1
  59. package/lib/auth.service.d.ts +5 -2
  60. package/lib/auth.typings.d.ts +0 -4
  61. package/lib/plugins/index.d.ts +0 -1
  62. package/package.json +1 -1
  63. package/esm2020/lib/plugins/loading-screen-plugin.mjs +0 -16
  64. package/lib/plugins/loading-screen-plugin.d.ts +0 -2
@@ -12,4 +12,4 @@ export function serviceConnectPluginFactory(options) {
12
12
  return () => defer(() => httpCache.request(url, true)).pipe(map((dto) => parseResponse(dto)));
13
13
  };
14
14
  }
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LXBsdWdpbi1mYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYXV0aC9wbHVnaW5zL3NlcnZpY2UtY29ubmVjdC9zcmMvbGliL2hlbHBlcnMvc2VydmljZS1jb25uZWN0LXBsdWdpbi1mYWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFFLGFBQWEsRUFBcUIsZ0JBQWdCLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxHQUFHLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFbEMsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFlckUsTUFBTSxVQUFVLDJCQUEyQixDQUFnQixPQUFnRDtJQUN6RyxPQUFPLENBQUMsYUFBYSxFQUFFLEVBQUUsQ0FBQyxHQUFHLEVBQUU7UUFDN0IsT0FBTyxDQUFDLEtBQUssRUFBRSxDQUFDLGFBQWEsQ0FBQyxDQUFDO1FBQy9CLE1BQU0sRUFBRSxXQUFXLEVBQUUsR0FBRyxnQkFBZ0IsRUFBRSxDQUFDO1FBQzNDLE1BQU0sU0FBUyxHQUFH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TtcbiAgICBjb25zdCB7IGVudmlyb25tZW50IH0gPSBpbmplY3RBdXRoQ29uZmlnKCk7XG4gICAgY29uc3QgaHR0cENhY2hlID0gaW5qZWN0KEF1dGhIdHRwQ2FjaGUpO1xuICAgIGNvbnN0IHVybCA9IGJ1aWxkU2VydmljZUNvbm5lY3RVcmwocGx1Z2luT3B0aW9ucz8uZW52aXJvbm1lbnQgPz8gZW52aXJvbm1lbnQsIC4uLm9wdGlvbnMuZW5kcG9pbnQpO1xuICAgIGNvbnN0IHBhcnNlUmVzcG9uc2UgPSAoZHRvOiBEdG8gfCBudWxsKSA9PiBvcHRpb25zLnBhcnNlUmVzcG9uc2UoZHRvKSA/PyBvcHRpb25zLmRlZmF1bHRWYWx1ZSA/PyB7fTtcblxuICAgIHJldHVybiAoKSA9PiBkZWZlcigoKSA9PiBodHRwQ2FjaGUucmVxdWVzdDxEdG8+KHVybCwgdHJ1ZSkpLnBpcGUobWFwKChkdG8pID0+IHBhcnNlUmVzcG9uc2UoZHRvKSkpO1xuICB9O1xufVxuIl19
@@ -11,9 +11,9 @@ export class ServiceConnectRightsDirective {
11
11
  this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);
12
12
  }
13
13
  }
14
- ServiceConnectRightsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15
- ServiceConnectRightsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 });
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
14
+ ServiceConnectRightsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15
+ ServiceConnectRightsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 });
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
17
17
  type: Directive,
18
18
  args: [{
19
19
  standalone: true,
@@ -29,4 +29,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
29
29
  type: Input,
30
30
  args: ['odxAuthServiceConnectRights']
31
31
  }] } });
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LXJpZ2h0cy5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3BsdWdpbnMvc2VydmljZS1jb25uZWN0L3NyYy9saWIvc2VydmljZS1jb25uZWN0LXJpZ2h0cy5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDMUMsT0FBTyxFQUFFLHVCQUF1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G4gICAge1xuICAgICAgZGlyZWN0aXZlOiBBdXRoRGlyZWN0aXZlLFxuICAgICAgaW5wdXRzOiBbJ29keEF1dGhFbHNlOm9keEF1dGhTZXJ2aWNlQ29ubmVjdFJpZ2h0c0Vsc2UnXSxcbiAgICB9LFxuICBdLFxufSlcbmV4cG9ydCBjbGFzcyBTZXJ2aWNlQ29ubmVjdFJpZ2h0c0RpcmVjdGl2ZSB7XG4gIHByaXZhdGUgcmVhZG9ubHkgYXV0aERpcmVjdGl2ZSA9IGluamVjdChBdXRoRGlyZWN0aXZlLCB7IGhvc3Q6IHRydWUgfSk7XG5cbiAgQElucHV0KCdvZHhBdXRoU2VydmljZUNvbm5lY3RSaWdodHMnKVxuICBwdWJsaWMgc2V0IHJvbGVzT3JSaWdodHModmFsdWU6IFJvbGVzT3JSaWdodHMgfCBudWxsIHwgdW5kZWZpbmVkKSB7XG4gICAgdGhpcy5hdXRoRGlyZWN0aXZlLmF1dGhvcml6YXRpb25IYW5kbGVyID0gaGFzUm9sZXNPclJpZ2h0c0hhbmRsZXIodmFsdWUgPz8gW10pO1xuICB9XG59XG4iXX0=
@@ -4,4 +4,4 @@ import { hasRolesOrRightsHandler } from './helpers';
4
4
  export function serviceConnectRightsGuard(rolesOrRights, redirectTo) {
5
5
  return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo);
6
6
  }
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LXJpZ2h0cy5ndWFyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2F1dGgvcGx1Z2lucy9zZXJ2aWNlLWNvbm5lY3Qvc3JjL2xpYi9zZXJ2aWNlLWNvbm5lY3QtcmlnaHRzLmd1YXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxTQUFT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UFBRSxHQUFHLEVBQUUsTUFBTSxJQUFJLEVBQUUsRUFBRSxDQUFDO0lBQ3ZELFlBQVksRUFBRSxFQUFFLE1BQU0sRUFBRSxFQUFFLEVBQUU7Q0FDN0IsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgR2V0U2VydmljZUNvbm5lY3RSaWdodHNSZXNwb25zZUR0byB9IGZyb20gJy4vZHRvcyc7XG5pbXBvcnQgeyBzZXJ2aWNlQ29ubmVjdFBsdWdpbkZhY3RvcnkgfSBmcm9tICcuL2hlbHBlcnMnO1xuaW1wb3J0IHsgU2VydmljZUNvbm5lY3RFbmRwb2ludHMgfSBmcm9tICcuL3NlcnZpY2UtY29ubmVjdC5jb25maWcnO1xuaW1wb3J0ICcuL3NlcnZpY2UtY29ubmVjdC50eXBpbmdzJztcblxuZXhwb3J0IGNvbnN0IHNlcnZpY2VDb25uZWN0UmlnaHRzUGx1Z2luID0gc2VydmljZUNvbm5lY3RQbHVnaW5GYWN0b3J5PEdldFNlcnZpY2VDb25uZWN0UmlnaHRzUmVzcG9uc2VEdG8+KHtcbiAgZW5kcG9pbnQ6IFtTZXJ2aWNlQ29ubmVjdEVuZHBvaW50cy51c2VyUmlnaHRzXSxcbiAgcGFyc2VSZXNwb25zZTogKHJlcykgPT4gKHsgcmlnaHRzOiByZXM/LnJpZ2h0cyA/PyBbXSB9KSxcbiAgZGVmYXVsdFZhbHVlOiB7IHJpZ2h0czogW10gfSxcbn0pO1xuIl19
@@ -12,4 +12,4 @@ export const ServiceConnectScopes = {
12
12
  export const ServiceConnectEndpoints = {
13
13
  userRights: '/users/me/rights',
14
14
  };
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2F1dGgv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2VDb25uZWN0RW52aXJvbm1lbnQgPSB7IGN1c3RvbTogc3RyaW5nIH07XG5leHBvcnQgY29uc3QgU2VydmljZUNvbm5uZWN0RW52aXJvbm1lbnRzOiBSZWNvcmQ8QXV0aEVudmlyb25tZW50LCBzdHJpbmc+ID0ge1xuICBkZXY6ICdodHRwczovL2FwaS50ZXN0LmNvbm5lY3QuZHJhZWdlci5jb20nLFxuICBzdGFnZTogJ2h0dHBzOi8vYXBpLnN0YWdpbmcuY29ubmVjdC5kcmFlZ2VyLmNvbScsXG4gIHByb2Q6ICdodHRwczovL2FwaS5jb25uZWN0LmRyYWVnZXIuY29tJyxcbn07XG5leHBvcnQgY29uc3QgU2VydmljZUNvbm5lY3RTY29wZXMgPSB7XG4gIEJBU0U6ICdkY2lkJyxcbiAgUFJPRklMRTogJ2RjaWQucHJvZmlsZScsXG4gIFJJR0hUUzogJ2RjaWQucmlnaHRzJyxcbiAgSU5TVElUVVRJT046ICdkY2lkLmluc3RpdHV0aW9uJyxcbn07XG5leHBvcnQgY29uc3QgU2VydmljZUNvbm5lY3RFbmRwb2ludHMgPSB7XG4gIHVzZXJSaWdodHM6ICcvdXNlcnMvbWUvcmlnaHRzJyxcbn07XG4iXX0=
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LnR5cGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3BsdWdpbnMvc2VydmljZS1jb25uZWN0L3NyYy9saWIvc2VydmljZS1jb25uZWN0LnR5cGluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFJpZ2h0IH0gZnJvbSAnLi9oZWxwZXJzJztcblxuZGVjbGFyZSBnbG9iYWwge1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLW5hbWVzcGFjZVxuICBuYW1lc3BhY2UgT2R4QXV0aCB7XG4gICAgaW50ZXJmYWNlIEF1dGhQbHVnaW5SZXN1bHQge1xuICAgICAgcmlnaHRzOiBSaWdodFtdO1xuICAgIH1cbiAgfVxufVxuXG5leHBvcnQge307XG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LnR5cGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2F1dGgvcGx1Z2lucy9zZXJ2aWNlLWNvbm5lY3Qvc3JjL2xpYi9zZXJ2aWNlLWNvbm5lY3QudHlwaW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmlnaHQgfSBmcm9tICcuL2hlbHBlcnMnO1xuXG5kZWNsYXJlIGdsb2JhbCB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tbmFtZXNwYWNlXG4gIG5hbWVzcGFjZSBPZHhBdXRoIHtcbiAgICBpbnRlcmZhY2UgQXV0aFBsdWdpblJlc3VsdCB7XG4gICAgICByaWdodHM6IFJpZ2h0W107XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCB7fTtcbiJdfQ==
@@ -2,4 +2,4 @@
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
4
  export * from './index';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2R4LWF1dGgtcGx1Z2lucy1zZXJ2aWNlLWNvbm5lY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9hdXRoL3BsdWdpbnMvc2VydmljZS1jb25uZWN0L3NyYy9vZHgtYXV0aC1wbHVnaW5zLXNlcnZpY2UtY29ubmVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2R4LWF1dGgtcGx1Z2lucy1zZXJ2aWNlLWNvbm5lY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2F1dGgvcGx1Z2lucy9zZXJ2aWNlLWNvbm5lY3Qvc3JjL29keC1hdXRoLXBsdWdpbnMtc2VydmljZS1jb25uZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -55,9 +55,9 @@ class ServiceConnectRightsDirective {
55
55
  this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value !== null && value !== void 0 ? value : []);
56
56
  }
57
57
  }
58
- ServiceConnectRightsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
59
- ServiceConnectRightsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
58
+ ServiceConnectRightsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
59
+ ServiceConnectRightsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
61
61
  type: Directive,
62
62
  args: [{
63
63
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"odx-auth-plugins-service-connect.mjs","sources":["../../../../packages/auth/plugins/service-connect/src/lib/service-connect.config.ts","../../../../packages/auth/plugins/service-connect/src/lib/helpers/build-service-connect-url.ts","../../../../packages/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights.ts","../../../../packages/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights-handler.ts","../../../../packages/auth/plugins/service-connect/src/lib/helpers/service-connect-plugin-factory.ts","../../../../packages/auth/plugins/service-connect/src/lib/service-connect-rights.directive.ts","../../../../packages/auth/plugins/service-connect/src/lib/service-connect-rights.guard.ts","../../../../packages/auth/plugins/service-connect/src/lib/service-connect-rights.plugin.ts","../../../../packages/auth/plugins/service-connect/src/odx-auth-plugins-service-connect.ts"],"sourcesContent":["import { AuthEnvironment } from '@odx/auth';\n\nexport type ServiceConnectEnvironment = { custom: string };\nexport const ServiceConnnectEnvironments: Record<AuthEnvironment, string> = {\n dev: 'https://api.test.connect.draeger.com',\n stage: 'https://api.staging.connect.draeger.com',\n prod: 'https://api.connect.draeger.com',\n};\nexport const ServiceConnectScopes = {\n BASE: 'dcid',\n PROFILE: 'dcid.profile',\n RIGHTS: 'dcid.rights',\n INSTITUTION: 'dcid.institution',\n};\nexport const ServiceConnectEndpoints = {\n userRights: '/users/me/rights',\n};\n","import { buildUrl, isString } from '@odx/angular/utils';\nimport { AuthEnvironment } from '@odx/auth';\nimport { ServiceConnectEnvironment, ServiceConnnectEnvironments } from '../service-connect.config';\n\nexport function buildServiceConnectUrl(environment: ServiceConnectEnvironment | AuthEnvironment, ...endpoints: string[]): string {\n if (isString(environment)) {\n return buildUrl(ServiceConnnectEnvironments[environment], ...endpoints);\n }\n return buildUrl(environment.custom, ...endpoints);\n}\n","export type Right = string | number;\nexport type Role = Right[];\nexport type RolesOrRights = Array<Role | Right>;\n\nexport function hasRolesOrRights(userRights: Right[], rolesOrRights: RolesOrRights): boolean {\n return rolesOrRights.some((rights) => (Array.isArray(rights) ? rights : [rights])?.every((right) => userRights.includes(right)));\n}\n","import { AuthorizedHandler } from '@odx/auth';\nimport { hasRolesOrRights, RolesOrRights } from './has-roles-or-rights';\n\nexport function hasRolesOrRightsHandler(rolesOrRights: RolesOrRights): AuthorizedHandler {\n return (claims) => hasRolesOrRights(claims?.rights ?? [], rolesOrRights);\n}\n","import { inject } from '@angular/core';\nimport { AuthHttpCache, AuthPluginFactory, injectAuthConfig } from '@odx/auth';\nimport { defer, map } from 'rxjs';\nimport { ServiceConnectEnvironment } from '../service-connect.config';\nimport { buildServiceConnectUrl } from './build-service-connect-url';\n\nexport interface ServiceConnectPluginOptions {\n environment?: ServiceConnectEnvironment;\n}\n\nexport interface ServiceConnectPluginFactoryOptions<Dto> {\n endpoint: string[];\n parseResponse: (res: Dto | null) => Partial<OdxAuth.AuthPluginResult>;\n defaultValue?: Partial<OdxAuth.AuthPluginResult>;\n setup?: (pluginOptions?: ServiceConnectPluginOptions) => void;\n}\n\nexport type ServiceConnectPluginFactory = (pluginOptions?: ServiceConnectPluginOptions) => AuthPluginFactory;\n\nexport function serviceConnectPluginFactory<Dto = unknown>(options: ServiceConnectPluginFactoryOptions<Dto>): ServiceConnectPluginFactory {\n return (pluginOptions) => () => {\n options.setup?.(pluginOptions);\n const { environment } = injectAuthConfig();\n const httpCache = inject(AuthHttpCache);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (dto: Dto | null) => options.parseResponse(dto) ?? options.defaultValue ?? {};\n\n return () => defer(() => httpCache.request<Dto>(url, true)).pipe(map((dto) => parseResponse(dto)));\n };\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { AuthDirective } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuthServiceConnectRights]',\n hostDirectives: [\n {\n directive: AuthDirective,\n inputs: ['odxAuthElse:odxAuthServiceConnectRightsElse'],\n },\n ],\n})\nexport class ServiceConnectRightsDirective {\n private readonly authDirective = inject(AuthDirective, { host: true });\n\n @Input('odxAuthServiceConnectRights')\n public set rolesOrRights(value: RolesOrRights | null | undefined) {\n this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);\n }\n}\n","import { CanActivateFn } from '@angular/router';\nimport { authGuard } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[]): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\nimport './service-connect.typings';\n\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGa,MAAA,2BAA2B,GAAoC;AAC1E,IAAA,GAAG,EAAE,sCAAsC;AAC3C,IAAA,KAAK,EAAE,yCAAyC;AAChD,IAAA,IAAI,EAAE,iCAAiC;EACvC;AACW,MAAA,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,WAAW,EAAE,kBAAkB;EAC/B;AACW,MAAA,uBAAuB,GAAG;AACrC,IAAA,UAAU,EAAE,kBAAkB;;;SCXhB,sBAAsB,CAAC,WAAwD,EAAE,GAAG,SAAmB,EAAA;AACrH,IAAA,IAAI,QAAQ,CAAC,WAAW,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,2BAA2B,CAAC,WAAW,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;AACzE,KAAA;IACD,OAAO,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AACpD;;ACLgB,SAAA,gBAAgB,CAAC,UAAmB,EAAE,aAA4B,EAAA;IAChF,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,OAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,0CAAE,KAAK,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,QAAQ,CA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AAA;AACE,4BAAA,SAAS,EAAE,aAAa;4BACxB,MAAM,EAAE,CAAC,6CAA6C,CAAC;AACxD,yBAAA;AACF,qBAAA;iBACF,CAAA;8BAKY,aAAa,EAAA,CAAA;sBADvB,KAAK;uBAAC,6BAA6B,CAAA;;;ACbtC;AACgB,SAAA,yBAAyB,CAAC,aAA4B,EAAE,UAA2B,EAAA;IACjG,OAAO,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC;AACvE;;ACFO,MAAM,0BAA0B,GAAG,2BAA2B,CAAqC;AACxG,IAAA,QAAQ,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC;IAC9C,aAAa,EAAE,CAAC,GAAG,eAAK,QAAC,EAAE,MAAM,EAAE,CAAA,EAAA,GAAA,GAAG,KAAH,IAAA,IAAA,GAAG,KAAH,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,GAAG,CAAE,MAAM,mCAAI,EAAE,EAAE,EAAC,EAAA;AACvD,IAAA,YAAY,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAC7B,CAAA;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-auth-plugins-service-connect.mjs","sources":["../../../../libs/auth/plugins/service-connect/src/lib/service-connect.config.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/build-service-connect-url.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights-handler.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/service-connect-plugin-factory.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.directive.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.guard.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.plugin.ts","../../../../libs/auth/plugins/service-connect/src/odx-auth-plugins-service-connect.ts"],"sourcesContent":["import { AuthEnvironment } from '@odx/auth';\n\nexport type ServiceConnectEnvironment = { custom: string };\nexport const ServiceConnnectEnvironments: Record<AuthEnvironment, string> = {\n dev: 'https://api.test.connect.draeger.com',\n stage: 'https://api.staging.connect.draeger.com',\n prod: 'https://api.connect.draeger.com',\n};\nexport const ServiceConnectScopes = {\n BASE: 'dcid',\n PROFILE: 'dcid.profile',\n RIGHTS: 'dcid.rights',\n INSTITUTION: 'dcid.institution',\n};\nexport const ServiceConnectEndpoints = {\n userRights: '/users/me/rights',\n};\n","import { buildUrl, isString } from '@odx/angular/utils';\nimport { AuthEnvironment } from '@odx/auth';\nimport { ServiceConnectEnvironment, ServiceConnnectEnvironments } from '../service-connect.config';\n\nexport function buildServiceConnectUrl(environment: ServiceConnectEnvironment | AuthEnvironment, ...endpoints: string[]): string {\n if (isString(environment)) {\n return buildUrl(ServiceConnnectEnvironments[environment], ...endpoints);\n }\n return buildUrl(environment.custom, ...endpoints);\n}\n","export type Right = string | number;\nexport type Role = Right[];\nexport type RolesOrRights = Array<Role | Right>;\n\nexport function hasRolesOrRights(userRights: Right[], rolesOrRights: RolesOrRights): boolean {\n return rolesOrRights.some((rights) => (Array.isArray(rights) ? rights : [rights])?.every((right) => userRights.includes(right)));\n}\n","import { AuthorizedHandler } from '@odx/auth';\nimport { hasRolesOrRights, RolesOrRights } from './has-roles-or-rights';\n\nexport function hasRolesOrRightsHandler(rolesOrRights: RolesOrRights): AuthorizedHandler {\n return (claims) => hasRolesOrRights(claims?.rights ?? [], rolesOrRights);\n}\n","import { inject } from '@angular/core';\nimport { AuthHttpCache, AuthPluginFactory, injectAuthConfig } from '@odx/auth';\nimport { defer, map } from 'rxjs';\nimport { ServiceConnectEnvironment } from '../service-connect.config';\nimport { buildServiceConnectUrl } from './build-service-connect-url';\n\nexport interface ServiceConnectPluginOptions {\n environment?: ServiceConnectEnvironment;\n}\n\nexport interface ServiceConnectPluginFactoryOptions<Dto> {\n endpoint: string[];\n parseResponse: (res: Dto | null) => Partial<OdxAuth.AuthPluginResult>;\n defaultValue?: Partial<OdxAuth.AuthPluginResult>;\n setup?: (pluginOptions?: ServiceConnectPluginOptions) => void;\n}\n\nexport type ServiceConnectPluginFactory = (pluginOptions?: ServiceConnectPluginOptions) => AuthPluginFactory;\n\nexport function serviceConnectPluginFactory<Dto = unknown>(options: ServiceConnectPluginFactoryOptions<Dto>): ServiceConnectPluginFactory {\n return (pluginOptions) => () => {\n options.setup?.(pluginOptions);\n const { environment } = injectAuthConfig();\n const httpCache = inject(AuthHttpCache);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (dto: Dto | null) => options.parseResponse(dto) ?? options.defaultValue ?? {};\n\n return () => defer(() => httpCache.request<Dto>(url, true)).pipe(map((dto) => parseResponse(dto)));\n };\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { AuthDirective } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuthServiceConnectRights]',\n hostDirectives: [\n {\n directive: AuthDirective,\n inputs: ['odxAuthElse:odxAuthServiceConnectRightsElse'],\n },\n ],\n})\nexport class ServiceConnectRightsDirective {\n private readonly authDirective = inject(AuthDirective, { host: true });\n\n @Input('odxAuthServiceConnectRights')\n public set rolesOrRights(value: RolesOrRights | null | undefined) {\n this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);\n }\n}\n","import { CanActivateFn } from '@angular/router';\nimport { authGuard } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[]): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\nimport './service-connect.typings';\n\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGa,MAAA,2BAA2B,GAAoC;AAC1E,IAAA,GAAG,EAAE,sCAAsC;AAC3C,IAAA,KAAK,EAAE,yCAAyC;AAChD,IAAA,IAAI,EAAE,iCAAiC;EACvC;AACW,MAAA,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,WAAW,EAAE,kBAAkB;EAC/B;AACW,MAAA,uBAAuB,GAAG;AACrC,IAAA,UAAU,EAAE,kBAAkB;;;SCXhB,sBAAsB,CAAC,WAAwD,EAAE,GAAG,SAAmB,EAAA;AACrH,IAAA,IAAI,QAAQ,CAAC,WAAW,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,2BAA2B,CAAC,WAAW,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;AACzE,KAAA;IACD,OAAO,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AACpD;;ACLgB,SAAA,gBAAgB,CAAC,UAAmB,EAAE,aAA4B,EAAA;IAChF,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,EAAA,IAAA,EAAA,CAAA,CAAA,OAAA,OAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,0CAAE,KAAK,CAAC,CAAC,KAAK,KAAK,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC;AACnI;;ACHM,SAAU,uBAAuB,CAAC,aAA4B,EAAA;IAClE,OAAO,CAAC,MAAM,eAAK,O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,EAAA,CAAA;sBADvB,KAAK;uBAAC,6BAA6B,CAAA;;;ACbtC;AACgB,SAAA,yBAAyB,CAAC,aAA4B,EAAE,UAA2B,EAAA;IACjG,OAAO,SAAS,CAAC,uBAAuB,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC;AACvE;;ACFO,MAAM,0BAA0B,GAAG,2BAA2B,CAAqC;AACxG,IAAA,QAAQ,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC;IAC9C,aAAa,EAAE,CAAC,GAAG,eAAK,QAAC,EAAE,MAAM,EAAE,CAAA,EAAA,GAAA,GAAG,KAAH,IAAA,IAAA,GAAG,KAAH,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,GAAG,CAAE,MAAM,mCAAI,EAAE,EAAE,EAAC,EAAA;AACvD,IAAA,YAAY,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAC7B,CAAA;;ACTD;;AAEG;;;;"}
@@ -12,12 +12,11 @@ import { LogoDirective } from '@odx/angular/components/logo';
12
12
  import { TranslatePipe, provideTranslations } from '@odx/angular/internal/translate';
13
13
  import { isString, createConfigTokens, injectElement, untilDestroyed, Position, buildUrl } from '@odx/angular/utils';
14
14
  import { OAuthErrorEvent, OAuthService, provideOAuthClient, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
15
- import { filter, switchMap, BehaviorSubject, map, distinctUntilChanged, share, of, combineLatest, catchError, tap, take, fromEvent, startWith, merge, shareReplay, EMPTY } from 'rxjs';
15
+ import { filter, switchMap, BehaviorSubject, map, distinctUntilChanged, share, of, combineLatest, catchError, tap, take, fromEvent, startWith, shareReplay, merge, EMPTY } from 'rxjs';
16
16
  import { __awaiter, __decorate } from 'tslib';
17
17
  import { HttpErrorResponse } from '@angular/common/http';
18
18
  import { Router } from '@angular/router';
19
19
  import { deepmerge } from 'deepmerge-ts';
20
- import jwtDecode from 'jwt-decode';
21
20
  import * as i2 from '@odx/angular/components/list';
22
21
  import { ListModule } from '@odx/angular/components/list';
23
22
  import { CSSComponent } from '@odx/angular/internal';
@@ -142,11 +141,12 @@ const { AuthDefaultConfig, AuthConfig, injectAuthConfig, provideAuthConfig } = c
142
141
  createInitials,
143
142
  resolveEmail,
144
143
  resolveUsername,
145
- showRedirectOverlay: false,
146
144
  plugins: [],
147
145
  defaultAuthorizedHandler: null,
148
- enableLoadingScreen: false,
146
+ enableLoadingScreen: true,
149
147
  loadingScreenMessage: null,
148
+ refreshTokenOnInit: true,
149
+ requireSignIn: false,
150
150
  });
151
151
 
152
152
  var translations = {
@@ -206,9 +206,9 @@ class AuthHttpCache {
206
206
  }
207
207
  }
208
208
  AuthHttpCache.CACHE_KEY = '@odx/auth/http-cache';
209
- AuthHttpCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthHttpCache, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
210
- AuthHttpCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthHttpCache, providedIn: 'root' });
211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthHttpCache, decorators: [{
209
+ AuthHttpCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
210
+ AuthHttpCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, providedIn: 'root' });
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, decorators: [{
212
212
  type: Injectable,
213
213
  args: [{ providedIn: 'root' }]
214
214
  }], ctorParameters: function () { return []; } });
@@ -225,7 +225,12 @@ class AuthPluginManager {
225
225
  if (this.plugins.length < 1) {
226
226
  return of({});
227
227
  }
228
- return authService.isInitialized$.pipe(switchMap(() => combineLatest(this.plugins.map((plugin) => plugin(authService).pipe(catchError(this.handlePluginError.bind(this)))))), map((results) => deepmerge(...results)), tap((result) => this.result$$.next(result)), take(1));
228
+ return authService.isInitialized$.pipe(switchMap(() => {
229
+ if (!authService.getAccessToken()) {
230
+ return of({});
231
+ }
232
+ return combineLatest(this.plugins.map((plugin) => plugin(authService).pipe(catchError(this.handlePluginError.bind(this))))).pipe(map((results) => deepmerge(...results)));
233
+ }), tap((result) => this.result$$.next(result)), take(1));
229
234
  }
230
235
  getResult() {
231
236
  var _a;
@@ -237,9 +242,9 @@ class AuthPluginManager {
237
242
  return of({});
238
243
  }
239
244
  }
240
- AuthPluginManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
241
- AuthPluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthPluginManager, providedIn: 'root' });
242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthPluginManager, decorators: [{
245
+ AuthPluginManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
246
+ AuthPluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, providedIn: 'root' });
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, decorators: [{
243
248
  type: Injectable,
244
249
  args: [{ providedIn: 'root' }]
245
250
  }] });
@@ -262,52 +267,41 @@ class AuthService {
262
267
  this.isInitialized$$ = new BehaviorSubject(false);
263
268
  this.isRedirecting$$ = new BehaviorSubject(false);
264
269
  this.onAccessTokenUpdate$ = fromEvent(this.windowRef.nativeWindow, 'storage').pipe(filter(({ key }) => key === 'access_token' || key === null), startWith(null), share());
270
+ this.silentRefreshHandler$ = this.isInitialized$$.pipe(filter(Boolean), switchMap(() => this.windowRef.isOnline$), tap((isOnline) => this.updateSilentRefresh(isOnline)));
265
271
  this.onAuthStateChange$ = combineLatest([this.oauthService.events.pipe(startWith(null)), this.windowRef.isOnline$, this.onAccessTokenUpdate$]);
266
272
  this.isInitialized$ = this.isInitialized$$.pipe(filter(Boolean), distinctUntilChanged());
267
- this.isRedirecting$ = this.isRedirecting$$.pipe(distinctUntilChanged(), share());
273
+ this.isRedirecting$ = this.isRedirecting$$.pipe(distinctUntilChanged(), shareReplay({ refCount: true }));
268
274
  this.isLoading$ = merge(this.isRedirecting$, this.authPluginManager.pluginsLoading$).pipe(distinctUntilChanged());
269
275
  this.isAuthenticated$ = this.isInitialized$.pipe(switchMap(() => this.authPluginManager.pluginsReady$), switchMap(() => this.onAuthStateChange$), map(() => this.isAuthenticated()), shareReplay({ refCount: true }));
270
276
  this.identityClaims$ = this.isAuthenticated$.pipe(map(() => this.getIdentityClaims()), shareReplay({ refCount: true }));
271
277
  this.errors$ = this.oauthService.events.pipe(filter((event) => event instanceof OAuthErrorEvent), share());
272
- const isOnline$ = this.isInitialized$.pipe(filter(Boolean), switchMap(() => this.windowRef.isOnline$));
273
- isOnline$.subscribe((isOnline) => {
274
- if (isOnline) {
275
- this.oauthService.setupAutomaticSilentRefresh();
276
- }
277
- else {
278
- this.oauthService.stopAutomaticRefresh();
279
- }
280
- });
281
278
  this.authPluginManager.runPlugins(this).subscribe();
279
+ this.silentRefreshHandler$.subscribe();
282
280
  }
283
281
  initialize(config) {
284
282
  return __awaiter(this, void 0, void 0, function* () {
283
+ this.assertAudience(config.clientId);
285
284
  this.oauthService.configure(Object.assign(Object.assign({}, config), { openUri: this.redirectToLogin.bind(this) }));
286
285
  try {
287
286
  yield this.oauthService.loadDiscoveryDocument(this.authConfig.discoveryUrl);
288
287
  yield this.oauthService.tryLogin();
289
- if (this.getRefreshToken()) {
290
- yield this.oauthService.refreshToken();
291
- }
292
- this.isInitialized$$.next(true);
293
- if (this.authConfig.loadUserProfile && this.oauthService.hasValidAccessToken()) {
294
- yield this.loadUserProfile();
295
- }
288
+ yield this.tryRefreshToken();
296
289
  }
297
290
  catch (error) {
298
291
  if (!(error instanceof HttpErrorResponse || error instanceof OAuthErrorEvent)) {
299
292
  throw error;
300
293
  }
301
- const isUnauthenticated = error instanceof HttpErrorResponse && error.status === 401;
302
- if (error.type === 'token_refresh_error' || isUnauthenticated) {
294
+ if (error.type === 'token_refresh_error' || (error instanceof HttpErrorResponse && error.status === 401)) {
303
295
  this.signOut(true);
304
296
  this.signIn(this.windowRef.location.pathname);
305
297
  }
306
- this.isInitialized$$.next(true);
307
298
  }
308
- if (this.oauthService.hasValidAccessToken()) {
309
- yield this.routeToRequestedUrl();
299
+ this.isInitialized$$.next(true);
300
+ if (this.authConfig.requireSignIn && !this.isAuthenticated()) {
301
+ this.signIn(this.windowRef.location.pathname);
310
302
  }
303
+ yield this.tryLoadUserProfile();
304
+ yield this.routeToRequestedUrl();
311
305
  });
312
306
  }
313
307
  getIssuer() {
@@ -334,10 +328,6 @@ class AuthService {
334
328
  var _a;
335
329
  return (_a = this.oauthService.getAccessToken()) !== null && _a !== void 0 ? _a : null;
336
330
  }
337
- getAccessTokenPayload() {
338
- const token = this.getAccessToken();
339
- return token ? jwtDecode(token) : null;
340
- }
341
331
  getRefreshToken() {
342
332
  var _a;
343
333
  return (_a = this.oauthService.getRefreshToken()) !== null && _a !== void 0 ? _a : null;
@@ -372,7 +362,7 @@ class AuthService {
372
362
  }
373
363
  routeToRequestedUrl() {
374
364
  return __awaiter(this, void 0, void 0, function* () {
375
- if (!this.oauthService.state)
365
+ if (!this.oauthService.state || !this.oauthService.hasValidAccessToken())
376
366
  return;
377
367
  yield this.router.navigateByUrl(decodeURIComponent(this.oauthService.state));
378
368
  });
@@ -386,10 +376,39 @@ class AuthService {
386
376
  this.windowRef.location.assign(uri);
387
377
  this.isRedirecting$$.next(true);
388
378
  }
379
+ tryRefreshToken() {
380
+ return __awaiter(this, void 0, void 0, function* () {
381
+ if (!this.authConfig.refreshTokenOnInit || !this.getRefreshToken())
382
+ return;
383
+ yield this.oauthService.refreshToken();
384
+ });
385
+ }
386
+ tryLoadUserProfile() {
387
+ return __awaiter(this, void 0, void 0, function* () {
388
+ if (!this.authConfig.loadUserProfile || !this.oauthService.hasValidAccessToken())
389
+ return;
390
+ yield this.loadUserProfile().catch(() => null);
391
+ });
392
+ }
393
+ assertAudience(clientId) {
394
+ var _a;
395
+ const tokenClientId = (_a = this.getIdentityClaims()) === null || _a === void 0 ? void 0 : _a.aud;
396
+ if (!clientId || !tokenClientId || clientId === tokenClientId)
397
+ return;
398
+ this.signOut(true);
399
+ }
400
+ updateSilentRefresh(enabled) {
401
+ if (enabled) {
402
+ this.oauthService.setupAutomaticSilentRefresh();
403
+ }
404
+ else {
405
+ this.oauthService.stopAutomaticRefresh();
406
+ }
407
+ }
389
408
  }
390
- AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
391
- AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthService, providedIn: 'root' });
392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthService, decorators: [{
409
+ AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
410
+ AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, providedIn: 'root' });
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, decorators: [{
393
412
  type: Injectable,
394
413
  args: [{ providedIn: 'root' }]
395
414
  }], ctorParameters: function () { return []; } });
@@ -400,12 +419,12 @@ let AuthActionsComponent = class AuthActionsComponent {
400
419
  this.claims = null;
401
420
  }
402
421
  };
403
- AuthActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
404
- AuthActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list", inputs: ["multiple"] }, { kind: "component", type: i2.ListItemComponent, selector: "[odxListItem]", inputs: ["danger", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
422
+ AuthActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
423
+ AuthActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list", inputs: ["multiple"] }, { kind: "component", type: i2.ListItemComponent, selector: "[odxListItem]", inputs: ["danger", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
405
424
  AuthActionsComponent = __decorate([
406
425
  CSSComponent('auth-actions')
407
426
  ], AuthActionsComponent);
408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionsComponent, decorators: [{
427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionsComponent, decorators: [{
409
428
  type: Component,
410
429
  args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n" }]
411
430
  }], propDecorators: { claims: [{
@@ -415,7 +434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
415
434
  class AuthLoadingScreenComponent {
416
435
  constructor() {
417
436
  this.authConfig = injectAuthConfig();
418
- this.icon$ = inject(AuthService).isRedirecting$.pipe(startWith(false), distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
437
+ this.icon$ = inject(AuthService).isRedirecting$.pipe(distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
419
438
  }
420
439
  static initialize(authService, dynamicViewService) {
421
440
  authService.isLoading$.subscribe((isLoading) => {
@@ -431,9 +450,9 @@ class AuthLoadingScreenComponent {
431
450
  }
432
451
  }
433
452
  AuthLoadingScreenComponent.instance = null;
434
- AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
435
- AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
453
+ AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
454
+ AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
437
456
  type: Component,
438
457
  args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
439
458
  '[@hostAnimation]': 'true',
@@ -448,14 +467,14 @@ class AuthActionDirective {
448
467
  }
449
468
  ngAfterViewInit() {
450
469
  this.loadingSpinnerDirective.autoColor = true;
451
- this.authService.isRedirecting$.pipe(this.takeUntilDestroyed()).subscribe(() => {
452
- this.loadingSpinnerDirective.isLoading = true;
470
+ this.authService.isRedirecting$.pipe(this.takeUntilDestroyed()).subscribe((isRedirecting) => {
471
+ this.loadingSpinnerDirective.isLoading = isRedirecting;
453
472
  });
454
473
  }
455
474
  }
456
- AuthActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
457
- AuthActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthActionDirective, ngImport: i0 });
458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionDirective, decorators: [{
475
+ AuthActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
476
+ AuthActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AuthActionDirective, ngImport: i0 });
477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionDirective, decorators: [{
459
478
  type: Directive
460
479
  }] });
461
480
 
@@ -470,9 +489,9 @@ class SignInDirective extends AuthActionDirective {
470
489
  this.afterSignIn.next();
471
490
  }
472
491
  }
473
- SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
474
- SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, decorators: [{
492
+ SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
493
+ SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
494
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignInDirective, decorators: [{
476
495
  type: Directive,
477
496
  args: [{
478
497
  standalone: true,
@@ -498,9 +517,9 @@ class SignOutDirective extends AuthActionDirective {
498
517
  this.afterSignOut.next();
499
518
  }
500
519
  }
501
- SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
502
- SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, decorators: [{
520
+ SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
521
+ SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignOutDirective, decorators: [{
504
523
  type: Directive,
505
524
  args: [{
506
525
  standalone: true,
@@ -526,9 +545,9 @@ class AuthComponent {
526
545
  };
527
546
  }
528
547
  }
529
- AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
530
- AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <odx-auth-actions [claims]=\"vm.idClaims\"></odx-auth-actions>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ 'signOutButtonText' | odxTranslate | async }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}.odx-auth-actions{display:block;margin-top:calc(var(--odx-vertical-rythm-base-size) * .5);margin-bottom:calc(var(--odx-vertical-rythm-base-size) * .5);margin-right:calc(var(--odx-vertical-rythm-base-size) * .25);margin-left:calc(var(--odx-vertical-rythm-base-size) * .25)}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "component", type: AuthActionsComponent, selector: "odx-auth-actions", inputs: ["claims"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, decorators: [{
548
+ AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
549
+ AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthComponent, isStandalone: true, selector: "odx-auth", providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <odx-auth-actions [claims]=\"vm.idClaims\"></odx-auth-actions>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ 'signOutButtonText' | odxTranslate | async }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}.odx-auth-actions{display:block;margin-top:calc(var(--odx-vertical-rythm-base-size) * .5);margin-bottom:calc(var(--odx-vertical-rythm-base-size) * .5);margin-right:calc(var(--odx-vertical-rythm-base-size) * .25);margin-left:calc(var(--odx-vertical-rythm-base-size) * .25)}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "component", type: AuthActionsComponent, selector: "odx-auth-actions", inputs: ["claims"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthComponent, decorators: [{
532
551
  type: Component,
533
552
  args: [{ standalone: true, selector: 'odx-auth', imports: [
534
553
  CoreModule,
@@ -562,9 +581,9 @@ class AuthDirective {
562
581
  });
563
582
  }
564
583
  }
565
- AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
566
- AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 });
567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, decorators: [{
584
+ AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
585
+ AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 });
586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthDirective, decorators: [{
568
587
  type: Directive,
569
588
  args: [{
570
589
  standalone: true,
@@ -606,10 +625,10 @@ function authGuard(authorizedHandler, redirectTo) {
606
625
  const modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];
607
626
  class AuthModule {
608
627
  }
609
- AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
610
- AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] });
611
- AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthModule, imports: [AuthComponent] });
612
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthModule, decorators: [{
628
+ AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
629
+ AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] });
630
+ AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, imports: [AuthComponent] });
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, decorators: [{
613
632
  type: NgModule,
614
633
  args: [{
615
634
  imports: [...modules],
@@ -628,17 +647,6 @@ const coreIdentityPlugin = () => {
628
647
  };
629
648
  };
630
649
 
631
- const loadingScreenPlugin = () => {
632
- const { enableLoadingScreen, showRedirectOverlay } = injectAuthConfig();
633
- const dynamicViewService = inject(DynamicViewService);
634
- return (authService) => {
635
- if (enableLoadingScreen || showRedirectOverlay) {
636
- AuthLoadingScreenComponent.initialize(authService, dynamicViewService);
637
- }
638
- return of({});
639
- };
640
- };
641
-
642
650
  const userProfileUrlPlugin = () => {
643
651
  const { environment, userProfileUrl } = injectAuthConfig();
644
652
  return () => {
@@ -662,14 +670,12 @@ function initializeAuthErrorHandlers() {
662
670
  authService.errors$.pipe(tap((error) => handler(error))).subscribe();
663
671
  }
664
672
  function initalizeAuthConfig() {
665
- var _a;
666
- const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl } = injectAuthConfig();
673
+ const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl, enableLoadingScreen } = injectAuthConfig();
667
674
  const authService = inject(AuthService);
668
675
  const origin = inject(WindowRef).getOrigin();
669
676
  const scope = Array.from(new Set(DEFAULT_AUTH_SCOPES.concat(scopes !== null && scopes !== void 0 ? scopes : []))).join(' ');
670
- const tokenClientId = (_a = authService.getIdentityClaims()) === null || _a === void 0 ? void 0 : _a.aud;
671
- if (tokenClientId && tokenClientId !== clientId) {
672
- authService.signOut(true);
677
+ if (enableLoadingScreen) {
678
+ AuthLoadingScreenComponent.initialize(authService, inject(DynamicViewService));
673
679
  }
674
680
  return () => authService.initialize({
675
681
  clientId,
@@ -712,7 +718,7 @@ function provideAuth(config) {
712
718
  },
713
719
  {
714
720
  provide: ODX_AUTH_CORE_PLUGINS,
715
- useValue: [coreIdentityPlugin, loadingScreenPlugin, userProfileUrlPlugin],
721
+ useValue: [coreIdentityPlugin, userProfileUrlPlugin],
716
722
  },
717
723
  ]);
718
724
  }
@@ -739,5 +745,5 @@ function unauthGuard(authorizedHandler, redirectTo) {
739
745
  * Generated bundle index. Do not edit.
740
746
  */
741
747
 
742
- export { AuthActionDirective, AuthActionsComponent, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, DEFAULT_USER_PROFILE_URLS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_ERROR_HANDLERS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, handleAuthError, handleOAuthEvent, initalizeAuthConfig, initializeAuthErrorHandlers, injectAuthConfig, loadingScreenPlugin, offlineAuthErrorHandler, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard, userProfileUrlPlugin };
748
+ export { AuthActionDirective, AuthActionsComponent, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, DEFAULT_USER_PROFILE_URLS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_ERROR_HANDLERS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, handleAuthError, handleOAuthEvent, initalizeAuthConfig, initializeAuthErrorHandlers, injectAuthConfig, offlineAuthErrorHandler, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard, userProfileUrlPlugin };
743
749
  //# sourceMappingURL=odx-auth.mjs.map