@odx/auth 7.0.0 → 8.0.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 (63) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +16 -10
  3. package/esm2022/index.mjs +2 -1
  4. package/esm2022/lib/auth.config.mjs +6 -23
  5. package/esm2022/lib/auth.guard.mjs +10 -3
  6. package/esm2022/lib/auth.i18n.mjs +1 -1
  7. package/esm2022/lib/auth.interceptor.mjs +15 -0
  8. package/esm2022/lib/auth.logger.mjs +3 -0
  9. package/esm2022/lib/auth.providers.mjs +53 -36
  10. package/esm2022/lib/auth.service.mjs +27 -15
  11. package/esm2022/lib/auth.typings.mjs +1 -1
  12. package/esm2022/lib/components/auth-loading-screen/auth-loading-screen.component.mjs +6 -6
  13. package/esm2022/lib/helpers/create-auth-host-url.mjs +6 -0
  14. package/esm2022/lib/helpers/index.mjs +4 -1
  15. package/esm2022/lib/helpers/set-http-auth-header.mjs +13 -0
  16. package/esm2022/lib/helpers/user-language-loader.mjs +10 -0
  17. package/esm2022/lib/models/auth-environment.mjs +3 -2
  18. package/esm2022/lib/models/auth-http-cache.mjs +19 -23
  19. package/esm2022/lib/models/auth-plugin-manager.mjs +14 -9
  20. package/esm2022/lib/plugins/core-debug.plugin.mjs +20 -0
  21. package/esm2022/lib/plugins/index.mjs +2 -1
  22. package/esm2022/lib/plugins/user-profile-link.plugin.mjs +3 -3
  23. package/esm2022/lib/unauth.guard.mjs +10 -3
  24. package/esm2022/plugins/service-connect/index.mjs +2 -2
  25. package/esm2022/plugins/service-connect/lib/dtos/get-service-connect-user-response.dto.mjs +2 -0
  26. package/esm2022/plugins/service-connect/lib/dtos/index.mjs +2 -1
  27. package/esm2022/plugins/service-connect/lib/service-connect-rights.guard.mjs +3 -3
  28. package/esm2022/plugins/service-connect/lib/service-connect-rights.plugin.mjs +1 -2
  29. package/esm2022/plugins/service-connect/lib/service-connect-user-language.plugin.mjs +8 -0
  30. package/esm2022/plugins/service-connect/lib/service-connect.config.mjs +6 -4
  31. package/fesm2022/odx-auth-plugins-service-connect.mjs +15 -9
  32. package/fesm2022/odx-auth-plugins-service-connect.mjs.map +1 -1
  33. package/fesm2022/odx-auth.mjs +308 -240
  34. package/fesm2022/odx-auth.mjs.map +1 -1
  35. package/index.d.ts +1 -0
  36. package/lib/auth.config.d.ts +11 -10
  37. package/lib/auth.guard.d.ts +1 -1
  38. package/lib/auth.i18n.d.ts +2 -2
  39. package/lib/auth.interceptor.d.ts +2 -0
  40. package/lib/auth.logger.d.ts +3 -0
  41. package/lib/auth.providers.d.ts +7 -4
  42. package/lib/auth.service.d.ts +6 -2
  43. package/lib/auth.typings.d.ts +1 -1
  44. package/lib/helpers/create-auth-host-url.d.ts +2 -0
  45. package/lib/helpers/index.d.ts +3 -0
  46. package/lib/helpers/set-http-auth-header.d.ts +2 -0
  47. package/lib/helpers/user-language-loader.d.ts +4 -0
  48. package/lib/models/auth-environment.d.ts +6 -1
  49. package/lib/models/auth-http-cache.d.ts +3 -1
  50. package/lib/models/auth-plugin-manager.d.ts +2 -0
  51. package/lib/plugins/core-debug.plugin.d.ts +2 -0
  52. package/lib/plugins/index.d.ts +1 -0
  53. package/lib/unauth.guard.d.ts +1 -1
  54. package/package.json +2 -2
  55. package/plugins/service-connect/index.d.ts +1 -1
  56. package/plugins/service-connect/lib/dtos/get-service-connect-user-response.dto.d.ts +3 -0
  57. package/plugins/service-connect/lib/dtos/index.d.ts +1 -0
  58. package/plugins/service-connect/lib/service-connect-rights.guard.d.ts +1 -1
  59. package/plugins/service-connect/lib/service-connect-rights.plugin.d.ts +8 -1
  60. package/plugins/service-connect/lib/service-connect-user-language.plugin.d.ts +1 -0
  61. package/plugins/service-connect/lib/service-connect.config.d.ts +1 -0
  62. package/esm2022/plugins/service-connect/lib/service-connect.typings.mjs +0 -2
  63. package/plugins/service-connect/lib/service-connect.typings.d.ts +0 -9
@@ -3,5 +3,5 @@ export * from './lib/helpers';
3
3
  export * from './lib/service-connect-rights.directive';
4
4
  export * from './lib/service-connect-rights.guard';
5
5
  export * from './lib/service-connect-rights.plugin';
6
+ export * from './lib/service-connect-user-language.plugin';
6
7
  export * from './lib/service-connect.config';
7
- export * from './lib/service-connect.typings';
@@ -0,0 +1,3 @@
1
+ export interface GetServiceConnectUserResponseDto {
2
+ language_code: string;
3
+ }
@@ -1 +1,2 @@
1
1
  export * from './get-service-connect-rights-response.dto';
2
+ export * from './get-service-connect-user-response.dto';
@@ -1,3 +1,3 @@
1
1
  import { CanActivateFn } from '@angular/router';
2
2
  import { RolesOrRights } from './helpers';
3
- export declare function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[]): CanActivateFn;
3
+ export declare function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[], isExternal?: boolean): CanActivateFn;
@@ -1,2 +1,9 @@
1
- import './service-connect.typings';
1
+ import { Right } from './helpers';
2
+ declare global {
3
+ namespace OdxAuth {
4
+ interface AuthPluginResult {
5
+ rights: Right[];
6
+ }
7
+ }
8
+ }
2
9
  export declare const serviceConnectRightsPlugin: import("./helpers").ServiceConnectPluginFactory;
@@ -0,0 +1 @@
1
+ export declare const serviceConnectUserLanguagePlugin: import("./helpers").ServiceConnectPluginFactory;
@@ -10,5 +10,6 @@ export declare const ServiceConnectScopes: {
10
10
  INSTITUTION: string;
11
11
  };
12
12
  export declare const ServiceConnectEndpoints: {
13
+ user: string;
13
14
  userRights: string;
14
15
  };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jb25uZWN0LnR5cGluZ3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2F1dGgvcGx1Z2lucy9zZXJ2aWNlLWNvbm5lY3Qvc3JjL2xpYi9zZXJ2aWNlLWNvbm5lY3QudHlwaW5ncy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmlnaHQgfSBmcm9tICcuL2hlbHBlcnMnO1xuXG5kZWNsYXJlIGdsb2JhbCB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tbmFtZXNwYWNlXG4gIG5hbWVzcGFjZSBPZHhBdXRoIHtcbiAgICBpbnRlcmZhY2UgQXV0aFBsdWdpblJlc3VsdCB7XG4gICAgICByaWdodHM6IFJpZ2h0W107XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydCB7fTtcbiJdfQ==
@@ -1,9 +0,0 @@
1
- import { Right } from './helpers';
2
- declare global {
3
- namespace OdxAuth {
4
- interface AuthPluginResult {
5
- rights: Right[];
6
- }
7
- }
8
- }
9
- export {};