@odx/auth 3.4.0 → 4.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/README.md +16 -2
- package/esm2020/lib/auth.component.mjs +19 -11
- package/esm2020/lib/auth.config.mjs +10 -1
- package/esm2020/lib/auth.i18n.mjs +13 -0
- package/esm2020/lib/auth.providers.mjs +16 -11
- package/esm2020/lib/components/auth-actions/auth-actions.component.mjs +30 -0
- package/esm2020/lib/components/index.mjs +2 -1
- package/esm2020/lib/helpers/handle-auth-error.mjs +21 -0
- package/esm2020/lib/helpers/index.mjs +2 -1
- package/esm2020/lib/models/auth-http-cache.mjs +15 -6
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/offline-auth-error-handler.mjs +7 -0
- package/esm2020/lib/plugins/index.mjs +2 -1
- package/esm2020/lib/plugins/user-profile-link.plugin.mjs +9 -0
- package/esm2020/plugins/service-connect/lib/helpers/service-connect-plugin-factory.mjs +5 -17
- package/esm2020/plugins/service-connect/lib/service-connect-rights.plugin.mjs +1 -2
- package/esm2020/plugins/service-connect/lib/service-connect.config.mjs +4 -3
- package/fesm2015/odx-auth-plugins-service-connect.mjs +7 -21
- package/fesm2015/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2015/odx-auth.mjs +162 -68
- package/fesm2015/odx-auth.mjs.map +1 -1
- package/fesm2020/odx-auth-plugins-service-connect.mjs +7 -19
- package/fesm2020/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2020/odx-auth.mjs +160 -66
- package/fesm2020/odx-auth.mjs.map +1 -1
- package/lib/auth.component.d.ts +1 -3
- package/lib/auth.config.d.ts +3 -0
- package/lib/auth.i18n.d.ts +3 -0
- package/lib/auth.providers.d.ts +1 -1
- package/lib/components/auth-actions/auth-actions.component.d.ts +7 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/helpers/handle-auth-error.d.ts +3 -0
- package/lib/helpers/index.d.ts +1 -0
- package/lib/models/auth-http-cache.d.ts +2 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/offline-auth-error-handler.d.ts +2 -0
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/user-profile-link.plugin.d.ts +9 -0
- package/package.json +2 -2
- package/plugins/service-connect/lib/helpers/service-connect-plugin-factory.d.ts +3 -2
- package/plugins/service-connect/lib/service-connect-rights.plugin.d.ts +1 -1
- package/plugins/service-connect/lib/service-connect.config.d.ts +3 -0
package/fesm2020/odx-auth.mjs
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, EnvironmentInjector, InjectionToken, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Directive, EventEmitter, Output, HostListener, NgModule, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import { WindowRef, CoreModule } from '@odx/angular';
|
|
4
|
-
import * as i3 from '@odx/angular/components/area-header';
|
|
4
|
+
import * as i3$1 from '@odx/angular/components/area-header';
|
|
5
5
|
import { AreaHeaderModule } from '@odx/angular/components/area-header';
|
|
6
6
|
import * as i8 from '@odx/angular/components/dropdown';
|
|
7
7
|
import { DropdownModule } from '@odx/angular/components/dropdown';
|
|
8
8
|
import { HeaderModule } from '@odx/angular/components/header';
|
|
9
|
-
import * as i1 from '@odx/angular/components/loading-spinner';
|
|
9
|
+
import * as i1$1 from '@odx/angular/components/loading-spinner';
|
|
10
10
|
import { LoadingSpinnerDirective, LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
|
|
11
11
|
import { LogoDirective } from '@odx/angular/components/logo';
|
|
12
|
-
import {
|
|
12
|
+
import { TranslatePipe, provideTranslations } from '@odx/angular/internal/translate';
|
|
13
|
+
import { isString, createConfigTokens, injectElement, untilDestroyed, Position, buildUrl } from '@odx/angular/utils';
|
|
14
|
+
import { OAuthErrorEvent, OAuthService, provideOAuthClient, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
|
|
13
15
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
14
16
|
import { Router } from '@angular/router';
|
|
15
|
-
import { OAuthService, OAuthErrorEvent, provideOAuthClient, OAuthModuleConfig, OAuthStorage } from 'angular-oauth2-oidc';
|
|
16
17
|
import { deepmerge } from 'deepmerge-ts';
|
|
17
18
|
import jwtDecode from 'jwt-decode';
|
|
18
19
|
import { BehaviorSubject, filter, map, distinctUntilChanged, share, of, switchMap, combineLatest, tap, take, fromEvent, startWith, merge, shareReplay, EMPTY } from 'rxjs';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import * as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import * as i7 from '@odx/angular/components/icon';
|
|
20
|
+
import { __decorate } from 'tslib';
|
|
21
|
+
import * as i2 from '@odx/angular/components/list';
|
|
22
|
+
import { ListModule } from '@odx/angular/components/list';
|
|
23
|
+
import { CSSComponent } from '@odx/angular/internal';
|
|
24
|
+
import * as i1 from '@angular/common';
|
|
25
|
+
import { CommonModule, NgIf } from '@angular/common';
|
|
26
|
+
import * as i3 from '@odx/angular/components/icon';
|
|
27
27
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
28
|
-
import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
29
28
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
30
29
|
import { fadeOut } from '@odx/angular/animations';
|
|
30
|
+
import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
31
|
+
import * as i6 from '@odx/angular/components/button';
|
|
32
|
+
import { ButtonComponent } from '@odx/angular/components/button';
|
|
31
33
|
import { CircularProgressComponent } from '@odx/angular/components/circular-progress';
|
|
34
|
+
import * as i2$1 from '@ngrx/component';
|
|
35
|
+
import * as i4 from '@odx/angular/components/avatar';
|
|
36
|
+
import * as i5 from '@odx/angular/components/action-group';
|
|
32
37
|
|
|
33
38
|
function createInitials(value) {
|
|
34
39
|
if (!value)
|
|
@@ -45,6 +50,25 @@ function createInitials(value) {
|
|
|
45
50
|
}, '');
|
|
46
51
|
}
|
|
47
52
|
|
|
53
|
+
function handleAuthError(handlers) {
|
|
54
|
+
const injector = inject(EnvironmentInjector);
|
|
55
|
+
return (error) => {
|
|
56
|
+
injector.runInContext(() => {
|
|
57
|
+
for (const handler of handlers) {
|
|
58
|
+
try {
|
|
59
|
+
handler(error);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
catch (unhandledError) {
|
|
63
|
+
if (!(unhandledError instanceof OAuthErrorEvent))
|
|
64
|
+
throw error;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
48
72
|
function resolveEmail(claims) {
|
|
49
73
|
if (isString(claims['email'])) {
|
|
50
74
|
return claims['email'];
|
|
@@ -80,10 +104,19 @@ const DEFAULT_ISSUERS = {
|
|
|
80
104
|
stage: 'https://test.login.draeger.com/oauth2/default',
|
|
81
105
|
prod: 'https://login.draeger.com/oauth2/default',
|
|
82
106
|
};
|
|
107
|
+
const DEFAULT_USER_PROFILE_URLS = {
|
|
108
|
+
dev: 'https://lemon-ocean-04a922703.3.azurestaticapps.net',
|
|
109
|
+
stage: 'https://purple-cliff-0e61c5703.3.azurestaticapps.net',
|
|
110
|
+
prod: 'https://id.draeger.com',
|
|
111
|
+
};
|
|
83
112
|
const ODX_AUTH_CORE_PLUGINS = new InjectionToken('@odx/auth::CorePlugins', {
|
|
84
113
|
providedIn: 'root',
|
|
85
114
|
factory: () => [],
|
|
86
115
|
});
|
|
116
|
+
const ODX_AUTH_ERROR_HANDLERS = new InjectionToken('@odx/auth::ErrorHandlers', {
|
|
117
|
+
providedIn: 'root',
|
|
118
|
+
factory: () => [],
|
|
119
|
+
});
|
|
87
120
|
const ODX_AUTH_PLUGINS = new InjectionToken('@odx/auth::Plugins', {
|
|
88
121
|
providedIn: 'root',
|
|
89
122
|
factory: () => {
|
|
@@ -112,6 +145,19 @@ const { AuthDefaultConfig, AuthConfig, injectAuthConfig, provideAuthConfig } = c
|
|
|
112
145
|
loadingScreenMessage: null,
|
|
113
146
|
});
|
|
114
147
|
|
|
148
|
+
var translations = {
|
|
149
|
+
en: {
|
|
150
|
+
userProfileLink: 'My profile',
|
|
151
|
+
signInButtonText: 'Sign in',
|
|
152
|
+
signOutButtonText: 'Sign out',
|
|
153
|
+
},
|
|
154
|
+
de: {
|
|
155
|
+
userProfileLink: 'Mein Profil',
|
|
156
|
+
signInButtonText: 'Einloggen',
|
|
157
|
+
signOutButtonText: 'Ausloggen',
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
|
|
115
161
|
const ODX_AUTH_HTTP_CACHE_STORAGE = new InjectionToken('@odx/auth::AuthHttpCacheStorage', {
|
|
116
162
|
providedIn: 'root',
|
|
117
163
|
factory: () => inject(WindowRef).nativeWindow.caches,
|
|
@@ -119,18 +165,26 @@ const ODX_AUTH_HTTP_CACHE_STORAGE = new InjectionToken('@odx/auth::AuthHttpCache
|
|
|
119
165
|
class AuthHttpCache {
|
|
120
166
|
constructor() {
|
|
121
167
|
this.cacheStorage = inject(ODX_AUTH_HTTP_CACHE_STORAGE);
|
|
168
|
+
this.oauthService = inject(OAuthService);
|
|
122
169
|
}
|
|
123
170
|
async delete(request) {
|
|
124
171
|
const cache = await this.cacheStorage.open(AuthHttpCache.CACHE_KEY);
|
|
125
172
|
return cache.delete(request);
|
|
126
173
|
}
|
|
127
|
-
async request(
|
|
174
|
+
async request(requestInfo, authentication = false) {
|
|
175
|
+
const request = new Request(requestInfo);
|
|
176
|
+
const authorizationHeader = authentication ? this.oauthService.authorizationHeader() : null;
|
|
177
|
+
if (authorizationHeader) {
|
|
178
|
+
request.headers.set('Authorization', authorizationHeader);
|
|
179
|
+
}
|
|
128
180
|
const cache = await this.cacheStorage.open(AuthHttpCache.CACHE_KEY);
|
|
129
|
-
|
|
130
|
-
|
|
181
|
+
const response = await fetch(request).catch(() => null);
|
|
182
|
+
if (response?.ok) {
|
|
183
|
+
await cache.put(request, response);
|
|
131
184
|
}
|
|
132
|
-
|
|
133
|
-
|
|
185
|
+
if (authorizationHeader && response?.status === 401) {
|
|
186
|
+
await cache.delete(request);
|
|
187
|
+
await this.oauthService.refreshToken().catch(() => null);
|
|
134
188
|
}
|
|
135
189
|
return cache.match(request).then((res) => res?.json() ?? null);
|
|
136
190
|
}
|
|
@@ -167,6 +221,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
167
221
|
args: [{ providedIn: 'root' }]
|
|
168
222
|
}] });
|
|
169
223
|
|
|
224
|
+
const offlineAuthErrorHandler = (error) => {
|
|
225
|
+
if (error.type === 'discovery_document_load_error' && error.reason?.status === 504) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
throw error;
|
|
229
|
+
};
|
|
230
|
+
|
|
170
231
|
class AuthService {
|
|
171
232
|
constructor() {
|
|
172
233
|
this.authConfig = injectAuthConfig();
|
|
@@ -296,6 +357,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
296
357
|
args: [{ providedIn: 'root' }]
|
|
297
358
|
}], ctorParameters: function () { return []; } });
|
|
298
359
|
|
|
360
|
+
let AuthActionsComponent = class AuthActionsComponent {
|
|
361
|
+
constructor() {
|
|
362
|
+
this.element = injectElement();
|
|
363
|
+
this.claims = null;
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
AuthActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
367
|
+
AuthActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list", inputs: ["multiple"] }, { kind: "component", type: i2.ListItemComponent, selector: "[odxListItem]", inputs: ["danger", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
368
|
+
AuthActionsComponent = __decorate([
|
|
369
|
+
CSSComponent('auth-actions')
|
|
370
|
+
], AuthActionsComponent);
|
|
371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthActionsComponent, decorators: [{
|
|
372
|
+
type: Component,
|
|
373
|
+
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n" }]
|
|
374
|
+
}], propDecorators: { claims: [{
|
|
375
|
+
type: Input
|
|
376
|
+
}] } });
|
|
377
|
+
|
|
378
|
+
class AuthLoadingScreenComponent {
|
|
379
|
+
constructor() {
|
|
380
|
+
this.authConfig = injectAuthConfig();
|
|
381
|
+
this.icon$ = inject(AuthService).isRedirecting$.pipe(startWith(false), distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
|
|
382
|
+
}
|
|
383
|
+
static initialize(authService, dynamicViewService) {
|
|
384
|
+
authService.isLoading$.subscribe((isLoading) => {
|
|
385
|
+
if (isLoading) {
|
|
386
|
+
AuthLoadingScreenComponent.instance ?? (AuthLoadingScreenComponent.instance = dynamicViewService.createView(AuthLoadingScreenComponent));
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
AuthLoadingScreenComponent.instance?.destroy();
|
|
390
|
+
AuthLoadingScreenComponent.instance = null;
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
AuthLoadingScreenComponent.instance = null;
|
|
396
|
+
AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
397
|
+
AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
399
|
+
type: Component,
|
|
400
|
+
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
401
|
+
'[@hostAnimation]': 'true',
|
|
402
|
+
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
403
|
+
}] });
|
|
404
|
+
|
|
299
405
|
class AuthActionDirective {
|
|
300
406
|
constructor() {
|
|
301
407
|
this.takeUntilDestroyed = untilDestroyed();
|
|
@@ -327,7 +433,7 @@ class SignInDirective extends AuthActionDirective {
|
|
|
327
433
|
}
|
|
328
434
|
}
|
|
329
435
|
SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
330
|
-
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
436
|
+
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
331
437
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignInDirective, decorators: [{
|
|
332
438
|
type: Directive,
|
|
333
439
|
args: [{
|
|
@@ -355,7 +461,7 @@ class SignOutDirective extends AuthActionDirective {
|
|
|
355
461
|
}
|
|
356
462
|
}
|
|
357
463
|
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
358
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
464
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
359
465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
360
466
|
type: Directive,
|
|
361
467
|
args: [{
|
|
@@ -380,20 +486,25 @@ class AuthComponent {
|
|
|
380
486
|
enableFallback: false,
|
|
381
487
|
containerClass: 'odx-auth-user-profile',
|
|
382
488
|
};
|
|
383
|
-
this.signInButtonText = 'Sign in';
|
|
384
|
-
this.signOutButtonText = 'Sign out';
|
|
385
489
|
}
|
|
386
490
|
}
|
|
387
491
|
AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
388
|
-
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth",
|
|
492
|
+
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthComponent, isStandalone: true, selector: "odx-auth", providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <odx-auth-actions [claims]=\"vm.idClaims\"></odx-auth-actions>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ 'signOutButtonText' | odxTranslate | async }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}.odx-auth-actions{display:block;margin-top:calc(var(--odx-vertical-rythm-base-size) * .5);margin-bottom:calc(var(--odx-vertical-rythm-base-size) * .5);margin-right:calc(var(--odx-vertical-rythm-base-size) * .25);margin-left:calc(var(--odx-vertical-rythm-base-size) * .25)}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "component", type: AuthActionsComponent, selector: "odx-auth-actions", inputs: ["claims"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
389
493
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthComponent, decorators: [{
|
|
390
494
|
type: Component,
|
|
391
|
-
args: [{ standalone: true, selector: 'odx-auth', imports: [
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
495
|
+
args: [{ standalone: true, selector: 'odx-auth', imports: [
|
|
496
|
+
CoreModule,
|
|
497
|
+
AreaHeaderModule,
|
|
498
|
+
DropdownModule,
|
|
499
|
+
HeaderModule,
|
|
500
|
+
LogoDirective,
|
|
501
|
+
SignInDirective,
|
|
502
|
+
SignOutDirective,
|
|
503
|
+
LoadingSpinnerModule,
|
|
504
|
+
AuthActionsComponent,
|
|
505
|
+
TranslatePipe,
|
|
506
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [provideTranslations(translations)], template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <odx-auth-actions [claims]=\"vm.idClaims\"></odx-auth-actions>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ 'signOutButtonText' | odxTranslate | async }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}.odx-auth-actions{display:block;margin-top:calc(var(--odx-vertical-rythm-base-size) * .5);margin-bottom:calc(var(--odx-vertical-rythm-base-size) * .5);margin-right:calc(var(--odx-vertical-rythm-base-size) * .25);margin-left:calc(var(--odx-vertical-rythm-base-size) * .25)}\n"] }]
|
|
507
|
+
}] });
|
|
397
508
|
|
|
398
509
|
class AuthDirective {
|
|
399
510
|
constructor() {
|
|
@@ -414,7 +525,7 @@ class AuthDirective {
|
|
|
414
525
|
}
|
|
415
526
|
}
|
|
416
527
|
AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
417
|
-
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1
|
|
528
|
+
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 });
|
|
418
529
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthDirective, decorators: [{
|
|
419
530
|
type: Directive,
|
|
420
531
|
args: [{
|
|
@@ -479,33 +590,6 @@ const coreIdentityPlugin = () => {
|
|
|
479
590
|
};
|
|
480
591
|
};
|
|
481
592
|
|
|
482
|
-
class AuthLoadingScreenComponent {
|
|
483
|
-
constructor() {
|
|
484
|
-
this.authConfig = injectAuthConfig();
|
|
485
|
-
this.icon$ = inject(AuthService).isRedirecting$.pipe(startWith(false), distinctUntilChanged(), map((isRedirecting) => (isRedirecting ? 'link-external' : 'user')));
|
|
486
|
-
}
|
|
487
|
-
static initialize(authService, dynamicViewService) {
|
|
488
|
-
authService.isLoading$.subscribe((isLoading) => {
|
|
489
|
-
if (isLoading) {
|
|
490
|
-
AuthLoadingScreenComponent.instance ?? (AuthLoadingScreenComponent.instance = dynamicViewService.createView(AuthLoadingScreenComponent));
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
AuthLoadingScreenComponent.instance?.destroy();
|
|
494
|
-
AuthLoadingScreenComponent.instance = null;
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
AuthLoadingScreenComponent.instance = null;
|
|
500
|
-
AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
501
|
-
AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
503
|
-
type: Component,
|
|
504
|
-
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
505
|
-
'[@hostAnimation]': 'true',
|
|
506
|
-
}, animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
|
507
|
-
}] });
|
|
508
|
-
|
|
509
593
|
const loadingScreenPlugin = () => {
|
|
510
594
|
const { enableLoadingScreen, showRedirectOverlay } = injectAuthConfig();
|
|
511
595
|
const dynamicViewService = inject(DynamicViewService);
|
|
@@ -517,6 +601,13 @@ const loadingScreenPlugin = () => {
|
|
|
517
601
|
};
|
|
518
602
|
};
|
|
519
603
|
|
|
604
|
+
const userProfileUrlPlugin = () => {
|
|
605
|
+
const { environment, userProfileUrl } = injectAuthConfig();
|
|
606
|
+
return () => {
|
|
607
|
+
return of({ userProfileUrl: userProfileUrl ?? DEFAULT_USER_PROFILE_URLS[environment] });
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
|
|
520
611
|
function configureInterceptor() {
|
|
521
612
|
const { allowedUrls } = injectAuthConfig();
|
|
522
613
|
return {
|
|
@@ -526,11 +617,10 @@ function configureInterceptor() {
|
|
|
526
617
|
},
|
|
527
618
|
};
|
|
528
619
|
}
|
|
529
|
-
function
|
|
620
|
+
function initializeAuthErrorHandlers() {
|
|
530
621
|
const authService = inject(AuthService);
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
authService.errors$.pipe(tap((error) => injector.runInContext(() => errorHandler(error)))).subscribe();
|
|
622
|
+
const handler = handleAuthError(inject(ODX_AUTH_ERROR_HANDLERS));
|
|
623
|
+
authService.errors$.pipe(tap((error) => handler(error))).subscribe();
|
|
534
624
|
}
|
|
535
625
|
function initalizeAuthConfig() {
|
|
536
626
|
const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl } = injectAuthConfig();
|
|
@@ -560,9 +650,13 @@ function provideAuth(config) {
|
|
|
560
650
|
},
|
|
561
651
|
{
|
|
562
652
|
provide: ENVIRONMENT_INITIALIZER,
|
|
563
|
-
useValue:
|
|
653
|
+
useValue: initializeAuthErrorHandlers,
|
|
564
654
|
multi: true,
|
|
565
655
|
},
|
|
656
|
+
{
|
|
657
|
+
provide: ODX_AUTH_ERROR_HANDLERS,
|
|
658
|
+
useFactory: () => [offlineAuthErrorHandler, injectAuthConfig().errorHandler],
|
|
659
|
+
},
|
|
566
660
|
{
|
|
567
661
|
provide: APP_INITIALIZER,
|
|
568
662
|
useFactory: initalizeAuthConfig,
|
|
@@ -570,11 +664,11 @@ function provideAuth(config) {
|
|
|
570
664
|
},
|
|
571
665
|
{
|
|
572
666
|
provide: OAuthStorage,
|
|
573
|
-
useFactory: () =>
|
|
667
|
+
useFactory: () => injectAuthConfig().storage ?? inject(WindowRef).nativeWindow.localStorage,
|
|
574
668
|
},
|
|
575
669
|
{
|
|
576
670
|
provide: ODX_AUTH_CORE_PLUGINS,
|
|
577
|
-
useValue: [coreIdentityPlugin, loadingScreenPlugin],
|
|
671
|
+
useValue: [coreIdentityPlugin, loadingScreenPlugin, userProfileUrlPlugin],
|
|
578
672
|
},
|
|
579
673
|
]);
|
|
580
674
|
}
|
|
@@ -601,5 +695,5 @@ function unauthGuard(authorizedHandler, redirectTo) {
|
|
|
601
695
|
* Generated bundle index. Do not edit.
|
|
602
696
|
*/
|
|
603
697
|
|
|
604
|
-
export { AuthActionDirective, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, initalizeAuthConfig,
|
|
698
|
+
export { AuthActionDirective, AuthActionsComponent, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, DEFAULT_USER_PROFILE_URLS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_ERROR_HANDLERS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, handleAuthError, initalizeAuthConfig, initializeAuthErrorHandlers, injectAuthConfig, loadingScreenPlugin, offlineAuthErrorHandler, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard, userProfileUrlPlugin };
|
|
605
699
|
//# sourceMappingURL=odx-auth.mjs.map
|