@odx/auth 14.0.0 → 15.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.
- package/CHANGELOG.md +11 -0
- package/esm2022/lib/auth.component.mjs +3 -3
- package/esm2022/lib/auth.directive.mjs +3 -3
- package/esm2022/lib/auth.module.mjs +4 -4
- package/esm2022/lib/auth.service.mjs +3 -3
- package/esm2022/lib/components/auth-actions/auth-actions.component.mjs +3 -3
- package/esm2022/lib/components/auth-loading-screen/auth-loading-screen.component.mjs +3 -3
- package/esm2022/lib/directives/auth-action.directive.mjs +3 -3
- package/esm2022/lib/directives/sign-in.directive.mjs +3 -3
- package/esm2022/lib/directives/sign-out.directive.mjs +3 -3
- package/esm2022/lib/models/auth-plugin-manager.mjs +3 -3
- package/esm2022/plugins/service-connect/lib/service-connect-rights.directive.mjs +3 -3
- package/fesm2022/odx-auth-plugins-service-connect.mjs +3 -3
- package/fesm2022/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2022/odx-auth.mjs +31 -31
- package/fesm2022/odx-auth.mjs.map +1 -1
- package/lib/auth.config.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -36,10 +36,10 @@ export class AuthComponent {
|
|
|
36
36
|
});
|
|
37
37
|
this.hideInstitution = input(false);
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { hideInstitution: { classPropertyName: "hideInstitution", publicName: "hideInstitution", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <odx-area-header class=\"odx-padding-x-12 odx-padding-bottom-8\" size=\"small\">\n <odx-area-header-subtitle class=\"odx-auth-institution-name\">{{ institutionName }}</odx-area-header-subtitle>\n </odx-area-header>\n }\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\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 />\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 />\n </button>\n </div>\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-container>\n }\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: AreaHeaderModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: i2.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i2.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i3.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i4.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i5.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i6.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i7.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 }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthComponent, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{ standalone: true, selector: 'odx-auth', imports: [
|
|
45
45
|
AreaHeaderModule,
|
|
@@ -21,10 +21,10 @@ export class AuthDirective {
|
|
|
21
21
|
this.ngIfDirective.ngIf = this.authService.isAuthorized(handler);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
25
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthDirective, decorators: [{
|
|
28
28
|
type: Directive,
|
|
29
29
|
args: [{
|
|
30
30
|
standalone: true,
|
|
@@ -5,11 +5,11 @@ import { SignInDirective, SignOutDirective } from './directives';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
const modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];
|
|
7
7
|
export class AuthModule {
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
10
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] }); }
|
|
10
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, imports: [AuthComponent] }); }
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, decorators: [{
|
|
13
13
|
type: NgModule,
|
|
14
14
|
args: [{
|
|
15
15
|
imports: [...modules],
|
|
@@ -150,10 +150,10 @@ export class AuthService {
|
|
|
150
150
|
this.oauthService.stopAutomaticRefresh();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
154
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
155
155
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, decorators: [{
|
|
157
157
|
type: Injectable,
|
|
158
158
|
args: [{ providedIn: 'root' }]
|
|
159
159
|
}], ctorParameters: () => [] });
|
|
@@ -14,14 +14,14 @@ let AuthActionsComponent = class AuthActionsComponent {
|
|
|
14
14
|
this.element = injectElement();
|
|
15
15
|
this.claims = null;
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list" }, { kind: "component", type: i2.ListItemComponent, selector: "odx-list-item, [odxListItem]", inputs: ["danger", "variant", "muted", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
19
19
|
};
|
|
20
20
|
AuthActionsComponent = __decorate([
|
|
21
21
|
CSSComponent('auth-actions')
|
|
22
22
|
], AuthActionsComponent);
|
|
23
23
|
export { AuthActionsComponent };
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionsComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
26
|
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n" }]
|
|
27
27
|
}], propDecorators: { claims: [{
|
|
@@ -29,10 +29,10 @@ export class AuthLoadingScreenComponent {
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", 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\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\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);inset:0;position:fixed;z-index:var(--odx-v-layer-6)}.odx-auth-loading-screen__content{animation:odx-auth-loading-screen-animation .75s ease;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { 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 }); }
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
38
38
|
'[@hostAnimation]': 'true',
|
|
@@ -15,10 +15,10 @@ export class AuthActionDirective {
|
|
|
15
15
|
this.loadingSpinnerDirective.isLoading = isRedirecting;
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: AuthActionDirective, ngImport: i0 }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionDirective, decorators: [{
|
|
22
22
|
type: Directive
|
|
23
23
|
}] });
|
|
24
24
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1hY3Rpb24uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hdXRoL3NyYy9saWIvZGlyZWN0aXZlcy9hdXRoLWFjdGlvbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFpQixTQUFTLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pFLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNwRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUM7O0FBRzlDLE1BQU0sT0FBZ0IsbUJBQW1CO0lBRHpDO1FBRW1CLHVCQUFrQixHQUFHLGNBQWMsRUFBRSxDQUFDO1FBQ3RDLDRCQUF1QixHQUFHLE1BQU0sQ0FBQyx1QkFBdUIsRUFBRSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBQ3hFLGdCQUFXLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFDO0tBVXREO0lBUlEsZUFBZTtRQUNwQixJQUFJLENBQUMsdUJBQXVCLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQztRQUM5QyxJQUFJLENBQUMsV0FBVyx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WJsaWMgbmdBZnRlclZpZXdJbml0KCk6IHZvaWQge1xuICAgIHRoaXMubG9hZGluZ1NwaW5uZXJEaXJlY3RpdmUuYXV0b0NvbG9yID0gdHJ1ZTtcbiAgICB0aGlzLmF1dGhTZXJ2aWNlLmlzUmVkaXJlY3RpbmckLnBpcGUodGhpcy50YWtlVW50aWxEZXN0cm95ZWQoKSkuc3Vic2NyaWJlKChpc1JlZGlyZWN0aW5nKSA9PiB7XG4gICAgICB0aGlzLmxvYWRpbmdTcGlubmVyRGlyZWN0aXZlLmlzTG9hZGluZyA9IGlzUmVkaXJlY3Rpbmc7XG4gICAgfSk7XG4gIH1cblxuICBwcm90ZWN0ZWQgYWJzdHJhY3QgaGFuZGxlQ2xpY2soKTogdm9pZDtcbn1cbiJdfQ==
|
|
@@ -13,10 +13,10 @@ export class SignInDirective extends AuthActionDirective {
|
|
|
13
13
|
this.authService.signIn();
|
|
14
14
|
this.afterSignIn.next();
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignInDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
standalone: true,
|
|
@@ -13,10 +13,10 @@ export class SignOutDirective extends AuthActionDirective {
|
|
|
13
13
|
this.authService.signOut();
|
|
14
14
|
this.afterSignOut.next();
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
standalone: true,
|
|
@@ -39,10 +39,10 @@ export class AuthPluginManager {
|
|
|
39
39
|
runPlugin(authService, plugin) {
|
|
40
40
|
return plugin(authService).pipe(isNumber(this.authConfig.pluginTimeout) ? timeout(Math.max(0, this.authConfig.pluginTimeout)) : tap(), catchError((error) => this.handlePluginError(error)));
|
|
41
41
|
}
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
43
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, providedIn: 'root' }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, decorators: [{
|
|
46
46
|
type: Injectable,
|
|
47
47
|
args: [{ providedIn: 'root' }]
|
|
48
48
|
}] });
|
|
@@ -10,10 +10,10 @@ export class ServiceConnectRightsDirective {
|
|
|
10
10
|
set rolesOrRights(value) {
|
|
11
11
|
this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);
|
|
12
12
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
18
|
args: [{
|
|
19
19
|
standalone: true,
|
|
@@ -57,10 +57,10 @@ class ServiceConnectRightsDirective {
|
|
|
57
57
|
set rolesOrRights(value) {
|
|
58
58
|
this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
61
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServiceConnectRightsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
61
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: ServiceConnectRightsDirective, isStandalone: true, selector: "ng-template[odxAuthServiceConnectRights]", inputs: { rolesOrRights: ["odxAuthServiceConnectRights", "rolesOrRights"] }, hostDirectives: [{ directive: i1.AuthDirective, inputs: ["odxAuthElse", "odxAuthServiceConnectRightsElse"] }], ngImport: i0 }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: ServiceConnectRightsDirective, decorators: [{
|
|
64
64
|
type: Directive,
|
|
65
65
|
args: [{
|
|
66
66
|
standalone: true,
|
|
@@ -1 +1 @@
|
|
|
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/lib/service-connect-user-language.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-profile.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 [AuthEnvironment.DEV]: 'https://api.test.connect.draeger.com',\n [AuthEnvironment.STAGE]: 'https://api.staging.connect.draeger.com',\n [AuthEnvironment.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 user: '/users/me',\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 { HttpClient, HttpContext } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { AuthPluginFactory, injectAuthConfig, requireAuthentication } 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 httpClient = inject(HttpClient);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (dto: Dto | null) => options.parseResponse(dto) ?? options.defaultValue ?? {};\n\n return () =>\n defer(() =>\n httpClient.get<Dto>(url, {\n context: new HttpContext().set(requireAuthentication, true),\n }),\n ).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[], isExternal = false): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo, isExternal);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { Right, serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n rights: Right[];\n }\n }\n}\n\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","import { getLanguageCode } from '@odx/angular/utils';\nimport { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\nexport function getServiceConnectUserLanguage(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return (res?.preferred_language ?? res?.language_code) ? getLanguageCode(res.preferred_language ?? res.language_code) : undefined;\n}\n\nexport const serviceConnectUserLanguagePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => ({ preferredLanguage: getServiceConnectUserLanguage(res) }),\n});\n","import { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { getServiceConnectUserLanguage } from './service-connect-user-language.plugin';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n country?: string;\n institutionId?: number;\n institutionName?: string;\n institutionShortname?: string;\n }\n }\n}\n\nexport const serviceConnectUserProfilePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => {\n return {\n country: res?.country,\n institutionId: res?.institution_id,\n institutionName: res?.institution_name,\n institutionShortname: res?.institution_shortname,\n preferredLanguage: getServiceConnectUserLanguage(res),\n };\n },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,2BAA2B,GAAoC;AAC1E,IAAA,CAAC,eAAe,CAAC,GAAG,GAAG,sCAAsC;AAC7D,IAAA,CAAC,eAAe,CAAC,KAAK,GAAG,yCAAyC;AAClE,IAAA,CAAC,eAAe,CAAC,IAAI,GAAG,iCAAiC;EACzD;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,IAAI,EAAE,WAAW;AACjB,IAAA,UAAU,EAAE,kBAAkB;;;SCZhB,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;KACzE;IACD,OAAO,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,G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ins/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/lib/service-connect-user-language.plugin.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-user-profile.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 [AuthEnvironment.DEV]: 'https://api.test.connect.draeger.com',\n [AuthEnvironment.STAGE]: 'https://api.staging.connect.draeger.com',\n [AuthEnvironment.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 user: '/users/me',\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 { HttpClient, HttpContext } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { AuthPluginFactory, injectAuthConfig, requireAuthentication } 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 httpClient = inject(HttpClient);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (dto: Dto | null) => options.parseResponse(dto) ?? options.defaultValue ?? {};\n\n return () =>\n defer(() =>\n httpClient.get<Dto>(url, {\n context: new HttpContext().set(requireAuthentication, true),\n }),\n ).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[], isExternal = false): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo, isExternal);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { Right, serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n rights: Right[];\n }\n }\n}\n\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","import { getLanguageCode } from '@odx/angular/utils';\nimport { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\nexport function getServiceConnectUserLanguage(res?: GetServiceConnectUserResponseDto | null): string | undefined {\n return (res?.preferred_language ?? res?.language_code) ? getLanguageCode(res.preferred_language ?? res.language_code) : undefined;\n}\n\nexport const serviceConnectUserLanguagePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => ({ preferredLanguage: getServiceConnectUserLanguage(res) }),\n});\n","import { GetServiceConnectUserResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { getServiceConnectUserLanguage } from './service-connect-user-language.plugin';\nimport { ServiceConnectEndpoints } from './service-connect.config';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n country?: string;\n institutionId?: number;\n institutionName?: string;\n institutionShortname?: string;\n }\n }\n}\n\nexport const serviceConnectUserProfilePlugin = serviceConnectPluginFactory<GetServiceConnectUserResponseDto>({\n endpoint: [ServiceConnectEndpoints.user],\n parseResponse: (res) => {\n return {\n country: res?.country,\n institutionId: res?.institution_id,\n institutionName: res?.institution_name,\n institutionShortname: res?.institution_shortname,\n preferredLanguage: getServiceConnectUserLanguage(res),\n };\n },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,2BAA2B,GAAoC;AAC1E,IAAA,CAAC,eAAe,CAAC,GAAG,GAAG,sCAAsC;AAC7D,IAAA,CAAC,eAAe,CAAC,KAAK,GAAG,yCAAyC;AAClE,IAAA,CAAC,eAAe,CAAC,IAAI,GAAG,iCAAiC;;AAE9C,MAAA,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,WAAW,EAAE,kBAAkB;;AAEpB,MAAA,uBAAuB,GAAG;AACrC,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,UAAU,EAAE,kBAAkB;;;SCZhB,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,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,UAAU,CAAC;AAClF;;ACMO,MAAM,0BAA0B,GAAG,2BAA2B,CAAqC;AACxG,IAAA,QAAQ,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC;AAC9C,IAAA,aAAa,EAAE,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;AACvD,IAAA,YAAY,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAC7B,CAAA;;ACZK,SAAU,6BAA6B,CAAC,GAA6C,EAAA;IACzF,OAAO,CAAC,GAAG,EAAE,kBAAkB,IAAI,GAAG,EAAE,aAAa,IAAI,eAAe,CAAC,GAAG,CAAC,kBAAkB,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,SAAS;AACnI;AAEO,MAAM,gCAAgC,GAAG,2BAA2B,CAAmC;AAC5G,IAAA,QAAQ,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC;AACxC,IAAA,aAAa,EAAE,CAAC,GAAG,MAAM,EAAE,iBAAiB,EAAE,6BAA6B,CAAC,GAAG,CAAC,EAAE,CAAC;AACpF,CAAA;;ACKM,MAAM,+BAA+B,GAAG,2BAA2B,CAAmC;AAC3G,IAAA,QAAQ,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC;AACxC,IAAA,aAAa,EAAE,CAAC,GAAG,KAAI;QACrB,OAAO;YACL,OAAO,EAAE,GAAG,EAAE,OAAO;YACrB,aAAa,EAAE,GAAG,EAAE,cAAc;YAClC,eAAe,EAAE,GAAG,EAAE,gBAAgB;YACtC,oBAAoB,EAAE,GAAG,EAAE,qBAAqB;AAChD,YAAA,iBAAiB,EAAE,6BAA6B,CAAC,GAAG,CAAC;SACtD;KACF;AACF,CAAA;;AC5BD;;AAEG;;;;"}
|
package/fesm2022/odx-auth.mjs
CHANGED
|
@@ -135,13 +135,13 @@ let AuthActionsComponent = class AuthActionsComponent {
|
|
|
135
135
|
this.element = injectElement();
|
|
136
136
|
this.claims = null;
|
|
137
137
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list" }, { kind: "component", type: i2.ListItemComponent, selector: "odx-list-item, [odxListItem]", inputs: ["danger", "variant", "muted", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
140
140
|
};
|
|
141
141
|
AuthActionsComponent = __decorate([
|
|
142
142
|
CSSComponent('auth-actions')
|
|
143
143
|
], AuthActionsComponent);
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionsComponent, decorators: [{
|
|
145
145
|
type: Component,
|
|
146
146
|
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n" }]
|
|
147
147
|
}], propDecorators: { claims: [{
|
|
@@ -165,10 +165,10 @@ class AuthLoadingScreenComponent {
|
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
168
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", 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\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\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);inset:0;position:fixed;z-index:var(--odx-v-layer-6)}.odx-auth-loading-screen__content{animation:odx-auth-loading-screen-animation .75s ease;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { 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 }); }
|
|
170
170
|
}
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
172
172
|
type: Component,
|
|
173
173
|
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
174
174
|
'[@hostAnimation]': 'true',
|
|
@@ -330,10 +330,10 @@ class AuthPluginManager {
|
|
|
330
330
|
runPlugin(authService, plugin) {
|
|
331
331
|
return plugin(authService).pipe(isNumber(this.authConfig.pluginTimeout) ? timeout(Math.max(0, this.authConfig.pluginTimeout)) : tap(), catchError((error) => this.handlePluginError(error)));
|
|
332
332
|
}
|
|
333
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
334
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
334
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, providedIn: 'root' }); }
|
|
335
335
|
}
|
|
336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthPluginManager, decorators: [{
|
|
337
337
|
type: Injectable,
|
|
338
338
|
args: [{ providedIn: 'root' }]
|
|
339
339
|
}] });
|
|
@@ -486,10 +486,10 @@ class AuthService {
|
|
|
486
486
|
this.oauthService.stopAutomaticRefresh();
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
490
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
489
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
490
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, providedIn: 'root' }); }
|
|
491
491
|
}
|
|
492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthService, decorators: [{
|
|
493
493
|
type: Injectable,
|
|
494
494
|
args: [{ providedIn: 'root' }]
|
|
495
495
|
}], ctorParameters: () => [] });
|
|
@@ -557,10 +557,10 @@ class AuthActionDirective {
|
|
|
557
557
|
this.loadingSpinnerDirective.isLoading = isRedirecting;
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
561
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
560
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
561
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: AuthActionDirective, ngImport: i0 }); }
|
|
562
562
|
}
|
|
563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthActionDirective, decorators: [{
|
|
564
564
|
type: Directive
|
|
565
565
|
}] });
|
|
566
566
|
|
|
@@ -574,10 +574,10 @@ class SignInDirective extends AuthActionDirective {
|
|
|
574
574
|
this.authService.signIn();
|
|
575
575
|
this.afterSignIn.next();
|
|
576
576
|
}
|
|
577
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
578
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
577
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
578
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
579
579
|
}
|
|
580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignInDirective, decorators: [{
|
|
581
581
|
type: Directive,
|
|
582
582
|
args: [{
|
|
583
583
|
standalone: true,
|
|
@@ -602,10 +602,10 @@ class SignOutDirective extends AuthActionDirective {
|
|
|
602
602
|
this.authService.signOut();
|
|
603
603
|
this.afterSignOut.next();
|
|
604
604
|
}
|
|
605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
606
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
606
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 }); }
|
|
607
607
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
609
609
|
type: Directive,
|
|
610
610
|
args: [{
|
|
611
611
|
standalone: true,
|
|
@@ -635,10 +635,10 @@ class AuthComponent {
|
|
|
635
635
|
});
|
|
636
636
|
this.hideInstitution = input(false);
|
|
637
637
|
}
|
|
638
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
639
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
639
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.12", type: AuthComponent, isStandalone: true, selector: "odx-auth", inputs: { hideInstitution: { classPropertyName: "hideInstitution", publicName: "hideInstitution", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <odx-area-header class=\"odx-padding-x-12 odx-padding-bottom-8\" size=\"small\">\n <odx-area-header-subtitle class=\"odx-auth-institution-name\">{{ institutionName }}</odx-area-header-subtitle>\n </odx-area-header>\n }\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\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 />\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 />\n </button>\n </div>\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-container>\n }\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: AreaHeaderModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: i2$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i2$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i3$1.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i4.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i5.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i7.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 }); }
|
|
640
640
|
}
|
|
641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthComponent, decorators: [{
|
|
642
642
|
type: Component,
|
|
643
643
|
args: [{ standalone: true, selector: 'odx-auth', imports: [
|
|
644
644
|
AreaHeaderModule,
|
|
@@ -671,10 +671,10 @@ class AuthDirective {
|
|
|
671
671
|
this.ngIfDirective.ngIf = this.authService.isAuthorized(handler);
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
675
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
674
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
675
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 }); }
|
|
676
676
|
}
|
|
677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthDirective, decorators: [{
|
|
678
678
|
type: Directive,
|
|
679
679
|
args: [{
|
|
680
680
|
standalone: true,
|
|
@@ -721,11 +721,11 @@ function authGuard(authorizedHandler, redirectTo, isExternal = false) {
|
|
|
721
721
|
|
|
722
722
|
const modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];
|
|
723
723
|
class AuthModule {
|
|
724
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
725
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
726
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
724
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
725
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] }); }
|
|
726
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, imports: [AuthComponent] }); }
|
|
727
727
|
}
|
|
728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: AuthModule, decorators: [{
|
|
729
729
|
type: NgModule,
|
|
730
730
|
args: [{
|
|
731
731
|
imports: [...modules],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-auth.mjs","sources":["../../../../libs/auth/src/lib/helpers/create-auth-host-url.ts","../../../../libs/auth/src/lib/helpers/create-inititals.ts","../../../../libs/auth/src/lib/helpers/handle-auth-error.ts","../../../../libs/auth/src/lib/helpers/handle-oauth-event.ts","../../../../libs/auth/src/lib/helpers/resolve-email.ts","../../../../libs/auth/src/lib/helpers/resolve-username.ts","../../../../libs/auth/src/lib/helpers/set-http-auth-header.ts","../../../../libs/auth/src/lib/models/auth-environment.ts","../../../../libs/auth/src/lib/auth.interceptor.ts","../../../../libs/auth/src/lib/auth.logger.ts","../../../../libs/auth/src/lib/components/auth-actions/auth-actions.component.ts","../../../../libs/auth/src/lib/components/auth-actions/auth-actions.component.html","../../../../libs/auth/src/lib/components/auth-loading-screen/auth-loading-screen.component.ts","../../../../libs/auth/src/lib/components/auth-loading-screen/auth-loading-screen.component.html","../../../../libs/auth/src/lib/plugins/core-debug.plugin.ts","../../../../libs/auth/src/lib/plugins/core-identity.plugin.ts","../../../../libs/auth/src/lib/plugins/user-profile-link.plugin.ts","../../../../libs/auth/src/lib/auth.providers.ts","../../../../libs/auth/src/lib/models/auth-plugin-manager.ts","../../../../libs/auth/src/lib/models/offline-auth-error-handler.ts","../../../../libs/auth/src/lib/auth.service.ts","../../../../libs/auth/src/lib/helpers/user-language-loader.ts","../../../../libs/auth/src/lib/auth.config.ts","../../../../libs/auth/src/lib/auth.i18n.ts","../../../../libs/auth/src/lib/directives/auth-action.directive.ts","../../../../libs/auth/src/lib/directives/sign-in.directive.ts","../../../../libs/auth/src/lib/directives/sign-out.directive.ts","../../../../libs/auth/src/lib/auth.component.ts","../../../../libs/auth/src/lib/auth.component.html","../../../../libs/auth/src/lib/auth.directive.ts","../../../../libs/auth/src/lib/auth.guard.ts","../../../../libs/auth/src/lib/auth.module.ts","../../../../libs/auth/src/lib/unauth.guard.ts","../../../../libs/auth/src/odx-auth.ts"],"sourcesContent":["import { buildUrl } from '@odx/angular/utils';\nimport { ODX_AUTH_HOSTS } from '../auth.config';\nimport { AuthEnvironment } from '../models';\n\nexport function createAuthHostUrl(environment: AuthEnvironment, ...segments: string[]): string {\n return buildUrl(ODX_AUTH_HOSTS[environment], ...segments);\n}\n","export function createInitials(value?: string | null): string {\n if (!value) return '';\n const parts = value\n .replace(/\\([^()]*\\)/, '')\n .trim()\n .split(' ');\n\n return parts.reduce((initials, curr, index) => {\n if (index === 0 || index === parts.length - 1) {\n initials += curr[0].toUpperCase();\n }\n return initials;\n }, '');\n}\n","import { EnvironmentInjector, inject } from '@angular/core';\nimport { OAuthErrorEvent } from 'angular-oauth2-oidc';\nimport { AuthErrorHandlerFn } from '../auth.config';\n\nexport function handleAuthError(handlers: AuthErrorHandlerFn[]): (error: OAuthErrorEvent) => void {\n const injector = inject(EnvironmentInjector);\n\n return (error) => {\n injector.runInContext(() => {\n for (const handler of handlers) {\n try {\n handler(error);\n break;\n } catch (unhandledError) {\n if (!(unhandledError instanceof OAuthErrorEvent)) throw error;\n continue;\n }\n }\n });\n };\n}\n","import { OAuthEvent } from 'angular-oauth2-oidc';\nimport { filter, Observable, OperatorFunction, switchMap } from 'rxjs';\n\nexport function handleOAuthEvent<T extends OAuthEvent>(type: T['type'], handler: (event: T) => Promise<void>): OperatorFunction<T, void> {\n return (source$: Observable<T>) =>\n source$.pipe(\n filter((event) => event.type === type),\n switchMap((event) => handler(event)),\n );\n}\n","import { isString } from '@odx/angular/utils';\n\nexport function resolveEmail(claims: OdxAuth.RawIdentityClaims): string {\n if (isString(claims['email'])) {\n return claims['email'];\n }\n if (isString(claims['email_address'])) {\n return claims['email_address'];\n }\n if (Array.isArray(claims['emails']) && isString(claims['emails'][0])) {\n return claims['emails'][0];\n }\n return '';\n}\n","import { isString } from '@odx/angular/utils';\n\nexport function resolveUsername(claims: OdxAuth.RawIdentityClaims): string {\n if (isString(claims['firstname']) && isString(claims['lastname'])) {\n return `${claims['firstname']} ${claims['lastname']}`;\n }\n if (isString(claims['given_name']) && isString(claims['family_name'])) {\n return `${claims['given_name']} ${claims['family_name']}`;\n }\n if (isString(claims['name'])) {\n return claims['name'];\n }\n if (isString(claims['displayname'])) {\n return claims['displayname'];\n }\n\n return '';\n}\n","import { HttpRequest } from '@angular/common/http';\nimport { AUTH_HTTP_HEADER } from '../auth.config';\n\nexport function setHttpAuthHeader<R extends HttpRequest<T> | Request, T>(req: R, token?: string | null): R {\n if (!token) return req;\n const header = `Bearer ${token}`;\n if (req instanceof HttpRequest) {\n return req.clone({ headers: req.headers.set(AUTH_HTTP_HEADER, header) }) as R;\n }\n req.headers.set(AUTH_HTTP_HEADER, header);\n\n return req;\n}\n","import { Environment } from '@odx/angular';\n\nexport type AuthEnvironment = (typeof AuthEnvironment)[keyof typeof AuthEnvironment];\nexport const AuthEnvironment = Environment;\n","import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { mergeMap } from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport { AuthService } from './auth.service';\n\nexport const requireAuthentication = new HttpContextToken<boolean>(() => false);\n\nexport const authInterceptor: HttpInterceptorFn = (req, next) => {\n const { allowedUrls, requireSignInForRequests } = injectAuthConfig();\n const isUrlAllowed = allowedUrls.some((allowedUrl) => matchUrl(req.url, allowedUrl));\n if (!isUrlAllowed && !req.context.get(requireAuthentication)) {\n return next(req);\n }\n\n return inject(AuthService).prepareAuthRequest$(req, requireSignInForRequests).pipe(mergeMap(next));\n};\n","import { Logger } from '@odx/angular/internal';\n\nexport default new Logger('@odx/auth');\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ListModule } from '@odx/angular/components/list';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { TranslatePipe } from '@odx/angular/internal/translate';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('auth-actions')\n@Component({\n standalone: true,\n selector: 'odx-auth-actions',\n imports: [CoreModule, ListModule, TranslatePipe],\n templateUrl: './auth-actions.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AuthActionsComponent {\n public readonly element = injectElement();\n\n @Input()\n public claims: OdxAuth.IdentiyClaims | null = null;\n}\n","<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\nimport { fadeOut } from '@odx/angular/animations';\nimport { DynamicViewDirective, DynamicViewRef, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CircularProgressComponent } from '@odx/angular/components/circular-progress';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { map } from 'rxjs';\nimport { injectAuthConfig } from '../../auth.config';\nimport { AuthService } from '../../auth.service';\n\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div.odx-auth-loading-screen',\n imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective],\n templateUrl: './auth-loading-screen.component.html',\n styleUrls: ['./auth-loading-screen.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[@hostAnimation]': 'true',\n },\n animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])],\n})\nexport class AuthLoadingScreenComponent {\n private static instance: DynamicViewRef<typeof AuthLoadingScreenComponent> | null = null;\n\n protected readonly authConfig = injectAuthConfig();\n protected readonly icon$ = inject(AuthService).isRedirecting$.pipe(map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));\n\n public static initialize(authService: AuthService, dynamicViewService: DynamicViewService): void {\n authService.isLoading$.subscribe((isLoading) => {\n if (isLoading) {\n AuthLoadingScreenComponent.instance ??= dynamicViewService.createView(AuthLoadingScreenComponent);\n } else {\n AuthLoadingScreenComponent.instance?.destroy();\n AuthLoadingScreenComponent.instance = null;\n }\n });\n }\n}\n","<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\n</div>\n","import { DestroyRef, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subscription, of } from 'rxjs';\nimport logger from '../auth.logger';\nimport { AuthPluginFactory } from '../models';\n\nexport const coreDebugPlugin: AuthPluginFactory = () => {\n logger.warn('DEBUG MODE ENABLED - DO NOT USE IN PRODUCTION!');\n const destroyRef = inject(DestroyRef);\n let instance: Subscription | null = null;\n\n return (authService) => {\n instance ??= authService.identityClaims$.pipe(takeUntilDestroyed(destroyRef)).subscribe((claims) => {\n logger.info(`User: ${claims?.username} (${claims?.email})`);\n logger.group('Identity claims', (log) => log(claims), false);\n logger.group('Access token', (log) => log(authService.getAccessToken()));\n logger.group('Refresh token', (log) => log(authService.getRefreshToken()));\n logger.group('ID token', (log) => log(authService.getIdToken()));\n });\n\n return of({});\n };\n};\n","import { of } from 'rxjs';\nimport { injectAuthConfig } from '../auth.config';\nimport { AuthPluginFactory } from '../models';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n email: string;\n initials: string;\n username: string;\n }\n }\n}\n\nexport const coreIdentityPlugin: AuthPluginFactory = () => {\n const { resolveEmail, resolveUsername, createInitials } = injectAuthConfig();\n\n return (authService) => {\n const claims = authService.getRawIdentityClaims();\n if (!claims) return of({});\n const username = resolveUsername(claims);\n\n return of({ email: resolveEmail(claims), username, initials: createInitials(username) });\n };\n};\n","import { of } from 'rxjs';\nimport { ODX_AUTH_USER_PROFILE_HOSTS, injectAuthConfig } from '../auth.config';\nimport { AuthPluginFactory } from '../models';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n userProfileUrl: string;\n }\n }\n}\n\nexport const userProfileUrlPlugin: AuthPluginFactory = () => {\n const { environment, userProfileUrl } = injectAuthConfig();\n return () => {\n return of({ userProfileUrl: userProfileUrl ?? ODX_AUTH_USER_PROFILE_HOSTS[environment] });\n };\n};\n","import { provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { APP_INITIALIZER, ENVIRONMENT_INITIALIZER, EnvironmentProviders, InjectionToken, Provider, inject, makeEnvironmentProviders } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { ConfigDependencies, ConfigProvider, buildUrl } from '@odx/angular/utils';\nimport { OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc';\nimport { tap } from 'rxjs';\nimport { AuthConfig, AuthErrorHandlerFn, ODX_AUTH_DEFAULT_SCOPES, injectAuthConfig, provideAuthConfig } from './auth.config';\nimport { authInterceptor } from './auth.interceptor';\nimport logger from './auth.logger';\nimport { AuthService } from './auth.service';\nimport { AuthLoadingScreenComponent } from './components';\nimport { createAuthHostUrl, handleAuthError } from './helpers';\nimport { AuthPlugin, AuthPluginErrorHandler, AuthPluginFactory, offlineAuthErrorHandler } from './models';\nimport { coreDebugPlugin, coreIdentityPlugin, userProfileUrlPlugin } from './plugins';\n\nexport const ODX_AUTH_ERROR_HANDLERS = new InjectionToken<AuthErrorHandlerFn[]>('@odx/auth::ErrorHandlers', {\n providedIn: 'root',\n factory: () => {\n const { errorHandler } = injectAuthConfig();\n\n return [offlineAuthErrorHandler, errorHandler];\n },\n});\n\nexport const ODX_AUTH_PLUGINS_ERROR_HANDLER = new InjectionToken<AuthPluginErrorHandler | null>('@odx/auth::PluginsErrorHandler', {\n providedIn: 'root',\n factory: () => injectAuthConfig().pluginsErrorHandler ?? null,\n});\n\nexport const ODX_AUTH_CORE_PLUGINS = new InjectionToken<AuthPluginFactory[]>('@odx/auth::CorePlugins', {\n providedIn: 'root',\n factory: () => {\n const { showDebugInformation } = injectAuthConfig();\n const plugins = [coreIdentityPlugin, userProfileUrlPlugin];\n if (showDebugInformation) {\n plugins.push(coreDebugPlugin);\n }\n\n return plugins;\n },\n});\n\nexport const ODX_AUTH_PLUGINS = new InjectionToken<AuthPlugin[]>('@odx/auth::Plugins', {\n providedIn: 'root',\n factory: () => {\n const { plugins } = injectAuthConfig();\n const corePlugins = inject(ODX_AUTH_CORE_PLUGINS);\n\n return [...corePlugins, ...plugins].map((pluginFactory) => pluginFactory());\n },\n});\n\nexport function provideAuthLogger(): Provider {\n return {\n provide: ENVIRONMENT_INITIALIZER,\n useFactory: () => {\n const { showDebugInformation } = injectAuthConfig();\n if (!showDebugInformation) logger.disable();\n\n return () => void 0;\n },\n multi: true,\n };\n}\n\nexport function initializeAuthErrorHandlers(): void {\n const authService = inject(AuthService);\n const handler = handleAuthError(inject(ODX_AUTH_ERROR_HANDLERS));\n\n authService.errors$.pipe(tap((error) => handler(error))).subscribe();\n}\n\nexport function initalizeAuthConfig(): () => Promise<void> {\n const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl, enableLoadingScreen } = injectAuthConfig();\n const authService = inject(AuthService);\n const redirectUri = buildUrl(inject(WindowRef).getOrigin(), redirectPath);\n const scope = Array.from(new Set(ODX_AUTH_DEFAULT_SCOPES.concat(scopes ?? []))).join(' ');\n if (enableLoadingScreen) {\n AuthLoadingScreenComponent.initialize(authService, inject(DynamicViewService));\n }\n return () =>\n authService.initialize({\n clientId,\n issuer: issuer ?? createAuthHostUrl(environment, 'oauth2/default'),\n scope,\n redirectUri,\n postLogoutRedirectUri: postLogoutRedirectUrl,\n preserveRequestedRoute: true,\n strictDiscoveryDocumentValidation: !discoveryUrl,\n responseType: 'code',\n showDebugInformation: false,\n timeoutFactor,\n waitForTokenInMsec: 1000,\n });\n}\n\nexport function provideAuth<D extends ConfigDependencies>(config: ConfigProvider<Partial<AuthConfig>, D>): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideAuthConfig(config),\n provideAuthLogger(),\n provideOAuthClient({ resourceServer: { sendAccessToken: false, allowedUrls: [] } }),\n provideHttpClient(withInterceptors([authInterceptor])),\n {\n provide: APP_INITIALIZER,\n useFactory: initalizeAuthConfig,\n multi: true,\n },\n {\n provide: OAuthStorage,\n useFactory: () => injectAuthConfig().storage ?? inject(WindowRef).nativeWindow.localStorage,\n },\n ]);\n}\n","import { inject, Injectable } from '@angular/core';\nimport { isNumber } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { BehaviorSubject, catchError, combineLatest, distinctUntilChanged, filter, map, Observable, of, share, switchMap, take, tap, timeout } from 'rxjs';\nimport { injectAuthConfig } from '../auth.config';\nimport { ODX_AUTH_PLUGINS, ODX_AUTH_PLUGINS_ERROR_HANDLER } from '../auth.providers';\nimport { AuthService } from '../auth.service';\n\nexport type AuthPlugin = (authService: AuthService) => Observable<Partial<OdxAuth.AuthPluginResult>>;\nexport type AuthPluginFactory = () => AuthPlugin;\nexport type AuthPluginError = unknown;\nexport type AuthPluginErrorHandler = (error: AuthPluginError) => void;\n\n@Injectable({ providedIn: 'root' })\nexport class AuthPluginManager {\n private readonly authConfig = injectAuthConfig();\n private readonly pluginsErrorHandler = inject(ODX_AUTH_PLUGINS_ERROR_HANDLER, { optional: true });\n private readonly plugins = inject(ODX_AUTH_PLUGINS);\n private readonly result$$ = new BehaviorSubject<OdxAuth.AuthPluginResult | null>(null);\n\n public readonly pluginsReady$ = this.result$$.pipe(filter(Boolean), map(Boolean), distinctUntilChanged(), share());\n public readonly pluginsLoading$ = this.result$$.pipe(\n map((result) => !result),\n distinctUntilChanged(),\n share(),\n );\n\n public runPlugins(authService: AuthService): Observable<OdxAuth.AuthPluginResult> {\n if (this.plugins.length < 1) {\n return of({} as OdxAuth.AuthPluginResult);\n }\n return authService.waitForAccessToken$(false).pipe(\n switchMap((token) => {\n if (!token) return of([{}]);\n return combineLatest(this.plugins.map((plugin) => this.runPlugin(authService, plugin)));\n }),\n map((results) => deepmerge(...results) as OdxAuth.AuthPluginResult),\n tap((result) => this.result$$.next(result)),\n take(1),\n );\n }\n\n public getResult(): OdxAuth.AuthPluginResult {\n return this.result$$.getValue() ?? ({} as OdxAuth.AuthPluginResult);\n }\n\n private handlePluginError(error?: unknown): Observable<OdxAuth.AuthPluginResult> {\n try {\n this.pluginsErrorHandler?.(error);\n } catch {\n //\n }\n\n return of({} as OdxAuth.AuthPluginResult);\n }\n\n private runPlugin(authService: AuthService, plugin: AuthPlugin): ReturnType<AuthPlugin> {\n return plugin(authService).pipe(\n isNumber(this.authConfig.pluginTimeout) ? timeout(Math.max(0, this.authConfig.pluginTimeout)) : tap(),\n catchError((error) => this.handlePluginError(error)),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { AuthErrorHandlerFn } from '../auth.config';\n\nexport const offlineAuthErrorHandler: AuthErrorHandlerFn = (error) => {\n if (error.type === 'discovery_document_load_error' && (error.reason as HttpErrorResponse)?.status === 504) {\n return;\n }\n throw error;\n};\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { AuthConfig, OAuthErrorEvent, OAuthService, TokenResponse } from 'angular-oauth2-oidc';\nimport { deepmerge } from 'deepmerge-ts';\nimport {\n BehaviorSubject,\n Observable,\n catchError,\n combineLatest,\n distinctUntilChanged,\n filter,\n fromEvent,\n map,\n merge,\n of,\n share,\n shareReplay,\n startWith,\n switchMap,\n take,\n tap,\n timeout,\n} from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport { setHttpAuthHeader } from './helpers';\nimport { AuthPluginManager, AuthorizedHandler } from './models';\n\n@Injectable({ providedIn: 'root' })\nexport class AuthService {\n private readonly authConfig = injectAuthConfig();\n private readonly authPluginManager = inject(AuthPluginManager);\n private readonly oauthService = inject(OAuthService);\n private readonly router = inject(Router);\n private readonly windowRef = inject(WindowRef);\n\n private readonly isInitialized$$ = new BehaviorSubject(false);\n private readonly isRedirecting$$ = new BehaviorSubject(false);\n private readonly onAccessTokenUpdate$ = fromEvent<StorageEvent>(this.windowRef.nativeWindow, 'storage').pipe(\n filter(({ key }) => key === 'access_token' || key === null),\n startWith(null),\n share(),\n );\n private readonly silentRefreshHandler$ = this.isInitialized$$.pipe(\n filter(Boolean),\n switchMap(() => this.windowRef.isOnline$),\n tap((isOnline) => this.updateSilentRefresh(isOnline)),\n );\n private readonly onAuthStateChange$ = combineLatest([this.oauthService.events.pipe(startWith(null)), this.windowRef.isOnline$, this.onAccessTokenUpdate$]);\n\n public readonly isInitialized$ = this.isInitialized$$.pipe(filter(Boolean), distinctUntilChanged());\n public readonly isRedirecting$ = this.isRedirecting$$.pipe(distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));\n public readonly isLoading$ = merge(this.isRedirecting$, this.authPluginManager.pluginsLoading$).pipe(distinctUntilChanged());\n public readonly isAuthenticated$ = this.isInitialized$.pipe(\n switchMap(() => this.authPluginManager.pluginsReady$),\n switchMap(() => this.onAuthStateChange$),\n map(() => this.isAuthenticated()),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n public readonly identityClaims$ = this.isAuthenticated$.pipe(\n map(() => this.getIdentityClaims()),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n public readonly errors$ = this.oauthService.events.pipe(\n filter((event): event is OAuthErrorEvent => event instanceof OAuthErrorEvent),\n share(),\n );\n public readonly onTokenReceived$ = this.oauthService.events.pipe(\n filter((event) => event.type === 'token_received'),\n share(),\n );\n\n constructor() {\n this.runPlugins();\n this.silentRefreshHandler$.subscribe();\n }\n\n public async initialize(config: AuthConfig): Promise<void> {\n this.assertAudience(config.clientId);\n this.oauthService.configure({ ...config, openUri: this.redirectToLogin.bind(this) });\n try {\n await this.oauthService.loadDiscoveryDocument(this.authConfig.discoveryUrl);\n await this.oauthService.tryLogin();\n if (this.authConfig.refreshTokenOnInit) {\n await this.tryRefreshToken();\n }\n } catch (error) {\n if (!(error instanceof HttpErrorResponse || error instanceof OAuthErrorEvent)) {\n throw error;\n }\n if (error.type === 'token_refresh_error' || (error instanceof HttpErrorResponse && (error.status === 401 || error.status === 400))) {\n this.signOut(true);\n this.signIn(this.windowRef.location.pathname);\n }\n }\n this.isInitialized$$.next(true);\n if (this.authConfig.requireSignIn && !this.isAuthenticated()) {\n this.signIn(this.windowRef.location.pathname);\n }\n await this.tryLoadUserProfile();\n await this.routeToRequestedUrl();\n }\n\n public runPlugins(): void {\n this.authPluginManager.runPlugins(this).subscribe();\n }\n\n public getIssuer(): URL {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return new URL(this.oauthService.issuer!);\n }\n\n public signIn(url?: string): void {\n this.oauthService.initLoginFlow(url);\n }\n\n public signOut(noRedirect?: boolean): void {\n this.oauthService.logOut(noRedirect || !this.getAccessToken());\n }\n\n public async refreshTokens(): Promise<TokenResponse> {\n return this.oauthService.refreshToken();\n }\n\n public getAccessToken(): string | null {\n return this.oauthService.getAccessToken() ?? null;\n }\n\n public getRefreshToken(): string | null {\n return this.oauthService.getRefreshToken() ?? null;\n }\n\n public getIdToken(): string | null {\n return this.oauthService.getIdToken() ?? null;\n }\n\n public getIdentityClaims(): OdxAuth.IdentiyClaims | null {\n if (!this.getIdToken()) return null;\n return deepmerge(this.oauthService.getIdentityClaims(), this.authPluginManager.getResult()) as OdxAuth.IdentiyClaims;\n }\n\n public getRawIdentityClaims(): OdxAuth.RawIdentityClaims | null {\n if (!this.getIdToken()) return null;\n return this.oauthService.getIdentityClaims();\n }\n\n public isAuthenticated(): boolean {\n if (this.windowRef.isOnline()) {\n return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();\n }\n return this.hasValidOfflineToken();\n }\n\n public isAuthorized(authorizedHandler?: AuthorizedHandler | null): boolean {\n const handler = authorizedHandler ?? this.authConfig.defaultAuthorizedHandler;\n\n return this.isAuthenticated() && (handler?.(this.getIdentityClaims(), this, this.router) ?? true);\n }\n\n public isAuthorized$(authorizedHandler?: AuthorizedHandler | null): Observable<boolean> {\n return this.isAuthenticated$.pipe(map(() => this.isAuthorized(authorizedHandler)));\n }\n\n public prepareAuthRequest$<R extends HttpRequest<T> | Request, T>(req: R, requireSignIn = false): Observable<R> {\n return this.waitForAccessToken$(requireSignIn).pipe(map((token) => setHttpAuthHeader(req, token)));\n }\n\n public waitForAccessToken$(requireSignIn: boolean): Observable<string | null> {\n const accessToken$ = of(this.getAccessToken()).pipe(filter((token) => !!token && this.isAuthenticated()));\n const waitForAccessToken$ = this.onTokenReceived$.pipe(\n timeout(this.authConfig.waitForTokenInMs ?? 0),\n catchError(async () => this.tryRefreshToken().catch(() => null)),\n );\n\n return this.isInitialized$.pipe(\n switchMap(() => merge(accessToken$, waitForAccessToken$)),\n take(1),\n map(() => this.getAccessToken()),\n tap((token) => !token && requireSignIn && this.signIn(this.windowRef.location.pathname)),\n );\n }\n\n private async routeToRequestedUrl(): Promise<void> {\n if (!this.oauthService.state || !this.oauthService.hasValidAccessToken()) return;\n await this.router.navigateByUrl(decodeURIComponent(this.oauthService.state));\n }\n\n private hasValidOfflineToken(): boolean {\n const issuedAt = this.getIdentityClaims()?.iat ?? 0;\n\n return Date.now() - issuedAt * 1000 <= this.authConfig.maxOfflineTime * 1000;\n }\n\n private redirectToLogin(uri: string): void {\n this.windowRef.location.assign(uri);\n this.isRedirecting$$.next(true);\n }\n\n private async tryLoadUserProfile(): Promise<void> {\n if (!this.authConfig.loadUserProfile || !this.isAuthenticated()) return;\n await this.oauthService.loadUserProfile().catch(() => null);\n }\n\n private async tryRefreshToken(): Promise<void> {\n if (!this.getRefreshToken()) return;\n await this.oauthService.refreshToken();\n }\n\n private assertAudience(clientId?: string | null): void {\n const tokenClientId = this.getIdentityClaims()?.aud;\n if (!clientId || !tokenClientId || clientId === tokenClientId) return;\n this.signOut(true);\n }\n\n private updateSilentRefresh(enabled: boolean) {\n if (enabled) {\n this.oauthService.setupAutomaticSilentRefresh();\n } else {\n this.oauthService.stopAutomaticRefresh();\n }\n }\n}\n","import { inject } from '@angular/core';\nimport { LanguageLoaderFn } from '@odx/angular/localization';\nimport { isNonEmptyString } from '@odx/angular/utils';\nimport { map } from 'rxjs';\nimport { AuthService } from '../auth.service';\n\ntype LanguageSelector = (claims?: OdxAuth.IdentiyClaims | null) => string | null | undefined;\n\nexport function userLanguageLoader(languageSelector: LanguageSelector = (claims) => claims?.preferredLanguage): LanguageLoaderFn {\n return () => {\n return inject(AuthService).identityClaims$.pipe(\n map(languageSelector),\n map((value) => (isNonEmptyString(value) ? value : undefined)),\n );\n };\n}\n","import { DynamicTextContent } from '@odx/angular/cdk/dynamic-view';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { OAuthErrorEvent, OAuthStorage } from 'angular-oauth2-oidc';\nimport { createInitials, resolveEmail, resolveUsername } from './helpers';\n\nimport { AuthEnvironment, AuthorizedHandler, AuthPluginFactory } from './models';\n\nexport const AUTH_HTTP_HEADER = 'Authorization';\nexport const ODX_AUTH_DEFAULT_SCOPES = ['openid', 'profile', 'email', 'offline_access'];\nexport const ODX_AUTH_HOSTS: Record<AuthEnvironment, string> = {\n dev: 'https://dev.login.draeger.com',\n stage: 'https://test.login.draeger.com',\n prod: 'https://login.draeger.com',\n};\nexport const ODX_AUTH_USER_PROFILE_HOSTS: Record<AuthEnvironment, string> = {\n dev: 'https://lemon-ocean-04a922703.3.azurestaticapps.net',\n stage: 'https://purple-cliff-0e61c5703.3.azurestaticapps.net',\n prod: 'https://id.draeger.com',\n};\n\nexport type AuthErrorHandlerFn = (error: OAuthErrorEvent) => void;\nexport type ResolveUsernameFn = (rawClaims: OdxAuth.RawIdentityClaims) => string;\nexport type ResolveEmailFn = (rawClaims: OdxAuth.RawIdentityClaims) => string;\nexport type CreateInitialsFn = (value: string) => string;\n\nexport interface AuthConfig {\n environment: AuthEnvironment;\n clientId?: string;\n issuer?: string;\n redirectPath: string;\n allowedUrls: Array<string | RegExp>;\n timeoutFactor: number;\n maxOfflineTime: number;\n loadUserProfile: boolean;\n postLogoutRedirectUrl?: string;\n scopes?: string[];\n discoveryUrl?: string;\n errorHandler: AuthErrorHandlerFn;\n createInitials: CreateInitialsFn;\n resolveEmail: ResolveEmailFn;\n resolveUsername: ResolveUsernameFn;\n storage?: OAuthStorage;\n plugins: AuthPluginFactory[];\n pluginsErrorHandler?: (error: unknown) => void;\n defaultAuthorizedHandler?: AuthorizedHandler | null;\n enableLoadingScreen: boolean;\n refreshTokenOnInit?: boolean;\n loadingScreenMessage?: DynamicTextContent | null;\n userProfileUrl?: string;\n requireSignIn?: boolean;\n requireSignInForRequests?: boolean;\n waitForTokenInMs?: number;\n showDebugInformation?: boolean;\n pluginTimeout?: number;\n}\n\nexport const { AuthDefaultConfig, AuthConfig, injectAuthConfig, provideAuthConfig } = createConfigTokens('Auth', '@odx/auth', {\n environment: 'prod',\n redirectPath: 'login/callback',\n allowedUrls: [],\n timeoutFactor: 0.75,\n maxOfflineTime: 24 * 60 * 60, // 1 day\n loadUserProfile: false,\n errorHandler: (error) => {\n throw error;\n },\n createInitials,\n resolveEmail,\n resolveUsername,\n plugins: [],\n defaultAuthorizedHandler: null,\n enableLoadingScreen: true,\n loadingScreenMessage: null,\n waitForTokenInMs: 1000,\n} as AuthConfig);\n","import { TranslationObject } from '@odx/angular/internal/translate';\n\nexport default {\n en: {\n userProfileLink: 'My profile',\n signInButtonText: 'Sign in',\n signOutButtonText: 'Sign out',\n },\n de: {\n userProfileLink: 'Mein Profil',\n signInButtonText: 'Einloggen',\n signOutButtonText: 'Ausloggen',\n },\n} as TranslationObject;\n","import { AfterViewInit, Directive, inject } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { untilDestroyed } from '@odx/angular/utils';\nimport { AuthService } from '../auth.service';\n\n@Directive()\nexport abstract class AuthActionDirective implements AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly loadingSpinnerDirective = inject(LoadingSpinnerDirective, { self: true });\n protected readonly authService = inject(AuthService);\n\n public ngAfterViewInit(): void {\n this.loadingSpinnerDirective.autoColor = true;\n this.authService.isRedirecting$.pipe(this.takeUntilDestroyed()).subscribe((isRedirecting) => {\n this.loadingSpinnerDirective.isLoading = isRedirecting;\n });\n }\n\n protected abstract handleClick(): void;\n}\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { AuthActionDirective } from './auth-action.directive';\n\n@Directive({\n standalone: true,\n selector: '[odxButton][odxAuthSignIn]',\n hostDirectives: [LoadingSpinnerDirective],\n})\nexport class SignInDirective extends AuthActionDirective {\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxAuthSignIn')\n public afterSignIn = new EventEmitter<void>();\n\n @HostListener('click')\n protected override handleClick(): void {\n this.authService.signIn();\n this.afterSignIn.next();\n }\n}\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { AuthActionDirective } from './auth-action.directive';\n\n@Directive({\n standalone: true,\n selector: '[odxButton][odxAuthSignOut]',\n hostDirectives: [LoadingSpinnerDirective],\n})\nexport class SignOutDirective extends AuthActionDirective {\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxAuthSignOut')\n public afterSignOut = new EventEmitter<void>();\n\n @HostListener('click')\n protected override handleClick(): void {\n this.authService.signOut();\n this.afterSignOut.next();\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input, ViewEncapsulation } from '@angular/core';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { DropdownModule, DropdownOptions } from '@odx/angular/components/dropdown';\nimport { HeaderModule } from '@odx/angular/components/header';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { provideTranslations, TranslatePipe } from '@odx/angular/internal/translate';\nimport { Position } from '@odx/angular/utils';\nimport { combineLatest } from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport translations from './auth.i18n';\nimport { AuthService } from './auth.service';\nimport { AuthActionsComponent } from './components';\nimport { SignInDirective, SignOutDirective } from './directives';\n\n@Component({\n standalone: true,\n selector: 'odx-auth',\n imports: [\n AreaHeaderModule,\n DropdownModule,\n HeaderModule,\n LogoDirective,\n SignInDirective,\n SignOutDirective,\n LoadingSpinnerModule,\n AuthActionsComponent,\n TranslatePipe,\n AsyncPipe,\n ],\n templateUrl: './auth.component.html',\n styleUrls: ['./auth.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [provideTranslations(translations)],\n})\nexport class AuthComponent {\n protected readonly authConfig = injectAuthConfig();\n protected readonly authService = inject(AuthService);\n protected readonly dropdownOptions = {\n position: Position.BOTTOM_END,\n enableFallback: false,\n containerClass: 'odx-auth-user-profile',\n } as Partial<DropdownOptions>;\n\n protected readonly vm$ = combineLatest({\n idClaims: this.authService.identityClaims$,\n isAuthenticated: this.authService.isAuthenticated$,\n });\n\n public readonly hideInstitution = input(false);\n}\n","<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <odx-area-header class=\"odx-padding-x-12 odx-padding-bottom-8\" size=\"small\">\n <odx-area-header-subtitle class=\"odx-auth-institution-name\">{{ institutionName }}</odx-area-header-subtitle>\n </odx-area-header>\n }\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\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 />\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 />\n </button>\n </div>\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-container>\n }\n</odx-action-group>\n","import { NgIf, NgIfContext } from '@angular/common';\nimport { AfterViewInit, Directive, inject, Input, TemplateRef } from '@angular/core';\nimport { isString, untilDestroyed } from '@odx/angular/utils';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuth]',\n hostDirectives: [NgIf],\n})\nexport class AuthDirective implements AfterViewInit {\n private readonly authService = inject(AuthService);\n private readonly ngIfDirective = inject(NgIf, { host: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n @Input('odxAuth')\n public authorizationHandler?: AuthorizedHandler | null | string = null;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxAuthElse')\n public set elseTemplate(value: TemplateRef<NgIfContext<unknown>>) {\n this.ngIfDirective.ngIfElse = value;\n }\n\n public ngAfterViewInit(): void {\n this.authService.identityClaims$.pipe(this.takeUntilDestroyed()).subscribe(() => {\n const handler = isString(this.authorizationHandler) ? null : this.authorizationHandler;\n this.ngIfDirective.ngIf = this.authService.isAuthorized(handler);\n });\n }\n}\n","import { inject } from '@angular/core';\nimport { CanActivateFn, Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { isString } from '@odx/angular/utils';\nimport { EMPTY, of, switchMap, take, tap } from 'rxjs';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function authGuard(authorizedHandler?: AuthorizedHandler, redirectTo?: any[] | string, isExternal = false): CanActivateFn {\n return (_, state) => {\n const authService = inject(AuthService);\n const windowRef = inject(WindowRef);\n const router = inject(Router, { optional: true });\n\n return authService.isAuthenticated$.pipe(\n switchMap((isAuthenticated) => {\n if (!isAuthenticated) {\n authService.signIn(state.url);\n\n return EMPTY;\n }\n return of(authService.isAuthorized(authorizedHandler));\n }),\n tap((isAuthorized) => {\n if (isAuthorized || !router) return;\n if (isString(redirectTo)) {\n if (isExternal) {\n windowRef.location.assign(redirectTo);\n } else {\n router.navigateByUrl(redirectTo);\n }\n } else if (Array.isArray(redirectTo)) {\n router.navigate(redirectTo);\n }\n }),\n take(1),\n );\n };\n}\n","import { NgModule } from '@angular/core';\nimport { AuthComponent } from './auth.component';\nimport { AuthDirective } from './auth.directive';\nimport { SignInDirective, SignOutDirective } from './directives';\n\nconst modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];\n\n@NgModule({\n imports: [...modules],\n exports: [...modules],\n})\nexport class AuthModule {}\n","import { inject } from '@angular/core';\nimport { CanActivateFn, Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { isString } from '@odx/angular/utils';\nimport { map, take, tap } from 'rxjs';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function unauthGuard(authorizedHandler?: AuthorizedHandler, redirectTo?: any[] | string, isExternal = false): CanActivateFn {\n return (_) => {\n const authService = inject(AuthService);\n const router = inject(Router, { optional: true });\n const windowRef = inject(WindowRef);\n\n return authService.isAuthenticated$.pipe(\n map(() => !authService.isAuthorized(authorizedHandler)),\n tap((isUnauthorized) => {\n if (isUnauthorized || !router) return;\n if (isString(redirectTo)) {\n if (isExternal) {\n windowRef.location.assign(redirectTo);\n } else {\n router.navigateByUrl(redirectTo);\n }\n } else if (Array.isArray(redirectTo)) {\n router.navigate(redirectTo);\n }\n }),\n take(1),\n );\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAIgB,iBAAiB,CAAC,WAA4B,EAAE,GAAG,QAAkB,EAAA;IACnF,OAAO,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC;AAC5D;;ACNM,SAAU,cAAc,CAAC,KAAqB,EAAA;AAClD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,EAAE,CAAC;IACtB,MAAM,KAAK,GAAG,KAAK;AAChB,SAAA,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;AACzB,SAAA,IAAI,EAAE;SACN,KAAK,CAAC,GAAG,CAAC,CAAC;IAEd,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,KAAI;AAC5C,QAAA,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7C,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SACnC;AACD,QAAA,OAAO,QAAQ,CAAC;KACjB,EAAE,EAAE,CAAC,CAAC;AACT;;ACTM,SAAU,eAAe,CAAC,QAA8B,EAAA;AAC5D,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAE7C,OAAO,CAAC,KAAK,KAAI;AACf,QAAA,QAAQ,CAAC,YAAY,CAAC,MAAK;AACzB,YAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAC9B,gBAAA,IAAI;oBACF,OAAO,CAAC,KAAK,CAAC,CAAC;oBACf,MAAM;iBACP;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CAAC,KAAI;AACX,QAAA,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AACxC,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,QAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAEpC,OAAO,WAAW,CAAC,gBAAgB,CAAC,IAAI,CACtC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,EACvD,GAAG,CAAC,CAAC,cAAc,KAAI;YACrB,IAAI,cAAc,IAAI,CAAC,MAAM;gBAAE,OAAO;AACtC,YAAA,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;gBACxB,IAAI,UAAU,EAAE;AACd,oBAAA,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;iBACvC;qBAAM;AACL,oBAAA,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;iBAClC;aACF;AAAM,iBAAA,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AACpC,gBAAA,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;aAC7B;AACH,SAAC,CAAC,EACF,IAAI,CAAC,CAAC,CAAC,CACR,CAAC;AACJ,KAAC,CAAC;AACJ;;AChCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-auth.mjs","sources":["../../../../libs/auth/src/lib/helpers/create-auth-host-url.ts","../../../../libs/auth/src/lib/helpers/create-inititals.ts","../../../../libs/auth/src/lib/helpers/handle-auth-error.ts","../../../../libs/auth/src/lib/helpers/handle-oauth-event.ts","../../../../libs/auth/src/lib/helpers/resolve-email.ts","../../../../libs/auth/src/lib/helpers/resolve-username.ts","../../../../libs/auth/src/lib/helpers/set-http-auth-header.ts","../../../../libs/auth/src/lib/models/auth-environment.ts","../../../../libs/auth/src/lib/auth.interceptor.ts","../../../../libs/auth/src/lib/auth.logger.ts","../../../../libs/auth/src/lib/components/auth-actions/auth-actions.component.ts","../../../../libs/auth/src/lib/components/auth-actions/auth-actions.component.html","../../../../libs/auth/src/lib/components/auth-loading-screen/auth-loading-screen.component.ts","../../../../libs/auth/src/lib/components/auth-loading-screen/auth-loading-screen.component.html","../../../../libs/auth/src/lib/plugins/core-debug.plugin.ts","../../../../libs/auth/src/lib/plugins/core-identity.plugin.ts","../../../../libs/auth/src/lib/plugins/user-profile-link.plugin.ts","../../../../libs/auth/src/lib/auth.providers.ts","../../../../libs/auth/src/lib/models/auth-plugin-manager.ts","../../../../libs/auth/src/lib/models/offline-auth-error-handler.ts","../../../../libs/auth/src/lib/auth.service.ts","../../../../libs/auth/src/lib/helpers/user-language-loader.ts","../../../../libs/auth/src/lib/auth.config.ts","../../../../libs/auth/src/lib/auth.i18n.ts","../../../../libs/auth/src/lib/directives/auth-action.directive.ts","../../../../libs/auth/src/lib/directives/sign-in.directive.ts","../../../../libs/auth/src/lib/directives/sign-out.directive.ts","../../../../libs/auth/src/lib/auth.component.ts","../../../../libs/auth/src/lib/auth.component.html","../../../../libs/auth/src/lib/auth.directive.ts","../../../../libs/auth/src/lib/auth.guard.ts","../../../../libs/auth/src/lib/auth.module.ts","../../../../libs/auth/src/lib/unauth.guard.ts","../../../../libs/auth/src/odx-auth.ts"],"sourcesContent":["import { buildUrl } from '@odx/angular/utils';\nimport { ODX_AUTH_HOSTS } from '../auth.config';\nimport { AuthEnvironment } from '../models';\n\nexport function createAuthHostUrl(environment: AuthEnvironment, ...segments: string[]): string {\n return buildUrl(ODX_AUTH_HOSTS[environment], ...segments);\n}\n","export function createInitials(value?: string | null): string {\n if (!value) return '';\n const parts = value\n .replace(/\\([^()]*\\)/, '')\n .trim()\n .split(' ');\n\n return parts.reduce((initials, curr, index) => {\n if (index === 0 || index === parts.length - 1) {\n initials += curr[0].toUpperCase();\n }\n return initials;\n }, '');\n}\n","import { EnvironmentInjector, inject } from '@angular/core';\nimport { OAuthErrorEvent } from 'angular-oauth2-oidc';\nimport { AuthErrorHandlerFn } from '../auth.config';\n\nexport function handleAuthError(handlers: AuthErrorHandlerFn[]): (error: OAuthErrorEvent) => void {\n const injector = inject(EnvironmentInjector);\n\n return (error) => {\n injector.runInContext(() => {\n for (const handler of handlers) {\n try {\n handler(error);\n break;\n } catch (unhandledError) {\n if (!(unhandledError instanceof OAuthErrorEvent)) throw error;\n continue;\n }\n }\n });\n };\n}\n","import { OAuthEvent } from 'angular-oauth2-oidc';\nimport { filter, Observable, OperatorFunction, switchMap } from 'rxjs';\n\nexport function handleOAuthEvent<T extends OAuthEvent>(type: T['type'], handler: (event: T) => Promise<void>): OperatorFunction<T, void> {\n return (source$: Observable<T>) =>\n source$.pipe(\n filter((event) => event.type === type),\n switchMap((event) => handler(event)),\n );\n}\n","import { isString } from '@odx/angular/utils';\n\nexport function resolveEmail(claims: OdxAuth.RawIdentityClaims): string {\n if (isString(claims['email'])) {\n return claims['email'];\n }\n if (isString(claims['email_address'])) {\n return claims['email_address'];\n }\n if (Array.isArray(claims['emails']) && isString(claims['emails'][0])) {\n return claims['emails'][0];\n }\n return '';\n}\n","import { isString } from '@odx/angular/utils';\n\nexport function resolveUsername(claims: OdxAuth.RawIdentityClaims): string {\n if (isString(claims['firstname']) && isString(claims['lastname'])) {\n return `${claims['firstname']} ${claims['lastname']}`;\n }\n if (isString(claims['given_name']) && isString(claims['family_name'])) {\n return `${claims['given_name']} ${claims['family_name']}`;\n }\n if (isString(claims['name'])) {\n return claims['name'];\n }\n if (isString(claims['displayname'])) {\n return claims['displayname'];\n }\n\n return '';\n}\n","import { HttpRequest } from '@angular/common/http';\nimport { AUTH_HTTP_HEADER } from '../auth.config';\n\nexport function setHttpAuthHeader<R extends HttpRequest<T> | Request, T>(req: R, token?: string | null): R {\n if (!token) return req;\n const header = `Bearer ${token}`;\n if (req instanceof HttpRequest) {\n return req.clone({ headers: req.headers.set(AUTH_HTTP_HEADER, header) }) as R;\n }\n req.headers.set(AUTH_HTTP_HEADER, header);\n\n return req;\n}\n","import { Environment } from '@odx/angular';\n\nexport type AuthEnvironment = (typeof AuthEnvironment)[keyof typeof AuthEnvironment];\nexport const AuthEnvironment = Environment;\n","import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { matchUrl } from '@odx/angular/utils';\nimport { mergeMap } from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport { AuthService } from './auth.service';\n\nexport const requireAuthentication = new HttpContextToken<boolean>(() => false);\n\nexport const authInterceptor: HttpInterceptorFn = (req, next) => {\n const { allowedUrls, requireSignInForRequests } = injectAuthConfig();\n const isUrlAllowed = allowedUrls.some((allowedUrl) => matchUrl(req.url, allowedUrl));\n if (!isUrlAllowed && !req.context.get(requireAuthentication)) {\n return next(req);\n }\n\n return inject(AuthService).prepareAuthRequest$(req, requireSignInForRequests).pipe(mergeMap(next));\n};\n","import { Logger } from '@odx/angular/internal';\n\nexport default new Logger('@odx/auth');\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ListModule } from '@odx/angular/components/list';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { TranslatePipe } from '@odx/angular/internal/translate';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('auth-actions')\n@Component({\n standalone: true,\n selector: 'odx-auth-actions',\n imports: [CoreModule, ListModule, TranslatePipe],\n templateUrl: './auth-actions.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AuthActionsComponent {\n public readonly element = injectElement();\n\n @Input()\n public claims: OdxAuth.IdentiyClaims | null = null;\n}\n","<odx-list>\n @if (claims?.userProfileUrl; as url) {\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListItemPrefix />\n {{ 'userProfileLink' | odxTranslate | async }}\n <odx-icon name=\"link-external\" iconSet=\"core\" size=\"small\" odxListItemSuffix />\n </a>\n }\n</odx-list>\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\nimport { fadeOut } from '@odx/angular/animations';\nimport { DynamicViewDirective, DynamicViewRef, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CircularProgressComponent } from '@odx/angular/components/circular-progress';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { map } from 'rxjs';\nimport { injectAuthConfig } from '../../auth.config';\nimport { AuthService } from '../../auth.service';\n\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'div.odx-auth-loading-screen',\n imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective],\n templateUrl: './auth-loading-screen.component.html',\n styleUrls: ['./auth-loading-screen.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[@hostAnimation]': 'true',\n },\n animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])],\n})\nexport class AuthLoadingScreenComponent {\n private static instance: DynamicViewRef<typeof AuthLoadingScreenComponent> | null = null;\n\n protected readonly authConfig = injectAuthConfig();\n protected readonly icon$ = inject(AuthService).isRedirecting$.pipe(map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));\n\n public static initialize(authService: AuthService, dynamicViewService: DynamicViewService): void {\n authService.isLoading$.subscribe((isLoading) => {\n if (isLoading) {\n AuthLoadingScreenComponent.instance ??= dynamicViewService.createView(AuthLoadingScreenComponent);\n } else {\n AuthLoadingScreenComponent.instance?.destroy();\n AuthLoadingScreenComponent.instance = null;\n }\n });\n }\n}\n","<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\" />\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\" />\n </odx-circular-progress>\n @if (authConfig.loadingScreenMessage; as content) {\n <p class=\"odx-auth-loading-screen__message\">\n <ng-template [odxDynamicView]=\"content\" />\n </p>\n }\n</div>\n","import { DestroyRef, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Subscription, of } from 'rxjs';\nimport logger from '../auth.logger';\nimport { AuthPluginFactory } from '../models';\n\nexport const coreDebugPlugin: AuthPluginFactory = () => {\n logger.warn('DEBUG MODE ENABLED - DO NOT USE IN PRODUCTION!');\n const destroyRef = inject(DestroyRef);\n let instance: Subscription | null = null;\n\n return (authService) => {\n instance ??= authService.identityClaims$.pipe(takeUntilDestroyed(destroyRef)).subscribe((claims) => {\n logger.info(`User: ${claims?.username} (${claims?.email})`);\n logger.group('Identity claims', (log) => log(claims), false);\n logger.group('Access token', (log) => log(authService.getAccessToken()));\n logger.group('Refresh token', (log) => log(authService.getRefreshToken()));\n logger.group('ID token', (log) => log(authService.getIdToken()));\n });\n\n return of({});\n };\n};\n","import { of } from 'rxjs';\nimport { injectAuthConfig } from '../auth.config';\nimport { AuthPluginFactory } from '../models';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n email: string;\n initials: string;\n username: string;\n }\n }\n}\n\nexport const coreIdentityPlugin: AuthPluginFactory = () => {\n const { resolveEmail, resolveUsername, createInitials } = injectAuthConfig();\n\n return (authService) => {\n const claims = authService.getRawIdentityClaims();\n if (!claims) return of({});\n const username = resolveUsername(claims);\n\n return of({ email: resolveEmail(claims), username, initials: createInitials(username) });\n };\n};\n","import { of } from 'rxjs';\nimport { ODX_AUTH_USER_PROFILE_HOSTS, injectAuthConfig } from '../auth.config';\nimport { AuthPluginFactory } from '../models';\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace OdxAuth {\n interface AuthPluginResult {\n userProfileUrl: string;\n }\n }\n}\n\nexport const userProfileUrlPlugin: AuthPluginFactory = () => {\n const { environment, userProfileUrl } = injectAuthConfig();\n return () => {\n return of({ userProfileUrl: userProfileUrl ?? ODX_AUTH_USER_PROFILE_HOSTS[environment] });\n };\n};\n","import { provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { APP_INITIALIZER, ENVIRONMENT_INITIALIZER, EnvironmentProviders, InjectionToken, Provider, inject, makeEnvironmentProviders } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { ConfigDependencies, ConfigProvider, buildUrl } from '@odx/angular/utils';\nimport { OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc';\nimport { tap } from 'rxjs';\nimport { AuthConfig, AuthErrorHandlerFn, ODX_AUTH_DEFAULT_SCOPES, injectAuthConfig, provideAuthConfig } from './auth.config';\nimport { authInterceptor } from './auth.interceptor';\nimport logger from './auth.logger';\nimport { AuthService } from './auth.service';\nimport { AuthLoadingScreenComponent } from './components';\nimport { createAuthHostUrl, handleAuthError } from './helpers';\nimport { AuthPlugin, AuthPluginErrorHandler, AuthPluginFactory, offlineAuthErrorHandler } from './models';\nimport { coreDebugPlugin, coreIdentityPlugin, userProfileUrlPlugin } from './plugins';\n\nexport const ODX_AUTH_ERROR_HANDLERS = new InjectionToken<AuthErrorHandlerFn[]>('@odx/auth::ErrorHandlers', {\n providedIn: 'root',\n factory: () => {\n const { errorHandler } = injectAuthConfig();\n\n return [offlineAuthErrorHandler, errorHandler];\n },\n});\n\nexport const ODX_AUTH_PLUGINS_ERROR_HANDLER = new InjectionToken<AuthPluginErrorHandler | null>('@odx/auth::PluginsErrorHandler', {\n providedIn: 'root',\n factory: () => injectAuthConfig().pluginsErrorHandler ?? null,\n});\n\nexport const ODX_AUTH_CORE_PLUGINS = new InjectionToken<AuthPluginFactory[]>('@odx/auth::CorePlugins', {\n providedIn: 'root',\n factory: () => {\n const { showDebugInformation } = injectAuthConfig();\n const plugins = [coreIdentityPlugin, userProfileUrlPlugin];\n if (showDebugInformation) {\n plugins.push(coreDebugPlugin);\n }\n\n return plugins;\n },\n});\n\nexport const ODX_AUTH_PLUGINS = new InjectionToken<AuthPlugin[]>('@odx/auth::Plugins', {\n providedIn: 'root',\n factory: () => {\n const { plugins } = injectAuthConfig();\n const corePlugins = inject(ODX_AUTH_CORE_PLUGINS);\n\n return [...corePlugins, ...plugins].map((pluginFactory) => pluginFactory());\n },\n});\n\nexport function provideAuthLogger(): Provider {\n return {\n provide: ENVIRONMENT_INITIALIZER,\n useFactory: () => {\n const { showDebugInformation } = injectAuthConfig();\n if (!showDebugInformation) logger.disable();\n\n return () => void 0;\n },\n multi: true,\n };\n}\n\nexport function initializeAuthErrorHandlers(): void {\n const authService = inject(AuthService);\n const handler = handleAuthError(inject(ODX_AUTH_ERROR_HANDLERS));\n\n authService.errors$.pipe(tap((error) => handler(error))).subscribe();\n}\n\nexport function initalizeAuthConfig(): () => Promise<void> {\n const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl, enableLoadingScreen } = injectAuthConfig();\n const authService = inject(AuthService);\n const redirectUri = buildUrl(inject(WindowRef).getOrigin(), redirectPath);\n const scope = Array.from(new Set(ODX_AUTH_DEFAULT_SCOPES.concat(scopes ?? []))).join(' ');\n if (enableLoadingScreen) {\n AuthLoadingScreenComponent.initialize(authService, inject(DynamicViewService));\n }\n return () =>\n authService.initialize({\n clientId,\n issuer: issuer ?? createAuthHostUrl(environment, 'oauth2/default'),\n scope,\n redirectUri,\n postLogoutRedirectUri: postLogoutRedirectUrl,\n preserveRequestedRoute: true,\n strictDiscoveryDocumentValidation: !discoveryUrl,\n responseType: 'code',\n showDebugInformation: false,\n timeoutFactor,\n waitForTokenInMsec: 1000,\n });\n}\n\nexport function provideAuth<D extends ConfigDependencies>(config: ConfigProvider<Partial<AuthConfig>, D>): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideAuthConfig(config),\n provideAuthLogger(),\n provideOAuthClient({ resourceServer: { sendAccessToken: false, allowedUrls: [] } }),\n provideHttpClient(withInterceptors([authInterceptor])),\n {\n provide: APP_INITIALIZER,\n useFactory: initalizeAuthConfig,\n multi: true,\n },\n {\n provide: OAuthStorage,\n useFactory: () => injectAuthConfig().storage ?? inject(WindowRef).nativeWindow.localStorage,\n },\n ]);\n}\n","import { inject, Injectable } from '@angular/core';\nimport { isNumber } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { BehaviorSubject, catchError, combineLatest, distinctUntilChanged, filter, map, Observable, of, share, switchMap, take, tap, timeout } from 'rxjs';\nimport { injectAuthConfig } from '../auth.config';\nimport { ODX_AUTH_PLUGINS, ODX_AUTH_PLUGINS_ERROR_HANDLER } from '../auth.providers';\nimport { AuthService } from '../auth.service';\n\nexport type AuthPlugin = (authService: AuthService) => Observable<Partial<OdxAuth.AuthPluginResult>>;\nexport type AuthPluginFactory = () => AuthPlugin;\nexport type AuthPluginError = unknown;\nexport type AuthPluginErrorHandler = (error: AuthPluginError) => void;\n\n@Injectable({ providedIn: 'root' })\nexport class AuthPluginManager {\n private readonly authConfig = injectAuthConfig();\n private readonly pluginsErrorHandler = inject(ODX_AUTH_PLUGINS_ERROR_HANDLER, { optional: true });\n private readonly plugins = inject(ODX_AUTH_PLUGINS);\n private readonly result$$ = new BehaviorSubject<OdxAuth.AuthPluginResult | null>(null);\n\n public readonly pluginsReady$ = this.result$$.pipe(filter(Boolean), map(Boolean), distinctUntilChanged(), share());\n public readonly pluginsLoading$ = this.result$$.pipe(\n map((result) => !result),\n distinctUntilChanged(),\n share(),\n );\n\n public runPlugins(authService: AuthService): Observable<OdxAuth.AuthPluginResult> {\n if (this.plugins.length < 1) {\n return of({} as OdxAuth.AuthPluginResult);\n }\n return authService.waitForAccessToken$(false).pipe(\n switchMap((token) => {\n if (!token) return of([{}]);\n return combineLatest(this.plugins.map((plugin) => this.runPlugin(authService, plugin)));\n }),\n map((results) => deepmerge(...results) as OdxAuth.AuthPluginResult),\n tap((result) => this.result$$.next(result)),\n take(1),\n );\n }\n\n public getResult(): OdxAuth.AuthPluginResult {\n return this.result$$.getValue() ?? ({} as OdxAuth.AuthPluginResult);\n }\n\n private handlePluginError(error?: unknown): Observable<OdxAuth.AuthPluginResult> {\n try {\n this.pluginsErrorHandler?.(error);\n } catch {\n //\n }\n\n return of({} as OdxAuth.AuthPluginResult);\n }\n\n private runPlugin(authService: AuthService, plugin: AuthPlugin): ReturnType<AuthPlugin> {\n return plugin(authService).pipe(\n isNumber(this.authConfig.pluginTimeout) ? timeout(Math.max(0, this.authConfig.pluginTimeout)) : tap(),\n catchError((error) => this.handlePluginError(error)),\n );\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { AuthErrorHandlerFn } from '../auth.config';\n\nexport const offlineAuthErrorHandler: AuthErrorHandlerFn = (error) => {\n if (error.type === 'discovery_document_load_error' && (error.reason as HttpErrorResponse)?.status === 504) {\n return;\n }\n throw error;\n};\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { AuthConfig, OAuthErrorEvent, OAuthService, TokenResponse } from 'angular-oauth2-oidc';\nimport { deepmerge } from 'deepmerge-ts';\nimport {\n BehaviorSubject,\n Observable,\n catchError,\n combineLatest,\n distinctUntilChanged,\n filter,\n fromEvent,\n map,\n merge,\n of,\n share,\n shareReplay,\n startWith,\n switchMap,\n take,\n tap,\n timeout,\n} from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport { setHttpAuthHeader } from './helpers';\nimport { AuthPluginManager, AuthorizedHandler } from './models';\n\n@Injectable({ providedIn: 'root' })\nexport class AuthService {\n private readonly authConfig = injectAuthConfig();\n private readonly authPluginManager = inject(AuthPluginManager);\n private readonly oauthService = inject(OAuthService);\n private readonly router = inject(Router);\n private readonly windowRef = inject(WindowRef);\n\n private readonly isInitialized$$ = new BehaviorSubject(false);\n private readonly isRedirecting$$ = new BehaviorSubject(false);\n private readonly onAccessTokenUpdate$ = fromEvent<StorageEvent>(this.windowRef.nativeWindow, 'storage').pipe(\n filter(({ key }) => key === 'access_token' || key === null),\n startWith(null),\n share(),\n );\n private readonly silentRefreshHandler$ = this.isInitialized$$.pipe(\n filter(Boolean),\n switchMap(() => this.windowRef.isOnline$),\n tap((isOnline) => this.updateSilentRefresh(isOnline)),\n );\n private readonly onAuthStateChange$ = combineLatest([this.oauthService.events.pipe(startWith(null)), this.windowRef.isOnline$, this.onAccessTokenUpdate$]);\n\n public readonly isInitialized$ = this.isInitialized$$.pipe(filter(Boolean), distinctUntilChanged());\n public readonly isRedirecting$ = this.isRedirecting$$.pipe(distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));\n public readonly isLoading$ = merge(this.isRedirecting$, this.authPluginManager.pluginsLoading$).pipe(distinctUntilChanged());\n public readonly isAuthenticated$ = this.isInitialized$.pipe(\n switchMap(() => this.authPluginManager.pluginsReady$),\n switchMap(() => this.onAuthStateChange$),\n map(() => this.isAuthenticated()),\n distinctUntilChanged(),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n public readonly identityClaims$ = this.isAuthenticated$.pipe(\n map(() => this.getIdentityClaims()),\n shareReplay({ bufferSize: 1, refCount: true }),\n );\n public readonly errors$ = this.oauthService.events.pipe(\n filter((event): event is OAuthErrorEvent => event instanceof OAuthErrorEvent),\n share(),\n );\n public readonly onTokenReceived$ = this.oauthService.events.pipe(\n filter((event) => event.type === 'token_received'),\n share(),\n );\n\n constructor() {\n this.runPlugins();\n this.silentRefreshHandler$.subscribe();\n }\n\n public async initialize(config: AuthConfig): Promise<void> {\n this.assertAudience(config.clientId);\n this.oauthService.configure({ ...config, openUri: this.redirectToLogin.bind(this) });\n try {\n await this.oauthService.loadDiscoveryDocument(this.authConfig.discoveryUrl);\n await this.oauthService.tryLogin();\n if (this.authConfig.refreshTokenOnInit) {\n await this.tryRefreshToken();\n }\n } catch (error) {\n if (!(error instanceof HttpErrorResponse || error instanceof OAuthErrorEvent)) {\n throw error;\n }\n if (error.type === 'token_refresh_error' || (error instanceof HttpErrorResponse && (error.status === 401 || error.status === 400))) {\n this.signOut(true);\n this.signIn(this.windowRef.location.pathname);\n }\n }\n this.isInitialized$$.next(true);\n if (this.authConfig.requireSignIn && !this.isAuthenticated()) {\n this.signIn(this.windowRef.location.pathname);\n }\n await this.tryLoadUserProfile();\n await this.routeToRequestedUrl();\n }\n\n public runPlugins(): void {\n this.authPluginManager.runPlugins(this).subscribe();\n }\n\n public getIssuer(): URL {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return new URL(this.oauthService.issuer!);\n }\n\n public signIn(url?: string): void {\n this.oauthService.initLoginFlow(url);\n }\n\n public signOut(noRedirect?: boolean): void {\n this.oauthService.logOut(noRedirect || !this.getAccessToken());\n }\n\n public async refreshTokens(): Promise<TokenResponse> {\n return this.oauthService.refreshToken();\n }\n\n public getAccessToken(): string | null {\n return this.oauthService.getAccessToken() ?? null;\n }\n\n public getRefreshToken(): string | null {\n return this.oauthService.getRefreshToken() ?? null;\n }\n\n public getIdToken(): string | null {\n return this.oauthService.getIdToken() ?? null;\n }\n\n public getIdentityClaims(): OdxAuth.IdentiyClaims | null {\n if (!this.getIdToken()) return null;\n return deepmerge(this.oauthService.getIdentityClaims(), this.authPluginManager.getResult()) as OdxAuth.IdentiyClaims;\n }\n\n public getRawIdentityClaims(): OdxAuth.RawIdentityClaims | null {\n if (!this.getIdToken()) return null;\n return this.oauthService.getIdentityClaims();\n }\n\n public isAuthenticated(): boolean {\n if (this.windowRef.isOnline()) {\n return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();\n }\n return this.hasValidOfflineToken();\n }\n\n public isAuthorized(authorizedHandler?: AuthorizedHandler | null): boolean {\n const handler = authorizedHandler ?? this.authConfig.defaultAuthorizedHandler;\n\n return this.isAuthenticated() && (handler?.(this.getIdentityClaims(), this, this.router) ?? true);\n }\n\n public isAuthorized$(authorizedHandler?: AuthorizedHandler | null): Observable<boolean> {\n return this.isAuthenticated$.pipe(map(() => this.isAuthorized(authorizedHandler)));\n }\n\n public prepareAuthRequest$<R extends HttpRequest<T> | Request, T>(req: R, requireSignIn = false): Observable<R> {\n return this.waitForAccessToken$(requireSignIn).pipe(map((token) => setHttpAuthHeader(req, token)));\n }\n\n public waitForAccessToken$(requireSignIn: boolean): Observable<string | null> {\n const accessToken$ = of(this.getAccessToken()).pipe(filter((token) => !!token && this.isAuthenticated()));\n const waitForAccessToken$ = this.onTokenReceived$.pipe(\n timeout(this.authConfig.waitForTokenInMs ?? 0),\n catchError(async () => this.tryRefreshToken().catch(() => null)),\n );\n\n return this.isInitialized$.pipe(\n switchMap(() => merge(accessToken$, waitForAccessToken$)),\n take(1),\n map(() => this.getAccessToken()),\n tap((token) => !token && requireSignIn && this.signIn(this.windowRef.location.pathname)),\n );\n }\n\n private async routeToRequestedUrl(): Promise<void> {\n if (!this.oauthService.state || !this.oauthService.hasValidAccessToken()) return;\n await this.router.navigateByUrl(decodeURIComponent(this.oauthService.state));\n }\n\n private hasValidOfflineToken(): boolean {\n const issuedAt = this.getIdentityClaims()?.iat ?? 0;\n\n return Date.now() - issuedAt * 1000 <= this.authConfig.maxOfflineTime * 1000;\n }\n\n private redirectToLogin(uri: string): void {\n this.windowRef.location.assign(uri);\n this.isRedirecting$$.next(true);\n }\n\n private async tryLoadUserProfile(): Promise<void> {\n if (!this.authConfig.loadUserProfile || !this.isAuthenticated()) return;\n await this.oauthService.loadUserProfile().catch(() => null);\n }\n\n private async tryRefreshToken(): Promise<void> {\n if (!this.getRefreshToken()) return;\n await this.oauthService.refreshToken();\n }\n\n private assertAudience(clientId?: string | null): void {\n const tokenClientId = this.getIdentityClaims()?.aud;\n if (!clientId || !tokenClientId || clientId === tokenClientId) return;\n this.signOut(true);\n }\n\n private updateSilentRefresh(enabled: boolean) {\n if (enabled) {\n this.oauthService.setupAutomaticSilentRefresh();\n } else {\n this.oauthService.stopAutomaticRefresh();\n }\n }\n}\n","import { inject } from '@angular/core';\nimport { LanguageLoaderFn } from '@odx/angular/localization';\nimport { isNonEmptyString } from '@odx/angular/utils';\nimport { map } from 'rxjs';\nimport { AuthService } from '../auth.service';\n\ntype LanguageSelector = (claims?: OdxAuth.IdentiyClaims | null) => string | null | undefined;\n\nexport function userLanguageLoader(languageSelector: LanguageSelector = (claims) => claims?.preferredLanguage): LanguageLoaderFn {\n return () => {\n return inject(AuthService).identityClaims$.pipe(\n map(languageSelector),\n map((value) => (isNonEmptyString(value) ? value : undefined)),\n );\n };\n}\n","import { DynamicTextContent } from '@odx/angular/cdk/dynamic-view';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { OAuthErrorEvent, OAuthStorage } from 'angular-oauth2-oidc';\nimport { createInitials, resolveEmail, resolveUsername } from './helpers';\n\nimport { AuthEnvironment, AuthorizedHandler, AuthPluginFactory } from './models';\n\nexport const AUTH_HTTP_HEADER = 'Authorization';\nexport const ODX_AUTH_DEFAULT_SCOPES = ['openid', 'profile', 'email', 'offline_access'];\nexport const ODX_AUTH_HOSTS: Record<AuthEnvironment, string> = {\n dev: 'https://dev.login.draeger.com',\n stage: 'https://test.login.draeger.com',\n prod: 'https://login.draeger.com',\n};\nexport const ODX_AUTH_USER_PROFILE_HOSTS: Record<AuthEnvironment, string> = {\n dev: 'https://lemon-ocean-04a922703.3.azurestaticapps.net',\n stage: 'https://purple-cliff-0e61c5703.3.azurestaticapps.net',\n prod: 'https://id.draeger.com',\n};\n\nexport type AuthErrorHandlerFn = (error: OAuthErrorEvent) => void;\nexport type ResolveUsernameFn = (rawClaims: OdxAuth.RawIdentityClaims) => string;\nexport type ResolveEmailFn = (rawClaims: OdxAuth.RawIdentityClaims) => string;\nexport type CreateInitialsFn = (value: string) => string;\n\nexport interface AuthConfig {\n environment: AuthEnvironment;\n clientId?: string;\n issuer?: string;\n redirectPath: string;\n allowedUrls: Array<string | RegExp>;\n timeoutFactor: number;\n maxOfflineTime: number;\n loadUserProfile: boolean;\n postLogoutRedirectUrl?: string;\n scopes?: string[];\n discoveryUrl?: string;\n errorHandler: AuthErrorHandlerFn;\n createInitials: CreateInitialsFn;\n resolveEmail: ResolveEmailFn;\n resolveUsername: ResolveUsernameFn;\n storage?: OAuthStorage;\n plugins: AuthPluginFactory[];\n pluginsErrorHandler?: (error: unknown) => void;\n defaultAuthorizedHandler?: AuthorizedHandler | null;\n enableLoadingScreen: boolean;\n refreshTokenOnInit?: boolean;\n loadingScreenMessage?: DynamicTextContent | null;\n userProfileUrl?: string;\n requireSignIn?: boolean;\n requireSignInForRequests?: boolean;\n waitForTokenInMs?: number;\n showDebugInformation?: boolean;\n pluginTimeout?: number;\n}\n\nexport const { AuthDefaultConfig, AuthConfig, injectAuthConfig, provideAuthConfig } = createConfigTokens('Auth', '@odx/auth', {\n environment: 'prod',\n redirectPath: 'login/callback',\n allowedUrls: [],\n timeoutFactor: 0.75,\n maxOfflineTime: 24 * 60 * 60, // 1 day\n loadUserProfile: false,\n errorHandler: (error) => {\n throw error;\n },\n createInitials,\n resolveEmail,\n resolveUsername,\n plugins: [],\n defaultAuthorizedHandler: null,\n enableLoadingScreen: true,\n loadingScreenMessage: null,\n waitForTokenInMs: 1000,\n} as AuthConfig);\n","import { TranslationObject } from '@odx/angular/internal/translate';\n\nexport default {\n en: {\n userProfileLink: 'My profile',\n signInButtonText: 'Sign in',\n signOutButtonText: 'Sign out',\n },\n de: {\n userProfileLink: 'Mein Profil',\n signInButtonText: 'Einloggen',\n signOutButtonText: 'Ausloggen',\n },\n} as TranslationObject;\n","import { AfterViewInit, Directive, inject } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { untilDestroyed } from '@odx/angular/utils';\nimport { AuthService } from '../auth.service';\n\n@Directive()\nexport abstract class AuthActionDirective implements AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly loadingSpinnerDirective = inject(LoadingSpinnerDirective, { self: true });\n protected readonly authService = inject(AuthService);\n\n public ngAfterViewInit(): void {\n this.loadingSpinnerDirective.autoColor = true;\n this.authService.isRedirecting$.pipe(this.takeUntilDestroyed()).subscribe((isRedirecting) => {\n this.loadingSpinnerDirective.isLoading = isRedirecting;\n });\n }\n\n protected abstract handleClick(): void;\n}\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { AuthActionDirective } from './auth-action.directive';\n\n@Directive({\n standalone: true,\n selector: '[odxButton][odxAuthSignIn]',\n hostDirectives: [LoadingSpinnerDirective],\n})\nexport class SignInDirective extends AuthActionDirective {\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxAuthSignIn')\n public afterSignIn = new EventEmitter<void>();\n\n @HostListener('click')\n protected override handleClick(): void {\n this.authService.signIn();\n this.afterSignIn.next();\n }\n}\n","import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { LoadingSpinnerDirective } from '@odx/angular/components/loading-spinner';\nimport { AuthActionDirective } from './auth-action.directive';\n\n@Directive({\n standalone: true,\n selector: '[odxButton][odxAuthSignOut]',\n hostDirectives: [LoadingSpinnerDirective],\n})\nexport class SignOutDirective extends AuthActionDirective {\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxAuthSignOut')\n public afterSignOut = new EventEmitter<void>();\n\n @HostListener('click')\n protected override handleClick(): void {\n this.authService.signOut();\n this.afterSignOut.next();\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input, ViewEncapsulation } from '@angular/core';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { DropdownModule, DropdownOptions } from '@odx/angular/components/dropdown';\nimport { HeaderModule } from '@odx/angular/components/header';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { provideTranslations, TranslatePipe } from '@odx/angular/internal/translate';\nimport { Position } from '@odx/angular/utils';\nimport { combineLatest } from 'rxjs';\nimport { injectAuthConfig } from './auth.config';\nimport translations from './auth.i18n';\nimport { AuthService } from './auth.service';\nimport { AuthActionsComponent } from './components';\nimport { SignInDirective, SignOutDirective } from './directives';\n\n@Component({\n standalone: true,\n selector: 'odx-auth',\n imports: [\n AreaHeaderModule,\n DropdownModule,\n HeaderModule,\n LogoDirective,\n SignInDirective,\n SignOutDirective,\n LoadingSpinnerModule,\n AuthActionsComponent,\n TranslatePipe,\n AsyncPipe,\n ],\n templateUrl: './auth.component.html',\n styleUrls: ['./auth.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [provideTranslations(translations)],\n})\nexport class AuthComponent {\n protected readonly authConfig = injectAuthConfig();\n protected readonly authService = inject(AuthService);\n protected readonly dropdownOptions = {\n position: Position.BOTTOM_END,\n enableFallback: false,\n containerClass: 'odx-auth-user-profile',\n } as Partial<DropdownOptions>;\n\n protected readonly vm$ = combineLatest({\n idClaims: this.authService.identityClaims$,\n isAuthenticated: this.authService.isAuthenticated$,\n });\n\n public readonly hideInstitution = input(false);\n}\n","<odx-action-group>\n @if (vm$ | async; as vm) {\n <ng-container ngProjectAs=\"[odxButton]\">\n @if (vm.isAuthenticated) {\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" />\n </button>\n } @else {\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft />\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n }\n <ng-template #userProfileMenu>\n @if (!hideInstitution() && vm.idClaims?.institutionName; as institutionName) {\n <odx-area-header class=\"odx-padding-x-12 odx-padding-bottom-8\" size=\"small\">\n <odx-area-header-subtitle class=\"odx-auth-institution-name\">{{ institutionName }}</odx-area-header-subtitle>\n </odx-area-header>\n }\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\" />\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 />\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 />\n </button>\n </div>\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-container>\n }\n</odx-action-group>\n","import { NgIf, NgIfContext } from '@angular/common';\nimport { AfterViewInit, Directive, inject, Input, TemplateRef } from '@angular/core';\nimport { isString, untilDestroyed } from '@odx/angular/utils';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuth]',\n hostDirectives: [NgIf],\n})\nexport class AuthDirective implements AfterViewInit {\n private readonly authService = inject(AuthService);\n private readonly ngIfDirective = inject(NgIf, { host: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n @Input('odxAuth')\n public authorizationHandler?: AuthorizedHandler | null | string = null;\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxAuthElse')\n public set elseTemplate(value: TemplateRef<NgIfContext<unknown>>) {\n this.ngIfDirective.ngIfElse = value;\n }\n\n public ngAfterViewInit(): void {\n this.authService.identityClaims$.pipe(this.takeUntilDestroyed()).subscribe(() => {\n const handler = isString(this.authorizationHandler) ? null : this.authorizationHandler;\n this.ngIfDirective.ngIf = this.authService.isAuthorized(handler);\n });\n }\n}\n","import { inject } from '@angular/core';\nimport { CanActivateFn, Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { isString } from '@odx/angular/utils';\nimport { EMPTY, of, switchMap, take, tap } from 'rxjs';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function authGuard(authorizedHandler?: AuthorizedHandler, redirectTo?: any[] | string, isExternal = false): CanActivateFn {\n return (_, state) => {\n const authService = inject(AuthService);\n const windowRef = inject(WindowRef);\n const router = inject(Router, { optional: true });\n\n return authService.isAuthenticated$.pipe(\n switchMap((isAuthenticated) => {\n if (!isAuthenticated) {\n authService.signIn(state.url);\n\n return EMPTY;\n }\n return of(authService.isAuthorized(authorizedHandler));\n }),\n tap((isAuthorized) => {\n if (isAuthorized || !router) return;\n if (isString(redirectTo)) {\n if (isExternal) {\n windowRef.location.assign(redirectTo);\n } else {\n router.navigateByUrl(redirectTo);\n }\n } else if (Array.isArray(redirectTo)) {\n router.navigate(redirectTo);\n }\n }),\n take(1),\n );\n };\n}\n","import { NgModule } from '@angular/core';\nimport { AuthComponent } from './auth.component';\nimport { AuthDirective } from './auth.directive';\nimport { SignInDirective, SignOutDirective } from './directives';\n\nconst modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];\n\n@NgModule({\n imports: [...modules],\n exports: [...modules],\n})\nexport class AuthModule {}\n","import { inject } from '@angular/core';\nimport { CanActivateFn, Router } from '@angular/router';\nimport { WindowRef } from '@odx/angular';\nimport { isString } from '@odx/angular/utils';\nimport { map, take, tap } from 'rxjs';\nimport { AuthService } from './auth.service';\nimport { AuthorizedHandler } from './models';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function unauthGuard(authorizedHandler?: AuthorizedHandler, redirectTo?: any[] | string, isExternal = false): CanActivateFn {\n return (_) => {\n const authService = inject(AuthService);\n const router = inject(Router, { optional: true });\n const windowRef = inject(WindowRef);\n\n return authService.isAuthenticated$.pipe(\n map(() => !authService.isAuthorized(authorizedHandler)),\n tap((isUnauthorized) => {\n if (isUnauthorized || !router) return;\n if (isString(redirectTo)) {\n if (isExternal) {\n windowRef.location.assign(redirectTo);\n } else {\n router.navigateByUrl(redirectTo);\n }\n } else if (Array.isArray(redirectTo)) {\n router.navigate(redirectTo);\n }\n }),\n take(1),\n );\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i3","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAIgB,iBAAiB,CAAC,WAA4B,EAAE,GAAG,QAAkB,EAAA;IACnF,OAAO,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,GAAG,QAAQ,CAAC;AAC3D;;ACNM,SAAU,cAAc,CAAC,KAAqB,EAAA;AAClD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,EAAE;IACrB,MAAM,KAAK,GAAG;AACX,SAAA,OAAO,CAAC,YAAY,EAAE,EAAE;AACxB,SAAA,IAAI;SACJ,KAAK,CAAC,GAAG,CAAC;IAEb,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,KAAI;AAC5C,QAAA,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7C,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;;AAEnC,QAAA,OAAO,QAAQ;KAChB,EAAE,EAAE,CAAC;AACR;;ACTM,SAAU,eAAe,CAAC,QAA8B,EAAA;AAC5D,IAAA,MAAM,QAAQ,GAAG,MAAM,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AAc,IAAI,CAAC,MAAM;gBAAE;AAC/B,YAAA,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;gBACxB,IAAI,UAAU,EAAE;AACd,oBAAA,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC;;qBAChC;AACL,oBAAA,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC;;;AAE7B,iBAAA,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AACpC,gBAAA,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;;AAE/B,SAAC,CAAC,EACF,IAAI,CAAC,CAAC,CAAC,CACR;AACH,KAAC;AACH;;AChCA;;AAEG;;;;"}
|
package/lib/auth.config.d.ts
CHANGED
|
@@ -39,4 +39,4 @@ export interface AuthConfig {
|
|
|
39
39
|
showDebugInformation?: boolean;
|
|
40
40
|
pluginTimeout?: number;
|
|
41
41
|
}
|
|
42
|
-
export declare const AuthDefaultConfig: AuthConfig, AuthConfig: import("@angular/core").InjectionToken<Partial<AuthConfig>>, injectAuthConfig: () => AuthConfig, provideAuthConfig: <D extends import("@odx/angular/utils").ConfigDependencies
|
|
42
|
+
export declare const AuthDefaultConfig: AuthConfig, AuthConfig: import("@angular/core").InjectionToken<Partial<AuthConfig>>, injectAuthConfig: () => AuthConfig, provideAuthConfig: <D extends import("@odx/angular/utils").ConfigDependencies = import("@odx/angular/utils").ConfigDependencies<Partial<AuthConfig>>>(config: import("@odx/angular/utils").ConfigProvider<Partial<AuthConfig>, D>) => import("@angular/core").FactoryProvider | import("@angular/core").ValueProvider;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@odx/angular": "^
|
|
7
|
+
"@odx/angular": "^12.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"angular-oauth2-oidc": "^15.0.1",
|