@odx/auth 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/esm2020/index.mjs +1 -1
- package/esm2020/lib/auth.component.mjs +4 -4
- package/esm2020/lib/auth.config.mjs +2 -1
- package/esm2020/lib/auth.directive.mjs +4 -4
- package/esm2020/lib/auth.guard.mjs +1 -1
- package/esm2020/lib/auth.i18n.mjs +1 -1
- package/esm2020/lib/auth.module.mjs +5 -5
- package/esm2020/lib/auth.providers.mjs +9 -4
- package/esm2020/lib/auth.service.mjs +7 -4
- package/esm2020/lib/auth.typings.mjs +1 -1
- package/esm2020/lib/components/auth-actions/auth-actions.component.mjs +4 -4
- package/esm2020/lib/components/auth-loading-screen/auth-loading-screen.component.mjs +4 -4
- package/esm2020/lib/components/index.mjs +1 -1
- package/esm2020/lib/directives/auth-action.directive.mjs +4 -4
- package/esm2020/lib/directives/index.mjs +1 -1
- package/esm2020/lib/directives/sign-in.directive.mjs +4 -4
- package/esm2020/lib/directives/sign-out.directive.mjs +4 -4
- package/esm2020/lib/helpers/create-inititals.mjs +1 -1
- package/esm2020/lib/helpers/handle-auth-error.mjs +1 -1
- package/esm2020/lib/helpers/handle-oauth-event.mjs +1 -1
- package/esm2020/lib/helpers/index.mjs +1 -1
- package/esm2020/lib/helpers/resolve-email.mjs +1 -1
- package/esm2020/lib/helpers/resolve-username.mjs +1 -1
- package/esm2020/lib/models/auth-environment.mjs +1 -1
- package/esm2020/lib/models/auth-http-cache.mjs +4 -4
- package/esm2020/lib/models/auth-plugin-manager.mjs +10 -5
- package/esm2020/lib/models/authorized-handler.mjs +1 -1
- package/esm2020/lib/models/index.mjs +1 -1
- package/esm2020/lib/models/offline-auth-error-handler.mjs +1 -1
- package/esm2020/lib/plugins/core-identity.plugin.mjs +1 -1
- package/esm2020/lib/plugins/index.mjs +1 -2
- package/esm2020/lib/plugins/user-profile-link.plugin.mjs +1 -1
- package/esm2020/lib/unauth.guard.mjs +1 -1
- package/esm2020/odx-auth.mjs +1 -1
- package/esm2020/plugins/service-connect/index.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/dtos/get-service-connect-rights-response.dto.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/dtos/index.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/helpers/build-service-connect-url.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/helpers/has-roles-or-rights-handler.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/helpers/has-roles-or-rights.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/helpers/index.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/helpers/service-connect-plugin-factory.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/service-connect-rights.directive.mjs +4 -4
- package/esm2020/plugins/service-connect/lib/service-connect-rights.guard.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/service-connect-rights.plugin.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/service-connect.config.mjs +1 -1
- package/esm2020/plugins/service-connect/lib/service-connect.typings.mjs +1 -1
- package/esm2020/plugins/service-connect/odx-auth-plugins-service-connect.mjs +1 -1
- package/fesm2015/odx-auth-plugins-service-connect.mjs +3 -3
- package/fesm2015/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2015/odx-auth.mjs +50 -49
- package/fesm2015/odx-auth.mjs.map +1 -1
- package/fesm2020/odx-auth-plugins-service-connect.mjs +3 -3
- package/fesm2020/odx-auth-plugins-service-connect.mjs.map +1 -1
- package/fesm2020/odx-auth.mjs +50 -49
- package/fesm2020/odx-auth.mjs.map +1 -1
- package/lib/auth.config.d.ts +1 -0
- package/lib/plugins/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2020/lib/plugins/loading-screen-plugin.mjs +0 -16
- package/lib/plugins/loading-screen-plugin.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-auth-plugins-service-connect.mjs","sources":["../../../../
|
|
1
|
+
{"version":3,"file":"odx-auth-plugins-service-connect.mjs","sources":["../../../../libs/auth/plugins/service-connect/src/lib/service-connect.config.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/build-service-connect-url.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/has-roles-or-rights-handler.ts","../../../../libs/auth/plugins/service-connect/src/lib/helpers/service-connect-plugin-factory.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.directive.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.guard.ts","../../../../libs/auth/plugins/service-connect/src/lib/service-connect-rights.plugin.ts","../../../../libs/auth/plugins/service-connect/src/odx-auth-plugins-service-connect.ts"],"sourcesContent":["import { AuthEnvironment } from '@odx/auth';\n\nexport type ServiceConnectEnvironment = { custom: string };\nexport const ServiceConnnectEnvironments: Record<AuthEnvironment, string> = {\n dev: 'https://api.test.connect.draeger.com',\n stage: 'https://api.staging.connect.draeger.com',\n prod: 'https://api.connect.draeger.com',\n};\nexport const ServiceConnectScopes = {\n BASE: 'dcid',\n PROFILE: 'dcid.profile',\n RIGHTS: 'dcid.rights',\n INSTITUTION: 'dcid.institution',\n};\nexport const ServiceConnectEndpoints = {\n userRights: '/users/me/rights',\n};\n","import { buildUrl, isString } from '@odx/angular/utils';\nimport { AuthEnvironment } from '@odx/auth';\nimport { ServiceConnectEnvironment, ServiceConnnectEnvironments } from '../service-connect.config';\n\nexport function buildServiceConnectUrl(environment: ServiceConnectEnvironment | AuthEnvironment, ...endpoints: string[]): string {\n if (isString(environment)) {\n return buildUrl(ServiceConnnectEnvironments[environment], ...endpoints);\n }\n return buildUrl(environment.custom, ...endpoints);\n}\n","export type Right = string | number;\nexport type Role = Right[];\nexport type RolesOrRights = Array<Role | Right>;\n\nexport function hasRolesOrRights(userRights: Right[], rolesOrRights: RolesOrRights): boolean {\n return rolesOrRights.some((rights) => (Array.isArray(rights) ? rights : [rights])?.every((right) => userRights.includes(right)));\n}\n","import { AuthorizedHandler } from '@odx/auth';\nimport { hasRolesOrRights, RolesOrRights } from './has-roles-or-rights';\n\nexport function hasRolesOrRightsHandler(rolesOrRights: RolesOrRights): AuthorizedHandler {\n return (claims) => hasRolesOrRights(claims?.rights ?? [], rolesOrRights);\n}\n","import { inject } from '@angular/core';\nimport { AuthHttpCache, AuthPluginFactory, injectAuthConfig } from '@odx/auth';\nimport { defer, map } from 'rxjs';\nimport { ServiceConnectEnvironment } from '../service-connect.config';\nimport { buildServiceConnectUrl } from './build-service-connect-url';\n\nexport interface ServiceConnectPluginOptions {\n environment?: ServiceConnectEnvironment;\n}\n\nexport interface ServiceConnectPluginFactoryOptions<Dto> {\n endpoint: string[];\n parseResponse: (res: Dto | null) => Partial<OdxAuth.AuthPluginResult>;\n defaultValue?: Partial<OdxAuth.AuthPluginResult>;\n setup?: (pluginOptions?: ServiceConnectPluginOptions) => void;\n}\n\nexport type ServiceConnectPluginFactory = (pluginOptions?: ServiceConnectPluginOptions) => AuthPluginFactory;\n\nexport function serviceConnectPluginFactory<Dto = unknown>(options: ServiceConnectPluginFactoryOptions<Dto>): ServiceConnectPluginFactory {\n return (pluginOptions) => () => {\n options.setup?.(pluginOptions);\n const { environment } = injectAuthConfig();\n const httpCache = inject(AuthHttpCache);\n const url = buildServiceConnectUrl(pluginOptions?.environment ?? environment, ...options.endpoint);\n const parseResponse = (dto: Dto | null) => options.parseResponse(dto) ?? options.defaultValue ?? {};\n\n return () => defer(() => httpCache.request<Dto>(url, true)).pipe(map((dto) => parseResponse(dto)));\n };\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { AuthDirective } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[odxAuthServiceConnectRights]',\n hostDirectives: [\n {\n directive: AuthDirective,\n inputs: ['odxAuthElse:odxAuthServiceConnectRightsElse'],\n },\n ],\n})\nexport class ServiceConnectRightsDirective {\n private readonly authDirective = inject(AuthDirective, { host: true });\n\n @Input('odxAuthServiceConnectRights')\n public set rolesOrRights(value: RolesOrRights | null | undefined) {\n this.authDirective.authorizationHandler = hasRolesOrRightsHandler(value ?? []);\n }\n}\n","import { CanActivateFn } from '@angular/router';\nimport { authGuard } from '@odx/auth';\nimport { hasRolesOrRightsHandler, RolesOrRights } from './helpers';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function serviceConnectRightsGuard(rolesOrRights: RolesOrRights, redirectTo?: string | any[]): CanActivateFn {\n return authGuard(hasRolesOrRightsHandler(rolesOrRights), redirectTo);\n}\n","import { GetServiceConnectRightsResponseDto } from './dtos';\nimport { serviceConnectPluginFactory } from './helpers';\nimport { ServiceConnectEndpoints } from './service-connect.config';\nimport './service-connect.typings';\n\nexport const serviceConnectRightsPlugin = serviceConnectPluginFactory<GetServiceConnectRightsResponseDto>({\n endpoint: [ServiceConnectEndpoints.userRights],\n parseResponse: (res) => ({ rights: res?.rights ?? [] }),\n defaultValue: { rights: [] },\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGa,MAAA,2BAA2B,GAAoC;AAC1E,IAAA,GAAG,EAAE,sCAAsC;AAC3C,IAAA,KAAK,EAAE,yCAAyC;AAChD,IAAA,IAAI,EAAE,iCAAiC;EACvC;AACW,MAAA,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,WAAW,EAAE,kBAAkB;EAC/B;AACW,MAAA,uBAAuB,GAAG;AACrC,IAAA,UAAU,EAAE,kBAAkB;;;SCXhB,sBAAsB,CAAC,WAAwD,EAAE,GAAG,SAAmB,EAAA;AACrH,IAAA,IAAI,QAAQ,CAAC,WAAW,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,2BAA2B,CAAC,WAAW,CAAC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
enableLoadingScreen: true,
|
|
147
147
|
loadingScreenMessage: null,
|
|
148
148
|
refreshTokenOnInit: true,
|
|
149
|
+
requireSignIn: false,
|
|
149
150
|
});
|
|
150
151
|
|
|
151
152
|
var translations = {
|
|
@@ -205,9 +206,9 @@ class AuthHttpCache {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
AuthHttpCache.CACHE_KEY = '@odx/auth/http-cache';
|
|
208
|
-
AuthHttpCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
209
|
-
AuthHttpCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
209
|
+
AuthHttpCache.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
210
|
+
AuthHttpCache.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, providedIn: 'root' });
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthHttpCache, decorators: [{
|
|
211
212
|
type: Injectable,
|
|
212
213
|
args: [{ providedIn: 'root' }]
|
|
213
214
|
}], ctorParameters: function () { return []; } });
|
|
@@ -224,7 +225,12 @@ class AuthPluginManager {
|
|
|
224
225
|
if (this.plugins.length < 1) {
|
|
225
226
|
return of({});
|
|
226
227
|
}
|
|
227
|
-
return authService.isInitialized$.pipe(switchMap(() =>
|
|
228
|
+
return authService.isInitialized$.pipe(switchMap(() => {
|
|
229
|
+
if (!authService.getAccessToken()) {
|
|
230
|
+
return of({});
|
|
231
|
+
}
|
|
232
|
+
return combineLatest(this.plugins.map((plugin) => plugin(authService).pipe(catchError(this.handlePluginError.bind(this))))).pipe(map((results) => deepmerge(...results)));
|
|
233
|
+
}), tap((result) => this.result$$.next(result)), take(1));
|
|
228
234
|
}
|
|
229
235
|
getResult() {
|
|
230
236
|
var _a;
|
|
@@ -236,9 +242,9 @@ class AuthPluginManager {
|
|
|
236
242
|
return of({});
|
|
237
243
|
}
|
|
238
244
|
}
|
|
239
|
-
AuthPluginManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
240
|
-
AuthPluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
245
|
+
AuthPluginManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
|
+
AuthPluginManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, providedIn: 'root' });
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthPluginManager, decorators: [{
|
|
242
248
|
type: Injectable,
|
|
243
249
|
args: [{ providedIn: 'root' }]
|
|
244
250
|
}] });
|
|
@@ -291,6 +297,9 @@ class AuthService {
|
|
|
291
297
|
}
|
|
292
298
|
}
|
|
293
299
|
this.isInitialized$$.next(true);
|
|
300
|
+
if (this.authConfig.requireSignIn && !this.isAuthenticated()) {
|
|
301
|
+
this.signIn(this.windowRef.location.pathname);
|
|
302
|
+
}
|
|
294
303
|
yield this.tryLoadUserProfile();
|
|
295
304
|
yield this.routeToRequestedUrl();
|
|
296
305
|
});
|
|
@@ -397,9 +406,9 @@ class AuthService {
|
|
|
397
406
|
}
|
|
398
407
|
}
|
|
399
408
|
}
|
|
400
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
401
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
|
402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
409
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
410
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthService, decorators: [{
|
|
403
412
|
type: Injectable,
|
|
404
413
|
args: [{ providedIn: 'root' }]
|
|
405
414
|
}], ctorParameters: function () { return []; } });
|
|
@@ -410,12 +419,12 @@ let AuthActionsComponent = class AuthActionsComponent {
|
|
|
410
419
|
this.claims = null;
|
|
411
420
|
}
|
|
412
421
|
};
|
|
413
|
-
AuthActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
414
|
-
AuthActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
422
|
+
AuthActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
423
|
+
AuthActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthActionsComponent, isStandalone: true, selector: "odx-auth-actions", inputs: { claims: "claims" }, ngImport: i0, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ListModule }, { kind: "component", type: i2.ListComponent, selector: "odx-list", inputs: ["multiple"] }, { kind: "component", type: i2.ListItemComponent, selector: "[odxListItem]", inputs: ["danger", "selected"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
415
424
|
AuthActionsComponent = __decorate([
|
|
416
425
|
CSSComponent('auth-actions')
|
|
417
426
|
], AuthActionsComponent);
|
|
418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionsComponent, decorators: [{
|
|
419
428
|
type: Component,
|
|
420
429
|
args: [{ standalone: true, selector: 'odx-auth-actions', imports: [CoreModule, ListModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<odx-list>\n <a data-testid=\"odx-auth-user-profile-link\" odxListItem [href]=\"url\" rel=\"noopener\" target=\"_blank\" *ngIf=\"claims?.userProfileUrl as url\">\n <odx-icon name=\"user-administration\" iconSet=\"core\" odxListPrefix></odx-icon>\n {{ 'userProfileLink' | odxTranslate | async }}\n </a>\n</odx-list>\n" }]
|
|
421
430
|
}], propDecorators: { claims: [{
|
|
@@ -441,9 +450,9 @@ class AuthLoadingScreenComponent {
|
|
|
441
450
|
}
|
|
442
451
|
}
|
|
443
452
|
AuthLoadingScreenComponent.instance = null;
|
|
444
|
-
AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
445
|
-
AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
453
|
+
AuthLoadingScreenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthLoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
454
|
+
AuthLoadingScreenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthLoadingScreenComponent, isStandalone: true, selector: "div.odx-auth-loading-screen", host: { properties: { "@hostAnimation": "true" } }, ngImport: i0, template: "<div class=\"odx-auth-loading-screen__content\" odxLayout=\"grid 12 horizontal-center vertical-center gap-small\">\n <odx-logo size=\"large\"></odx-logo>\n <odx-circular-progress class=\"odx-auth-loading-screen__spinner\" value=\"-1\" size=\"medium\" stroke=\"3\">\n <odx-icon [name]=\"icon$ | async\" iconSet=\"core\"></odx-icon>\n </odx-circular-progress>\n <p class=\"odx-auth-loading-screen__message\" *ngIf=\"authConfig.loadingScreenMessage as content\">\n <ng-template [odxDynamicView]=\"content\"></ng-template>\n </p>\n</div>\n", styles: ["@keyframes odx-auth-loading-screen-animation{0%{opacity:0;transform:translate(-50%,-50%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%)}}.odx-auth-loading-screen{--odx-c-highlight: var(--odx-c-primary);background-color:var(--odx-c-background-content);position:fixed;z-index:var(--odx-v-layer-5);inset:0}.odx-auth-loading-screen__content{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;animation:odx-auth-loading-screen-animation .75s ease}.odx-auth-loading-screen__message{text-align:center}.odx-auth-loading-screen__spinner{position:relative}.odx-auth-loading-screen__spinner .odx-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "component", type: CircularProgressComponent, selector: "odx-circular-progress", inputs: ["stroke", "size", "value"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [trigger('hostAnimation', [transition(':leave', useAnimation(fadeOut()))])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthLoadingScreenComponent, decorators: [{
|
|
447
456
|
type: Component,
|
|
448
457
|
args: [{ standalone: true, selector: 'div.odx-auth-loading-screen', imports: [CommonModule, ButtonComponent, IconComponent, LogoDirective, CircularProgressComponent, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
449
458
|
'[@hostAnimation]': 'true',
|
|
@@ -463,9 +472,9 @@ class AuthActionDirective {
|
|
|
463
472
|
});
|
|
464
473
|
}
|
|
465
474
|
}
|
|
466
|
-
AuthActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
467
|
-
AuthActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
468
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
475
|
+
AuthActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
476
|
+
AuthActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AuthActionDirective, ngImport: i0 });
|
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthActionDirective, decorators: [{
|
|
469
478
|
type: Directive
|
|
470
479
|
}] });
|
|
471
480
|
|
|
@@ -480,9 +489,9 @@ class SignInDirective extends AuthActionDirective {
|
|
|
480
489
|
this.afterSignIn.next();
|
|
481
490
|
}
|
|
482
491
|
}
|
|
483
|
-
SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
484
|
-
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
492
|
+
SignInDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignInDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
493
|
+
SignInDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SignInDirective, isStandalone: true, selector: "[odxButton][odxAuthSignIn]", outputs: { afterSignIn: "odxAuthSignIn" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignInDirective, decorators: [{
|
|
486
495
|
type: Directive,
|
|
487
496
|
args: [{
|
|
488
497
|
standalone: true,
|
|
@@ -508,9 +517,9 @@ class SignOutDirective extends AuthActionDirective {
|
|
|
508
517
|
this.afterSignOut.next();
|
|
509
518
|
}
|
|
510
519
|
}
|
|
511
|
-
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
512
|
-
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
520
|
+
SignOutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignOutDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
521
|
+
SignOutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SignOutDirective, isStandalone: true, selector: "[odxButton][odxAuthSignOut]", outputs: { afterSignOut: "odxAuthSignOut" }, host: { listeners: { "click": "handleClick()" } }, usesInheritance: true, hostDirectives: [{ directive: i1$1.LoadingSpinnerDirective }], ngImport: i0 });
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SignOutDirective, decorators: [{
|
|
514
523
|
type: Directive,
|
|
515
524
|
args: [{
|
|
516
525
|
standalone: true,
|
|
@@ -536,9 +545,9 @@ class AuthComponent {
|
|
|
536
545
|
};
|
|
537
546
|
}
|
|
538
547
|
}
|
|
539
|
-
AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
540
|
-
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
|
541
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
548
|
+
AuthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
549
|
+
AuthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AuthComponent, isStandalone: true, selector: "odx-auth", providers: [provideTranslations(translations)], ngImport: i0, template: "<odx-action-group>\n <ng-template [ngrxLet]=\"{ idClaims: authService.identityClaims$, isAuthenticated: authService.isAuthenticated$ }\" let-vm>\n <ng-template [ngIf]=\"vm.isAuthenticated\" [ngIfElse]=\"notAuthenticated\">\n <button odxButton [odxDropdown]=\"userProfileMenu\" [odxDropdownOptions]=\"dropdownOptions\" data-testid=\"odx-auth-user-profile-button\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\"></ng-template>\n </button>\n <ng-template #userProfileMenu>\n <odx-area-header class=\"odx-padding-x-12\" size=\"small\">\n <ng-template [ngTemplateOutlet]=\"userAvatar\" ngProjectAs=\"odx-avatar\"></ng-template>\n {{ vm.idClaims?.username }}\n <odx-area-header-subtitle>\n {{ vm.idClaims?.email }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <ng-content></ng-content>\n <odx-auth-actions [claims]=\"vm.idClaims\"></odx-auth-actions>\n <div class=\"odx-margin-top-12\" odxLayout=\"flex vertical-center\">\n <odx-logo odxLayout=\"auto\" class=\"odx-margin-left-12 odx-margin-right-auto\"></odx-logo>\n <button odxButton odxAuthSignOut variant=\"ghost\" data-testid=\"odx-auth-sign-out-button\">\n {{ 'signOutButtonText' | odxTranslate | async }}\n <odx-icon name=\"logout\" alignRight></odx-icon>\n </button>\n </div>\n </ng-template>\n </ng-template>\n <ng-template #notAuthenticated>\n <button class=\"odx-auth-sign-in\" odxButton odxAuthSignIn variant=\"secondary\" data-testid=\"odx-auth-sign-in-button\">\n <odx-icon name=\"user\" alignLeft></odx-icon>\n {{ 'signInButtonText' | odxTranslate | async }}\n </button>\n </ng-template>\n <ng-template #userAvatar>\n <odx-avatar class=\"odx-auth-user-avatar\">\n {{ vm.idClaims?.initials ?? '' }}\n </odx-avatar>\n </ng-template>\n </ng-template>\n</odx-action-group>\n", styles: [".odx-auth-user-profile .odx-dropdown__inner>.odx-area-header{max-width:max(360px,25vw);min-width:296px}.odx-auth-actions{display:block;margin-top:calc(var(--odx-vertical-rythm-base-size) * .5);margin-bottom:calc(var(--odx-vertical-rythm-base-size) * .5);margin-right:calc(var(--odx-vertical-rythm-base-size) * .25);margin-left:calc(var(--odx-vertical-rythm-base-size) * .25)}\n"], dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2$1.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i3$1.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i3$1.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i4.AvatarComponent, selector: "odx-avatar", inputs: ["size", "variant"] }, { kind: "component", type: i5.ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i3.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i8.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: HeaderModule }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }, { kind: "directive", type: SignInDirective, selector: "[odxButton][odxAuthSignIn]", outputs: ["odxAuthSignIn"] }, { kind: "directive", type: SignOutDirective, selector: "[odxButton][odxAuthSignOut]", outputs: ["odxAuthSignOut"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "component", type: AuthActionsComponent, selector: "odx-auth-actions", inputs: ["claims"] }, { kind: "pipe", type: TranslatePipe, name: "odxTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthComponent, decorators: [{
|
|
542
551
|
type: Component,
|
|
543
552
|
args: [{ standalone: true, selector: 'odx-auth', imports: [
|
|
544
553
|
CoreModule,
|
|
@@ -572,9 +581,9 @@ class AuthDirective {
|
|
|
572
581
|
});
|
|
573
582
|
}
|
|
574
583
|
}
|
|
575
|
-
AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
576
|
-
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.
|
|
577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
584
|
+
AuthDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
585
|
+
AuthDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AuthDirective, isStandalone: true, selector: "ng-template[odxAuth]", inputs: { authorizationHandler: ["odxAuth", "authorizationHandler"], elseTemplate: ["odxAuthElse", "elseTemplate"] }, hostDirectives: [{ directive: i1.NgIf }], ngImport: i0 });
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthDirective, decorators: [{
|
|
578
587
|
type: Directive,
|
|
579
588
|
args: [{
|
|
580
589
|
standalone: true,
|
|
@@ -616,10 +625,10 @@ function authGuard(authorizedHandler, redirectTo) {
|
|
|
616
625
|
const modules = [AuthComponent, AuthDirective, SignInDirective, SignOutDirective];
|
|
617
626
|
class AuthModule {
|
|
618
627
|
}
|
|
619
|
-
AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
|
620
|
-
AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
|
621
|
-
AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
|
622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
|
628
|
+
AuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
629
|
+
AuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, imports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective], exports: [AuthComponent, AuthDirective, SignInDirective, SignOutDirective] });
|
|
630
|
+
AuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, imports: [AuthComponent] });
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthModule, decorators: [{
|
|
623
632
|
type: NgModule,
|
|
624
633
|
args: [{
|
|
625
634
|
imports: [...modules],
|
|
@@ -638,17 +647,6 @@ const coreIdentityPlugin = () => {
|
|
|
638
647
|
};
|
|
639
648
|
};
|
|
640
649
|
|
|
641
|
-
const loadingScreenPlugin = () => {
|
|
642
|
-
const { enableLoadingScreen } = injectAuthConfig();
|
|
643
|
-
const dynamicViewService = inject(DynamicViewService);
|
|
644
|
-
return (authService) => {
|
|
645
|
-
if (enableLoadingScreen) {
|
|
646
|
-
AuthLoadingScreenComponent.initialize(authService, dynamicViewService);
|
|
647
|
-
}
|
|
648
|
-
return of({});
|
|
649
|
-
};
|
|
650
|
-
};
|
|
651
|
-
|
|
652
650
|
const userProfileUrlPlugin = () => {
|
|
653
651
|
const { environment, userProfileUrl } = injectAuthConfig();
|
|
654
652
|
return () => {
|
|
@@ -672,10 +670,13 @@ function initializeAuthErrorHandlers() {
|
|
|
672
670
|
authService.errors$.pipe(tap((error) => handler(error))).subscribe();
|
|
673
671
|
}
|
|
674
672
|
function initalizeAuthConfig() {
|
|
675
|
-
const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl } = injectAuthConfig();
|
|
673
|
+
const { clientId, scopes, redirectPath, environment, postLogoutRedirectUrl, issuer, timeoutFactor, discoveryUrl, enableLoadingScreen } = injectAuthConfig();
|
|
676
674
|
const authService = inject(AuthService);
|
|
677
675
|
const origin = inject(WindowRef).getOrigin();
|
|
678
676
|
const scope = Array.from(new Set(DEFAULT_AUTH_SCOPES.concat(scopes !== null && scopes !== void 0 ? scopes : []))).join(' ');
|
|
677
|
+
if (enableLoadingScreen) {
|
|
678
|
+
AuthLoadingScreenComponent.initialize(authService, inject(DynamicViewService));
|
|
679
|
+
}
|
|
679
680
|
return () => authService.initialize({
|
|
680
681
|
clientId,
|
|
681
682
|
issuer: issuer !== null && issuer !== void 0 ? issuer : DEFAULT_ISSUERS[environment],
|
|
@@ -717,7 +718,7 @@ function provideAuth(config) {
|
|
|
717
718
|
},
|
|
718
719
|
{
|
|
719
720
|
provide: ODX_AUTH_CORE_PLUGINS,
|
|
720
|
-
useValue: [coreIdentityPlugin,
|
|
721
|
+
useValue: [coreIdentityPlugin, userProfileUrlPlugin],
|
|
721
722
|
},
|
|
722
723
|
]);
|
|
723
724
|
}
|
|
@@ -744,5 +745,5 @@ function unauthGuard(authorizedHandler, redirectTo) {
|
|
|
744
745
|
* Generated bundle index. Do not edit.
|
|
745
746
|
*/
|
|
746
747
|
|
|
747
|
-
export { AuthActionDirective, AuthActionsComponent, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, DEFAULT_USER_PROFILE_URLS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_ERROR_HANDLERS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, handleAuthError, handleOAuthEvent, initalizeAuthConfig, initializeAuthErrorHandlers, injectAuthConfig,
|
|
748
|
+
export { AuthActionDirective, AuthActionsComponent, AuthComponent, AuthConfig, AuthDefaultConfig, AuthDirective, AuthHttpCache, AuthLoadingScreenComponent, AuthModule, AuthPluginManager, AuthService, DEFAULT_AUTH_SCOPES, DEFAULT_ISSUERS, DEFAULT_USER_PROFILE_URLS, ODX_AUTH_CORE_PLUGINS, ODX_AUTH_ERROR_HANDLERS, ODX_AUTH_HTTP_CACHE_STORAGE, ODX_AUTH_PLUGINS, SignInDirective, SignOutDirective, authGuard, configureInterceptor, coreIdentityPlugin, createInitials, handleAuthError, handleOAuthEvent, initalizeAuthConfig, initializeAuthErrorHandlers, injectAuthConfig, offlineAuthErrorHandler, provideAuth, provideAuthConfig, resolveEmail, resolveUsername, unauthGuard, userProfileUrlPlugin };
|
|
748
749
|
//# sourceMappingURL=odx-auth.mjs.map
|