@valtimo/security 10.6.0 → 10.7.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/esm2020/lib/error/error-routing.module.mjs +5 -5
- package/esm2020/lib/error/error.component.mjs +4 -4
- package/esm2020/lib/error/http-error.interceptor.mjs +31 -33
- package/esm2020/lib/guard/auth-guard.service.mjs +4 -4
- package/esm2020/lib/security.module.mjs +5 -5
- package/esm2020/lib/user-provider.service.mjs +5 -7
- package/fesm2015/valtimo-security.mjs +49 -53
- package/fesm2015/valtimo-security.mjs.map +1 -1
- package/fesm2020/valtimo-security.mjs +48 -52
- package/fesm2020/valtimo-security.mjs.map +1 -1
- package/lib/user-provider.service.d.ts +1 -2
- package/lib/user-provider.service.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -29,10 +29,10 @@ const routes = [
|
|
|
29
29
|
];
|
|
30
30
|
export class ErrorRoutingModule {
|
|
31
31
|
}
|
|
32
|
-
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
33
|
-
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
34
|
-
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
32
|
+
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
33
|
+
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, imports: [CommonModule, i1.RouterModule], exports: [RouterModule] });
|
|
34
|
+
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }], imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, decorators: [{
|
|
36
36
|
type: NgModule,
|
|
37
37
|
args: [{
|
|
38
38
|
declarations: [],
|
|
@@ -41,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
41
41
|
providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
|
|
42
42
|
}]
|
|
43
43
|
}] });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3Itcm91dGluZy5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL3NlY3VyaXR5L3NyYy9saWIvZXJyb3IvZXJyb3Itcm91dGluZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxZQUFZLEVBQVMsTUFBTSxpQkFBaUIsQ0FBQztBQUNyRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBQ2pELE9BQU8sRUFBQyxvQkFBb0IsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBQzlELE9BQU8sRUFBQyxpQ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G4gIGRlY2xhcmF0aW9uczogW10sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIFJvdXRlck1vZHVsZS5mb3JDaGlsZChyb3V0ZXMpXSxcbiAgZXhwb3J0czogW1JvdXRlck1vZHVsZV0sXG4gIHByb3ZpZGVyczogW3twcm92aWRlOiBIVFRQX0lOVEVSQ0VQVE9SUywgdXNlQ2xhc3M6IEh0dHBFcnJvckludGVyY2VwdG9yLCBtdWx0aTogdHJ1ZX1dLFxufSlcbmV4cG9ydCBjbGFzcyBFcnJvclJvdXRpbmdNb2R1bGUge31cbiJdfQ==
|
|
@@ -29,10 +29,10 @@ export class ErrorComponent {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
33
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
32
|
+
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "valtimo-error", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n", styles: [""] });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
35
35
|
type: Component,
|
|
36
36
|
args: [{ selector: 'valtimo-error', template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
37
37
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; } });
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9zZWN1cml0eS9zcmMvbGliL2Vycm9yL2Vycm9yLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vc2VjdXJpdHkvc3JjL2xpYi9lcnJvci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kZXIgdGhlIExpY2Vuc2UuXG4gIC0tPlxuXG48ZGl2IGNsYXNzPVwibWFpbi1jb250ZW50XCI+XG4gIDxkaXYgY2xhc3M9XCJjb250YWluZXItZmx1aWRcIj5cbiAgICA8ZGl2IGNsYXNzPVwicm93XCI+XG4gICAgICA8ZGl2IGNsYXNzPVwiY29sLTEyXCI+XG4gICAgICAgIDxoMT57eyBlcnIuZXJyb3IgfX08L2gxPlxuICAgICAgICA8cD57eyBlcnIudGl0bGUgfX08L3A+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -15,46 +15,44 @@ export class HttpErrorInterceptor {
|
|
|
15
15
|
const headers = request.headers.delete(InterceptorSkip);
|
|
16
16
|
return next.handle(request.clone({ headers }));
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
return next.handle(request).pipe(catchError((error) => {
|
|
19
|
+
let errorMessage = '';
|
|
20
|
+
if (error?.error instanceof ErrorEvent) {
|
|
21
|
+
// client-side error
|
|
22
|
+
errorMessage = `Error: ${error.error.message}`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
// server-side error
|
|
26
|
+
if (error?.error?.errors) {
|
|
27
|
+
errorMessage = error?.error?.errors;
|
|
28
|
+
}
|
|
29
|
+
else if (error?.error?.title && error?.error?.referenceId) {
|
|
30
|
+
errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;
|
|
31
|
+
}
|
|
32
|
+
else if (error?.error?.title && error?.error?.detail) {
|
|
33
|
+
errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;
|
|
34
|
+
}
|
|
35
|
+
else if (error?.error?.message) {
|
|
36
|
+
errorMessage = error?.error?.message;
|
|
24
37
|
}
|
|
25
38
|
else {
|
|
26
|
-
|
|
27
|
-
if (error?.error?.errors) {
|
|
28
|
-
errorMessage = error?.error?.errors;
|
|
29
|
-
}
|
|
30
|
-
else if (error?.error?.title && error?.error?.referenceId) {
|
|
31
|
-
errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;
|
|
32
|
-
}
|
|
33
|
-
else if (error?.error?.title && error?.error?.detail) {
|
|
34
|
-
errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;
|
|
35
|
-
}
|
|
36
|
-
else if (error?.error?.message) {
|
|
37
|
-
errorMessage = error?.error?.message;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;
|
|
41
|
-
}
|
|
39
|
+
errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
41
|
+
}
|
|
42
|
+
this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {
|
|
43
|
+
enableHtml: true,
|
|
44
|
+
tapToDismiss: false,
|
|
45
|
+
});
|
|
46
|
+
return throwError(errorMessage);
|
|
47
|
+
}));
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
|
-
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
53
|
-
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
50
|
+
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, deps: [{ token: i1.ToastrService }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
+
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, providedIn: 'root' });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, decorators: [{
|
|
55
53
|
type: Injectable,
|
|
56
54
|
args: [{
|
|
57
55
|
providedIn: 'root',
|
|
58
56
|
}]
|
|
59
57
|
}], ctorParameters: function () { return [{ type: i1.ToastrService }, { type: i2.NGXLogger }]; } });
|
|
60
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC1lcnJvci5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vc2VjdXJpdHkvc3JjL2xpYi9lcnJvci9odHRwLWVycm9yLmludGVyY2VwdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCQSxPQUFPLEVBQWEsVUFBVSxFQUFDLE1BQU0sTUFBTSxDQUFDO0FBQzVDLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUMxQyxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRXpDLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxTQUFTLENBQUM7Ozs7QUFNeEMsTUFBTSxPQUFPLG9CQUFvQjtJQUMvQixZQUFvQixNQUFxQixFQUFVLE1BQWlCO1FBQWhELFdBQU0sR0FBTixNQUFNLENBQWU7UUFBVSxXQUFNLEdBQU4sTUFBTSxDQUFXO0lBQUcsQ0FBQztJQUV4RSxTQUFTLENBQUMsT0FBeUIsRUFBRSxJQUFpQjtRQUNwRCxJQUFJLE9BQU8sQ0FBQyxPQUFPLElBQUksT0FBTyxDQUFDLE9BQU8sQ0FBQ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Z2UpO1xuICAgICAgfSlcbiAgICApO1xuICB9XG59XG4iXX0=
|
|
@@ -29,12 +29,12 @@ export class AuthGuardService {
|
|
|
29
29
|
return this.authGuardServiceProvider.canActivate(route, state);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
33
|
-
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
32
|
+
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
+
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, providedIn: 'root' });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, decorators: [{
|
|
35
35
|
type: Injectable,
|
|
36
36
|
args: [{
|
|
37
37
|
providedIn: 'root',
|
|
38
38
|
}]
|
|
39
39
|
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i0.Injector }, { type: i2.NGXLogger }]; } });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1ndWFyZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9zZWN1cml0eS9zcmMvbGliL2d1YXJkL2F1dGgtZ3VhcmQuc2VydmljZS50cyJdLCJuYW1lcyI6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ZShyb3V0ZSwgc3RhdGUpO1xuICB9XG59XG4iXX0=
|
|
@@ -20,10 +20,10 @@ import { AuthGuardService } from './guard/auth-guard.service';
|
|
|
20
20
|
import * as i0 from "@angular/core";
|
|
21
21
|
export class SecurityModule {
|
|
22
22
|
}
|
|
23
|
-
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
24
|
-
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
25
|
-
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
23
|
+
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24
|
+
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, declarations: [ErrorComponent], imports: [ErrorRoutingModule], exports: [ErrorComponent] });
|
|
25
|
+
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, providers: [AuthGuardService], imports: [ErrorRoutingModule] });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, decorators: [{
|
|
27
27
|
type: NgModule,
|
|
28
28
|
args: [{
|
|
29
29
|
declarations: [ErrorComponent],
|
|
@@ -32,4 +32,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
32
32
|
providers: [AuthGuardService],
|
|
33
33
|
}]
|
|
34
34
|
}] });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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nRzOiBbRXJyb3JSb3V0aW5nTW9kdWxlXSxcbiAgZXhwb3J0czogW0Vycm9yQ29tcG9uZW50XSxcbiAgcHJvdmlkZXJzOiBbQXV0aEd1YXJkU2VydmljZV0sXG59KVxuZXhwb3J0IGNsYXNzIFNlY3VyaXR5TW9kdWxlIHt9XG4iXX0=
|
|
@@ -45,9 +45,7 @@ export class UserProviderService {
|
|
|
45
45
|
if (this.userService.updateToken) {
|
|
46
46
|
return this.userService.updateToken(minValidity);
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
return new Promise(resolve => resolve(true));
|
|
50
|
-
}
|
|
48
|
+
return new Promise(resolve => resolve(true));
|
|
51
49
|
}
|
|
52
50
|
getEmailNotificationSettings() {
|
|
53
51
|
this.logger.debug('getEmailNotificationSettings');
|
|
@@ -58,12 +56,12 @@ export class UserProviderService {
|
|
|
58
56
|
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`, settings);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
|
-
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
62
|
-
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
59
|
+
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2.HttpClient }, { token: i3.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
60
|
+
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, providedIn: 'root' });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, decorators: [{
|
|
64
62
|
type: Injectable,
|
|
65
63
|
args: [{
|
|
66
64
|
providedIn: 'root',
|
|
67
65
|
}]
|
|
68
66
|
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i0.Injector }, { type: i2.HttpClient }, { type: i3.NGXLogger }]; } });
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1wcm92aWRlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9zZWN1cml0eS9zcmMvbGliL3VzZXItcHJvdmlkZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxVQUFVLEVBQVcsTUFBTSxlQUFlLENBQUM7Ozs7O0FBZW5ELE1BQU0sT0FBTyxtQkFBbUI7SUFNOUIsWUFDVSxhQUE0QixFQUM1QixRQUFrQixFQUNsQixJQUFnQixFQUNoQixNQUFpQjtRQUhqQixrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUM1QixhQUFRLEdBQVIsUUFBUSxDQUFVO1FBQ2xCLFNBQUksR0FBSixJQUFJLENBQVk7UUFDaEIsV0FBTSxHQUFOLE1BQU0sQ0FBVztRQUV6QixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsYUFBYSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUM7UUFDeEQsSUFBSSxDQUFDLFdBQVcsR0FBRyxRQUFRLENBQUMsR0FBRyxDQUM3QixhQUFhLENBQUMsTUFBTSxDQUFDLGNBQWMsQ0FBQyxhQUFhLENBQUMsbUJBQW1CLENBQ3RFLENBQUM7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxxQ0FBcUMsRUFBRSxJQUFJLENBQUMsV0FB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XR0aW5ncycsIHNldHRpbmdzKTtcbiAgICByZXR1cm4gdGhpcy5odHRwLnB1dDxFbWFpbE5vdGlmaWNhdGlvblNldHRpbmdzPihcbiAgICAgIGAke3RoaXMudmFsdGltb0FwaUNvbmZpZy5lbmRwb2ludFVyaX12MS9lbWFpbC1ub3RpZmljYXRpb24tc2V0dGluZ3NgLFxuICAgICAgc2V0dGluZ3NcbiAgICApO1xuICB9XG59XG4iXX0=
|
|
@@ -39,9 +39,9 @@ class AuthGuardService {
|
|
|
39
39
|
return this.authGuardServiceProvider.canActivate(route, state);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
43
|
-
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
42
|
+
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, providedIn: 'root' });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, decorators: [{
|
|
45
45
|
type: Injectable,
|
|
46
46
|
args: [{
|
|
47
47
|
providedIn: 'root',
|
|
@@ -76,9 +76,9 @@ class ErrorComponent {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
80
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
79
|
+
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "valtimo-error", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n", styles: [""] });
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
82
82
|
type: Component,
|
|
83
83
|
args: [{ selector: 'valtimo-error', template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
84
84
|
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }]; } });
|
|
@@ -111,44 +111,42 @@ class HttpErrorInterceptor {
|
|
|
111
111
|
const headers = request.headers.delete(InterceptorSkip);
|
|
112
112
|
return next.handle(request.clone({ headers }));
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
return next.handle(request).pipe(catchError((error) => {
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
116
|
+
let errorMessage = '';
|
|
117
|
+
if ((error === null || error === void 0 ? void 0 : error.error) instanceof ErrorEvent) {
|
|
118
|
+
// client-side error
|
|
119
|
+
errorMessage = `Error: ${error.error.message}`;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// server-side error
|
|
123
|
+
if ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.errors) {
|
|
124
|
+
errorMessage = (_b = error === null || error === void 0 ? void 0 : error.error) === null || _b === void 0 ? void 0 : _b.errors;
|
|
125
|
+
}
|
|
126
|
+
else if (((_c = error === null || error === void 0 ? void 0 : error.error) === null || _c === void 0 ? void 0 : _c.title) && ((_d = error === null || error === void 0 ? void 0 : error.error) === null || _d === void 0 ? void 0 : _d.referenceId)) {
|
|
127
|
+
errorMessage = `${(_e = error === null || error === void 0 ? void 0 : error.error) === null || _e === void 0 ? void 0 : _e.title}. Reference ID: ${(_f = error === null || error === void 0 ? void 0 : error.error) === null || _f === void 0 ? void 0 : _f.referenceId}`;
|
|
128
|
+
}
|
|
129
|
+
else if (((_g = error === null || error === void 0 ? void 0 : error.error) === null || _g === void 0 ? void 0 : _g.title) && ((_h = error === null || error === void 0 ? void 0 : error.error) === null || _h === void 0 ? void 0 : _h.detail)) {
|
|
130
|
+
errorMessage = `${(_j = error === null || error === void 0 ? void 0 : error.error) === null || _j === void 0 ? void 0 : _j.title}. Details: </br>${(_k = error === null || error === void 0 ? void 0 : error.error) === null || _k === void 0 ? void 0 : _k.detail}`;
|
|
131
|
+
}
|
|
132
|
+
else if ((_l = error === null || error === void 0 ? void 0 : error.error) === null || _l === void 0 ? void 0 : _l.message) {
|
|
133
|
+
errorMessage = (_m = error === null || error === void 0 ? void 0 : error.error) === null || _m === void 0 ? void 0 : _m.message;
|
|
121
134
|
}
|
|
122
135
|
else {
|
|
123
|
-
|
|
124
|
-
if ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.errors) {
|
|
125
|
-
errorMessage = (_b = error === null || error === void 0 ? void 0 : error.error) === null || _b === void 0 ? void 0 : _b.errors;
|
|
126
|
-
}
|
|
127
|
-
else if (((_c = error === null || error === void 0 ? void 0 : error.error) === null || _c === void 0 ? void 0 : _c.title) && ((_d = error === null || error === void 0 ? void 0 : error.error) === null || _d === void 0 ? void 0 : _d.referenceId)) {
|
|
128
|
-
errorMessage = `${(_e = error === null || error === void 0 ? void 0 : error.error) === null || _e === void 0 ? void 0 : _e.title}. Reference ID: ${(_f = error === null || error === void 0 ? void 0 : error.error) === null || _f === void 0 ? void 0 : _f.referenceId}`;
|
|
129
|
-
}
|
|
130
|
-
else if (((_g = error === null || error === void 0 ? void 0 : error.error) === null || _g === void 0 ? void 0 : _g.title) && ((_h = error === null || error === void 0 ? void 0 : error.error) === null || _h === void 0 ? void 0 : _h.detail)) {
|
|
131
|
-
errorMessage = `${(_j = error === null || error === void 0 ? void 0 : error.error) === null || _j === void 0 ? void 0 : _j.title}. Details: </br>${(_k = error === null || error === void 0 ? void 0 : error.error) === null || _k === void 0 ? void 0 : _k.detail}`;
|
|
132
|
-
}
|
|
133
|
-
else if ((_l = error === null || error === void 0 ? void 0 : error.error) === null || _l === void 0 ? void 0 : _l.message) {
|
|
134
|
-
errorMessage = (_m = error === null || error === void 0 ? void 0 : error.error) === null || _m === void 0 ? void 0 : _m.message;
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
errorMessage = `Error Code: ${error === null || error === void 0 ? void 0 : error.status} </br>Message: ${error === null || error === void 0 ? void 0 : error.message}`;
|
|
138
|
-
}
|
|
136
|
+
errorMessage = `Error Code: ${error === null || error === void 0 ? void 0 : error.status} </br>Message: ${error === null || error === void 0 ? void 0 : error.message}`;
|
|
139
137
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
138
|
+
}
|
|
139
|
+
this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {
|
|
140
|
+
enableHtml: true,
|
|
141
|
+
tapToDismiss: false,
|
|
142
|
+
});
|
|
143
|
+
return throwError(errorMessage);
|
|
144
|
+
}));
|
|
147
145
|
}
|
|
148
146
|
}
|
|
149
|
-
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
150
|
-
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
147
|
+
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, deps: [{ token: i1$2.ToastrService }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
148
|
+
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, providedIn: 'root' });
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, decorators: [{
|
|
152
150
|
type: Injectable,
|
|
153
151
|
args: [{
|
|
154
152
|
providedIn: 'root',
|
|
@@ -178,10 +176,10 @@ const routes = [
|
|
|
178
176
|
];
|
|
179
177
|
class ErrorRoutingModule {
|
|
180
178
|
}
|
|
181
|
-
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
182
|
-
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
183
|
-
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
184
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
179
|
+
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
180
|
+
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] });
|
|
181
|
+
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }], imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, decorators: [{
|
|
185
183
|
type: NgModule,
|
|
186
184
|
args: [{
|
|
187
185
|
declarations: [],
|
|
@@ -208,10 +206,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
208
206
|
*/
|
|
209
207
|
class SecurityModule {
|
|
210
208
|
}
|
|
211
|
-
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
212
|
-
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
213
|
-
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
209
|
+
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
210
|
+
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, declarations: [ErrorComponent], imports: [ErrorRoutingModule], exports: [ErrorComponent] });
|
|
211
|
+
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, providers: [AuthGuardService], imports: [ErrorRoutingModule] });
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, decorators: [{
|
|
215
213
|
type: NgModule,
|
|
216
214
|
args: [{
|
|
217
215
|
declarations: [ErrorComponent],
|
|
@@ -251,9 +249,7 @@ class UserProviderService {
|
|
|
251
249
|
if (this.userService.updateToken) {
|
|
252
250
|
return this.userService.updateToken(minValidity);
|
|
253
251
|
}
|
|
254
|
-
|
|
255
|
-
return new Promise(resolve => resolve(true));
|
|
256
|
-
}
|
|
252
|
+
return new Promise(resolve => resolve(true));
|
|
257
253
|
});
|
|
258
254
|
}
|
|
259
255
|
getEmailNotificationSettings() {
|
|
@@ -265,9 +261,9 @@ class UserProviderService {
|
|
|
265
261
|
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`, settings);
|
|
266
262
|
}
|
|
267
263
|
}
|
|
268
|
-
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
269
|
-
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
264
|
+
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2$1.HttpClient }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
265
|
+
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, providedIn: 'root' });
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, decorators: [{
|
|
271
267
|
type: Injectable,
|
|
272
268
|
args: [{
|
|
273
269
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-security.mjs","sources":["../../../../projects/valtimo/security/src/lib/guard/auth-guard.service.ts","../../../../projects/valtimo/security/src/lib/error/error.component.ts","../../../../projects/valtimo/security/src/lib/error/error.component.html","../../../../projects/valtimo/security/src/lib/error/error.ts","../../../../projects/valtimo/security/src/lib/error/http-error.interceptor.ts","../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts","../../../../projects/valtimo/security/src/lib/security.module.ts","../../../../projects/valtimo/security/src/lib/user-provider.service.ts","../../../../projects/valtimo/security/src/public_api.ts","../../../../projects/valtimo/security/src/valtimo-security.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuardService implements CanActivate {\n private readonly authGuardServiceProvider: CanActivate;\n\n constructor(\n configService: ConfigService,\n private injector: Injector,\n protected logger: NGXLogger\n ) {\n this.authGuardServiceProvider = injector.get<any>(\n configService.config.authentication.authProviders.guardServiceProvider\n );\n this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);\n }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n this.logger.debug('Delegating AuthGuard canActivate');\n return this.authGuardServiceProvider.canActivate(route, state);\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {Error} from './error';\n\n@Component({\n selector: 'valtimo-error',\n templateUrl: './error.component.html',\n styleUrls: ['./error.component.css'],\n})\nexport class ErrorComponent implements OnInit {\n public err: Error;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnInit() {\n if (this.activatedRoute.snapshot.data) {\n this.err = {\n title: this.activatedRoute.snapshot.data.title,\n error: this.activatedRoute.snapshot.data.error,\n };\n }\n }\n}\n","<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpHeaders} from '@angular/common/http';\n\nexport const InterceptorSkip = 'X-Skip-Interceptor';\nexport const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, '');\n\nexport interface Error {\n title: string;\n error: number;\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError, retry} from 'rxjs/operators';\nimport {Injectable} from '@angular/core';\nimport {ToastrService} from 'ngx-toastr';\nimport {InterceptorSkip} from './error';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HttpErrorInterceptor implements HttpInterceptor {\n constructor(private toastr: ToastrService, private logger: NGXLogger) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.headers && request.headers.has(InterceptorSkip)) {\n const headers = request.headers.delete(InterceptorSkip);\n return next.handle(request.clone({headers}));\n } else {\n return next.handle(request).pipe(\n catchError((error: HttpErrorResponse) => {\n let errorMessage = '';\n if (error?.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Error: ${error.error.message}`;\n } else {\n // server-side error\n if (error?.error?.errors) {\n errorMessage = error?.error?.errors;\n } else if (error?.error?.title && error?.error?.referenceId) {\n errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;\n } else if (error?.error?.title && error?.error?.detail) {\n errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;\n } else if (error?.error?.message) {\n errorMessage = error?.error?.message;\n } else {\n errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;\n }\n }\n this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {\n enableHtml: true,\n tapToDismiss: false,\n });\n return throwError(errorMessage);\n })\n );\n }\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {ErrorComponent} from './error.component';\nimport {HttpErrorInterceptor} from './http-error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\n\nconst routes: Routes = [\n {path: '403', component: ErrorComponent, data: {title: 'Access Forbidden', error: 403}},\n {path: '404', component: ErrorComponent, data: {title: 'Not Found', error: 404}},\n {path: '500', component: ErrorComponent, data: {title: 'Internal Server Error', error: 500}},\n {path: '503', component: ErrorComponent, data: {title: 'Service Unavailable', error: 503}},\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n providers: [{provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true}],\n})\nexport class ErrorRoutingModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {ErrorComponent} from './error/error.component';\nimport {ErrorRoutingModule} from './error/error-routing.module';\nimport {AuthGuardService} from './guard/auth-guard.service';\n\n@NgModule({\n declarations: [ErrorComponent],\n imports: [ErrorRoutingModule],\n exports: [ErrorComponent],\n providers: [AuthGuardService],\n})\nexport class SecurityModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {Observable, ReplaySubject} from 'rxjs';\nimport {NGXLogger} from 'ngx-logger';\nimport {\n EmailNotificationService,\n EmailNotificationSettings,\n UserIdentity,\n UserService,\n} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserProviderService implements UserService, EmailNotificationService {\n private readonly userService: UserService;\n private valtimoApiConfig: {\n endpointUri: string;\n };\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private http: HttpClient,\n private logger: NGXLogger\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.userService = injector.get<any>(\n configService.config.authentication.authProviders.userServiceProvider\n );\n this.logger.debug('Loading UserProviderService service', this.userService);\n }\n\n getUserSubject(): ReplaySubject<UserIdentity> {\n this.logger.debug('Delegating UserProviderService::getUserIdentity');\n return this.userService.getUserSubject();\n }\n\n logout(): void {\n this.logger.debug('Delegating UserProviderService::logout');\n return this.userService.logout();\n }\n\n async getToken(): Promise<string> {\n this.logger.debug('Delegating UserProviderService::getToken');\n return this.userService.getToken();\n }\n\n async updateToken(minValidity: number): Promise<boolean> {\n this.logger.debug('Delegating UserProviderService::updateToken');\n if (this.userService.updateToken) {\n return this.userService.updateToken(minValidity);\n } else {\n return new Promise(resolve => resolve(true));\n }\n }\n\n public getEmailNotificationSettings(): Observable<EmailNotificationSettings> {\n this.logger.debug('getEmailNotificationSettings');\n return this.http.get<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`\n );\n }\n\n public updateEmailNotificationSettings(\n settings: EmailNotificationSettings\n ): Observable<EmailNotificationSettings> {\n this.logger.debug('updateEmailNotificationSettings', settings);\n return this.http.put<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of security\n */\nexport * from './lib/guard/auth-guard.service';\nexport * from './lib/security.module';\nexport * from './lib/error/error';\nexport * from './lib/error/error.component';\nexport * from './lib/user-provider.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAWU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB,EAAA;AADnB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AAChB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AAE3B,QAAA,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,GAAG,CAC1C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KA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AAAnB,mBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;AC9BD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-security.mjs","sources":["../../../../projects/valtimo/security/src/lib/guard/auth-guard.service.ts","../../../../projects/valtimo/security/src/lib/error/error.component.ts","../../../../projects/valtimo/security/src/lib/error/error.component.html","../../../../projects/valtimo/security/src/lib/error/error.ts","../../../../projects/valtimo/security/src/lib/error/http-error.interceptor.ts","../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts","../../../../projects/valtimo/security/src/lib/security.module.ts","../../../../projects/valtimo/security/src/lib/user-provider.service.ts","../../../../projects/valtimo/security/src/public_api.ts","../../../../projects/valtimo/security/src/valtimo-security.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuardService implements CanActivate {\n private readonly authGuardServiceProvider: CanActivate;\n\n constructor(\n configService: ConfigService,\n private injector: Injector,\n protected logger: NGXLogger\n ) {\n this.authGuardServiceProvider = injector.get<any>(\n configService.config.authentication.authProviders.guardServiceProvider\n );\n this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);\n }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n this.logger.debug('Delegating AuthGuard canActivate');\n return this.authGuardServiceProvider.canActivate(route, state);\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {Error} from './error';\n\n@Component({\n selector: 'valtimo-error',\n templateUrl: './error.component.html',\n styleUrls: ['./error.component.css'],\n})\nexport class ErrorComponent implements OnInit {\n public err: Error;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnInit() {\n if (this.activatedRoute.snapshot.data) {\n this.err = {\n title: this.activatedRoute.snapshot.data.title,\n error: this.activatedRoute.snapshot.data.error,\n };\n }\n }\n}\n","<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpHeaders} from '@angular/common/http';\n\nexport const InterceptorSkip = 'X-Skip-Interceptor';\nexport const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, '');\n\nexport interface Error {\n title: string;\n error: number;\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError} from 'rxjs/operators';\nimport {Injectable} from '@angular/core';\nimport {ToastrService} from 'ngx-toastr';\nimport {InterceptorSkip} from './error';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HttpErrorInterceptor implements HttpInterceptor {\n constructor(private toastr: ToastrService, private logger: NGXLogger) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.headers && request.headers.has(InterceptorSkip)) {\n const headers = request.headers.delete(InterceptorSkip);\n return next.handle(request.clone({headers}));\n }\n\n return next.handle(request).pipe(\n catchError((error: HttpErrorResponse) => {\n let errorMessage = '';\n if (error?.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Error: ${error.error.message}`;\n } else {\n // server-side error\n if (error?.error?.errors) {\n errorMessage = error?.error?.errors;\n } else if (error?.error?.title && error?.error?.referenceId) {\n errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;\n } else if (error?.error?.title && error?.error?.detail) {\n errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;\n } else if (error?.error?.message) {\n errorMessage = error?.error?.message;\n } else {\n errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;\n }\n }\n this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {\n enableHtml: true,\n tapToDismiss: false,\n });\n return throwError(errorMessage);\n })\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {ErrorComponent} from './error.component';\nimport {HttpErrorInterceptor} from './http-error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\n\nconst routes: Routes = [\n {path: '403', component: ErrorComponent, data: {title: 'Access Forbidden', error: 403}},\n {path: '404', component: ErrorComponent, data: {title: 'Not Found', error: 404}},\n {path: '500', component: ErrorComponent, data: {title: 'Internal Server Error', error: 500}},\n {path: '503', component: ErrorComponent, data: {title: 'Service Unavailable', error: 503}},\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n providers: [{provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true}],\n})\nexport class ErrorRoutingModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {ErrorComponent} from './error/error.component';\nimport {ErrorRoutingModule} from './error/error-routing.module';\nimport {AuthGuardService} from './guard/auth-guard.service';\n\n@NgModule({\n declarations: [ErrorComponent],\n imports: [ErrorRoutingModule],\n exports: [ErrorComponent],\n providers: [AuthGuardService],\n})\nexport class SecurityModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {Observable, ReplaySubject} from 'rxjs';\nimport {NGXLogger} from 'ngx-logger';\nimport {\n ConfigService,\n EmailNotificationService,\n EmailNotificationSettings,\n UserIdentity,\n UserService,\n} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserProviderService implements UserService, EmailNotificationService {\n private readonly userService: UserService;\n private valtimoApiConfig: {\n endpointUri: string;\n };\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private http: HttpClient,\n private logger: NGXLogger\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.userService = injector.get<any>(\n configService.config.authentication.authProviders.userServiceProvider\n );\n this.logger.debug('Loading UserProviderService service', this.userService);\n }\n\n getUserSubject(): ReplaySubject<UserIdentity> {\n this.logger.debug('Delegating UserProviderService::getUserIdentity');\n return this.userService.getUserSubject();\n }\n\n logout(): void {\n this.logger.debug('Delegating UserProviderService::logout');\n return this.userService.logout();\n }\n\n async getToken(): Promise<string> {\n this.logger.debug('Delegating UserProviderService::getToken');\n return this.userService.getToken();\n }\n\n async updateToken(minValidity: number): Promise<boolean> {\n this.logger.debug('Delegating UserProviderService::updateToken');\n if (this.userService.updateToken) {\n return this.userService.updateToken(minValidity);\n }\n\n return new Promise(resolve => resolve(true));\n }\n\n public getEmailNotificationSettings(): Observable<EmailNotificationSettings> {\n this.logger.debug('getEmailNotificationSettings');\n return this.http.get<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`\n );\n }\n\n public updateEmailNotificationSettings(\n settings: EmailNotificationSettings\n ): Observable<EmailNotificationSettings> {\n this.logger.debug('updateEmailNotificationSettings', settings);\n return this.http.put<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of security\n */\nexport * from './lib/guard/auth-guard.service';\nexport * from './lib/security.module';\nexport * from './lib/error/error';\nexport * from './lib/error/error.component';\nexport * from './lib/user-provider.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAWU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB,EAAA;AADnB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AAChB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AAE3B,QAAA,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,GAAG,CAC1C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KAC9F;IAED,WAAW,CACT,KAA6B,EAC7B,KAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAChE;;6GApBU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA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GuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
42
|
-
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
41
|
+
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
42
|
+
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, providedIn: 'root' });
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthGuardService, decorators: [{
|
|
44
44
|
type: Injectable,
|
|
45
45
|
args: [{
|
|
46
46
|
providedIn: 'root',
|
|
@@ -75,9 +75,9 @@ class ErrorComponent {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
79
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
78
|
+
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "valtimo-error", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n", styles: [""] });
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
81
81
|
type: Component,
|
|
82
82
|
args: [{ selector: 'valtimo-error', template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
83
83
|
}], ctorParameters: function () { return [{ type: i1$1.ActivatedRoute }]; } });
|
|
@@ -110,43 +110,41 @@ class HttpErrorInterceptor {
|
|
|
110
110
|
const headers = request.headers.delete(InterceptorSkip);
|
|
111
111
|
return next.handle(request.clone({ headers }));
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
return next.handle(request).pipe(catchError((error) => {
|
|
114
|
+
let errorMessage = '';
|
|
115
|
+
if (error?.error instanceof ErrorEvent) {
|
|
116
|
+
// client-side error
|
|
117
|
+
errorMessage = `Error: ${error.error.message}`;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
// server-side error
|
|
121
|
+
if (error?.error?.errors) {
|
|
122
|
+
errorMessage = error?.error?.errors;
|
|
123
|
+
}
|
|
124
|
+
else if (error?.error?.title && error?.error?.referenceId) {
|
|
125
|
+
errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;
|
|
126
|
+
}
|
|
127
|
+
else if (error?.error?.title && error?.error?.detail) {
|
|
128
|
+
errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;
|
|
129
|
+
}
|
|
130
|
+
else if (error?.error?.message) {
|
|
131
|
+
errorMessage = error?.error?.message;
|
|
119
132
|
}
|
|
120
133
|
else {
|
|
121
|
-
|
|
122
|
-
if (error?.error?.errors) {
|
|
123
|
-
errorMessage = error?.error?.errors;
|
|
124
|
-
}
|
|
125
|
-
else if (error?.error?.title && error?.error?.referenceId) {
|
|
126
|
-
errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;
|
|
127
|
-
}
|
|
128
|
-
else if (error?.error?.title && error?.error?.detail) {
|
|
129
|
-
errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;
|
|
130
|
-
}
|
|
131
|
-
else if (error?.error?.message) {
|
|
132
|
-
errorMessage = error?.error?.message;
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;
|
|
136
|
-
}
|
|
134
|
+
errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
136
|
+
}
|
|
137
|
+
this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {
|
|
138
|
+
enableHtml: true,
|
|
139
|
+
tapToDismiss: false,
|
|
140
|
+
});
|
|
141
|
+
return throwError(errorMessage);
|
|
142
|
+
}));
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
|
-
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
148
|
-
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
145
|
+
HttpErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, deps: [{ token: i1$2.ToastrService }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
146
|
+
HttpErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, providedIn: 'root' });
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HttpErrorInterceptor, decorators: [{
|
|
150
148
|
type: Injectable,
|
|
151
149
|
args: [{
|
|
152
150
|
providedIn: 'root',
|
|
@@ -176,10 +174,10 @@ const routes = [
|
|
|
176
174
|
];
|
|
177
175
|
class ErrorRoutingModule {
|
|
178
176
|
}
|
|
179
|
-
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
180
|
-
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
181
|
-
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
177
|
+
ErrorRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
178
|
+
ErrorRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] });
|
|
179
|
+
ErrorRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }], imports: [CommonModule, RouterModule.forChild(routes), RouterModule] });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorRoutingModule, decorators: [{
|
|
183
181
|
type: NgModule,
|
|
184
182
|
args: [{
|
|
185
183
|
declarations: [],
|
|
@@ -206,10 +204,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
206
204
|
*/
|
|
207
205
|
class SecurityModule {
|
|
208
206
|
}
|
|
209
|
-
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
210
|
-
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
211
|
-
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
207
|
+
SecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
208
|
+
SecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, declarations: [ErrorComponent], imports: [ErrorRoutingModule], exports: [ErrorComponent] });
|
|
209
|
+
SecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, providers: [AuthGuardService], imports: [ErrorRoutingModule] });
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SecurityModule, decorators: [{
|
|
213
211
|
type: NgModule,
|
|
214
212
|
args: [{
|
|
215
213
|
declarations: [ErrorComponent],
|
|
@@ -261,9 +259,7 @@ class UserProviderService {
|
|
|
261
259
|
if (this.userService.updateToken) {
|
|
262
260
|
return this.userService.updateToken(minValidity);
|
|
263
261
|
}
|
|
264
|
-
|
|
265
|
-
return new Promise(resolve => resolve(true));
|
|
266
|
-
}
|
|
262
|
+
return new Promise(resolve => resolve(true));
|
|
267
263
|
}
|
|
268
264
|
getEmailNotificationSettings() {
|
|
269
265
|
this.logger.debug('getEmailNotificationSettings');
|
|
@@ -274,9 +270,9 @@ class UserProviderService {
|
|
|
274
270
|
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`, settings);
|
|
275
271
|
}
|
|
276
272
|
}
|
|
277
|
-
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
278
|
-
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
273
|
+
UserProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2$1.HttpClient }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
274
|
+
UserProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, providedIn: 'root' });
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UserProviderService, decorators: [{
|
|
280
276
|
type: Injectable,
|
|
281
277
|
args: [{
|
|
282
278
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-security.mjs","sources":["../../../../projects/valtimo/security/src/lib/guard/auth-guard.service.ts","../../../../projects/valtimo/security/src/lib/error/error.component.ts","../../../../projects/valtimo/security/src/lib/error/error.component.html","../../../../projects/valtimo/security/src/lib/error/error.ts","../../../../projects/valtimo/security/src/lib/error/http-error.interceptor.ts","../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts","../../../../projects/valtimo/security/src/lib/security.module.ts","../../../../projects/valtimo/security/src/lib/user-provider.service.ts","../../../../projects/valtimo/security/src/public_api.ts","../../../../projects/valtimo/security/src/valtimo-security.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuardService implements CanActivate {\n private readonly authGuardServiceProvider: CanActivate;\n\n constructor(\n configService: ConfigService,\n private injector: Injector,\n protected logger: NGXLogger\n ) {\n this.authGuardServiceProvider = injector.get<any>(\n configService.config.authentication.authProviders.guardServiceProvider\n );\n this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);\n }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n this.logger.debug('Delegating AuthGuard canActivate');\n return this.authGuardServiceProvider.canActivate(route, state);\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {Error} from './error';\n\n@Component({\n selector: 'valtimo-error',\n templateUrl: './error.component.html',\n styleUrls: ['./error.component.css'],\n})\nexport class ErrorComponent implements OnInit {\n public err: Error;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnInit() {\n if (this.activatedRoute.snapshot.data) {\n this.err = {\n title: this.activatedRoute.snapshot.data.title,\n error: this.activatedRoute.snapshot.data.error,\n };\n }\n }\n}\n","<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpHeaders} from '@angular/common/http';\n\nexport const InterceptorSkip = 'X-Skip-Interceptor';\nexport const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, '');\n\nexport interface Error {\n title: string;\n error: number;\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError, retry} from 'rxjs/operators';\nimport {Injectable} from '@angular/core';\nimport {ToastrService} from 'ngx-toastr';\nimport {InterceptorSkip} from './error';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HttpErrorInterceptor implements HttpInterceptor {\n constructor(private toastr: ToastrService, private logger: NGXLogger) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.headers && request.headers.has(InterceptorSkip)) {\n const headers = request.headers.delete(InterceptorSkip);\n return next.handle(request.clone({headers}));\n } else {\n return next.handle(request).pipe(\n catchError((error: HttpErrorResponse) => {\n let errorMessage = '';\n if (error?.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Error: ${error.error.message}`;\n } else {\n // server-side error\n if (error?.error?.errors) {\n errorMessage = error?.error?.errors;\n } else if (error?.error?.title && error?.error?.referenceId) {\n errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;\n } else if (error?.error?.title && error?.error?.detail) {\n errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;\n } else if (error?.error?.message) {\n errorMessage = error?.error?.message;\n } else {\n errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;\n }\n }\n this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {\n enableHtml: true,\n tapToDismiss: false,\n });\n return throwError(errorMessage);\n })\n );\n }\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {ErrorComponent} from './error.component';\nimport {HttpErrorInterceptor} from './http-error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\n\nconst routes: Routes = [\n {path: '403', component: ErrorComponent, data: {title: 'Access Forbidden', error: 403}},\n {path: '404', component: ErrorComponent, data: {title: 'Not Found', error: 404}},\n {path: '500', component: ErrorComponent, data: {title: 'Internal Server Error', error: 500}},\n {path: '503', component: ErrorComponent, data: {title: 'Service Unavailable', error: 503}},\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n providers: [{provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true}],\n})\nexport class ErrorRoutingModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {ErrorComponent} from './error/error.component';\nimport {ErrorRoutingModule} from './error/error-routing.module';\nimport {AuthGuardService} from './guard/auth-guard.service';\n\n@NgModule({\n declarations: [ErrorComponent],\n imports: [ErrorRoutingModule],\n exports: [ErrorComponent],\n providers: [AuthGuardService],\n})\nexport class SecurityModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {Observable, ReplaySubject} from 'rxjs';\nimport {NGXLogger} from 'ngx-logger';\nimport {\n EmailNotificationService,\n EmailNotificationSettings,\n UserIdentity,\n UserService,\n} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserProviderService implements UserService, EmailNotificationService {\n private readonly userService: UserService;\n private valtimoApiConfig: {\n endpointUri: string;\n };\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private http: HttpClient,\n private logger: NGXLogger\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.userService = injector.get<any>(\n configService.config.authentication.authProviders.userServiceProvider\n );\n this.logger.debug('Loading UserProviderService service', this.userService);\n }\n\n getUserSubject(): ReplaySubject<UserIdentity> {\n this.logger.debug('Delegating UserProviderService::getUserIdentity');\n return this.userService.getUserSubject();\n }\n\n logout(): void {\n this.logger.debug('Delegating UserProviderService::logout');\n return this.userService.logout();\n }\n\n async getToken(): Promise<string> {\n this.logger.debug('Delegating UserProviderService::getToken');\n return this.userService.getToken();\n }\n\n async updateToken(minValidity: number): Promise<boolean> {\n this.logger.debug('Delegating UserProviderService::updateToken');\n if (this.userService.updateToken) {\n return this.userService.updateToken(minValidity);\n } else {\n return new Promise(resolve => resolve(true));\n }\n }\n\n public getEmailNotificationSettings(): Observable<EmailNotificationSettings> {\n this.logger.debug('getEmailNotificationSettings');\n return this.http.get<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`\n );\n }\n\n public updateEmailNotificationSettings(\n settings: EmailNotificationSettings\n ): Observable<EmailNotificationSettings> {\n this.logger.debug('updateEmailNotificationSettings', settings);\n return this.http.put<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of security\n */\nexport * from './lib/guard/auth-guard.service';\nexport * from './lib/security.module';\nexport * from './lib/error/error';\nexport * from './lib/error/error.component';\nexport * from './lib/user-provider.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAWU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB,EAAA;QADnB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAChB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AAE3B,QAAA,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,GAAG,CAC1C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KAC9F;IAED,WAAW,CACT,KAA6B,EAC7B,KAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAChE;;8GApBU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,E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EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AC9BD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-security.mjs","sources":["../../../../projects/valtimo/security/src/lib/guard/auth-guard.service.ts","../../../../projects/valtimo/security/src/lib/error/error.component.ts","../../../../projects/valtimo/security/src/lib/error/error.component.html","../../../../projects/valtimo/security/src/lib/error/error.ts","../../../../projects/valtimo/security/src/lib/error/http-error.interceptor.ts","../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts","../../../../projects/valtimo/security/src/lib/security.module.ts","../../../../projects/valtimo/security/src/lib/user-provider.service.ts","../../../../projects/valtimo/security/src/public_api.ts","../../../../projects/valtimo/security/src/valtimo-security.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree} from '@angular/router';\nimport {NGXLogger} from 'ngx-logger';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuardService implements CanActivate {\n private readonly authGuardServiceProvider: CanActivate;\n\n constructor(\n configService: ConfigService,\n private injector: Injector,\n protected logger: NGXLogger\n ) {\n this.authGuardServiceProvider = injector.get<any>(\n configService.config.authentication.authProviders.guardServiceProvider\n );\n this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);\n }\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n this.logger.debug('Delegating AuthGuard canActivate');\n return this.authGuardServiceProvider.canActivate(route, state);\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {Error} from './error';\n\n@Component({\n selector: 'valtimo-error',\n templateUrl: './error.component.html',\n styleUrls: ['./error.component.css'],\n})\nexport class ErrorComponent implements OnInit {\n public err: Error;\n\n constructor(private activatedRoute: ActivatedRoute) {}\n\n ngOnInit() {\n if (this.activatedRoute.snapshot.data) {\n this.err = {\n title: this.activatedRoute.snapshot.data.title,\n error: this.activatedRoute.snapshot.data.error,\n };\n }\n }\n}\n","<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpHeaders} from '@angular/common/http';\n\nexport const InterceptorSkip = 'X-Skip-Interceptor';\nexport const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, '');\n\nexport interface Error {\n title: string;\n error: number;\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError} from 'rxjs/operators';\nimport {Injectable} from '@angular/core';\nimport {ToastrService} from 'ngx-toastr';\nimport {InterceptorSkip} from './error';\nimport {NGXLogger} from 'ngx-logger';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HttpErrorInterceptor implements HttpInterceptor {\n constructor(private toastr: ToastrService, private logger: NGXLogger) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.headers && request.headers.has(InterceptorSkip)) {\n const headers = request.headers.delete(InterceptorSkip);\n return next.handle(request.clone({headers}));\n }\n\n return next.handle(request).pipe(\n catchError((error: HttpErrorResponse) => {\n let errorMessage = '';\n if (error?.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Error: ${error.error.message}`;\n } else {\n // server-side error\n if (error?.error?.errors) {\n errorMessage = error?.error?.errors;\n } else if (error?.error?.title && error?.error?.referenceId) {\n errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;\n } else if (error?.error?.title && error?.error?.detail) {\n errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;\n } else if (error?.error?.message) {\n errorMessage = error?.error?.message;\n } else {\n errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;\n }\n }\n this.toastr.warning(`${errorMessage}`, `An unexpected error occurred`, {\n enableHtml: true,\n tapToDismiss: false,\n });\n return throwError(errorMessage);\n })\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {ErrorComponent} from './error.component';\nimport {HttpErrorInterceptor} from './http-error.interceptor';\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\n\nconst routes: Routes = [\n {path: '403', component: ErrorComponent, data: {title: 'Access Forbidden', error: 403}},\n {path: '404', component: ErrorComponent, data: {title: 'Not Found', error: 404}},\n {path: '500', component: ErrorComponent, data: {title: 'Internal Server Error', error: 500}},\n {path: '503', component: ErrorComponent, data: {title: 'Service Unavailable', error: 503}},\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n providers: [{provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true}],\n})\nexport class ErrorRoutingModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {ErrorComponent} from './error/error.component';\nimport {ErrorRoutingModule} from './error/error-routing.module';\nimport {AuthGuardService} from './guard/auth-guard.service';\n\n@NgModule({\n declarations: [ErrorComponent],\n imports: [ErrorRoutingModule],\n exports: [ErrorComponent],\n providers: [AuthGuardService],\n})\nexport class SecurityModule {}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {Observable, ReplaySubject} from 'rxjs';\nimport {NGXLogger} from 'ngx-logger';\nimport {\n ConfigService,\n EmailNotificationService,\n EmailNotificationSettings,\n UserIdentity,\n UserService,\n} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserProviderService implements UserService, EmailNotificationService {\n private readonly userService: UserService;\n private valtimoApiConfig: {\n endpointUri: string;\n };\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private http: HttpClient,\n private logger: NGXLogger\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.userService = injector.get<any>(\n configService.config.authentication.authProviders.userServiceProvider\n );\n this.logger.debug('Loading UserProviderService service', this.userService);\n }\n\n getUserSubject(): ReplaySubject<UserIdentity> {\n this.logger.debug('Delegating UserProviderService::getUserIdentity');\n return this.userService.getUserSubject();\n }\n\n logout(): void {\n this.logger.debug('Delegating UserProviderService::logout');\n return this.userService.logout();\n }\n\n async getToken(): Promise<string> {\n this.logger.debug('Delegating UserProviderService::getToken');\n return this.userService.getToken();\n }\n\n async updateToken(minValidity: number): Promise<boolean> {\n this.logger.debug('Delegating UserProviderService::updateToken');\n if (this.userService.updateToken) {\n return this.userService.updateToken(minValidity);\n }\n\n return new Promise(resolve => resolve(true));\n }\n\n public getEmailNotificationSettings(): Observable<EmailNotificationSettings> {\n this.logger.debug('getEmailNotificationSettings');\n return this.http.get<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`\n );\n }\n\n public updateEmailNotificationSettings(\n settings: EmailNotificationSettings\n ): Observable<EmailNotificationSettings> {\n this.logger.debug('updateEmailNotificationSettings', settings);\n return this.http.put<EmailNotificationSettings>(\n `${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2023 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of security\n */\nexport * from './lib/guard/auth-guard.service';\nexport * from './lib/security.module';\nexport * from './lib/error/error';\nexport * from './lib/error/error.component';\nexport * from './lib/user-provider.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAWU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB,EAAA;QADnB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAChB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AAE3B,QAAA,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,GAAG,CAC1C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CACvE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;KAC9F;IAED,WAAW,CACT,KAA6B,EAC7B,KAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAChE;;6GApBU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,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A,CAAA;;;AC9BD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
3
3
|
import { NGXLogger } from 'ngx-logger';
|
|
4
|
-
import { EmailNotificationService, EmailNotificationSettings, UserIdentity, UserService } from '@valtimo/config';
|
|
4
|
+
import { ConfigService, EmailNotificationService, EmailNotificationSettings, UserIdentity, UserService } from '@valtimo/config';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
6
|
-
import { ConfigService } from '@valtimo/config';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class UserProviderService implements UserService, EmailNotificationService {
|
|
9
8
|
private configService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-provider.service.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/security/src/lib/user-provider.service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAa,QAAQ,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC
|
|
1
|
+
{"version":3,"file":"user-provider.service.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/security/src/lib/user-provider.service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAa,QAAQ,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;;AAEhD,qBAGa,mBAAoB,YAAW,WAAW,EAAE,wBAAwB;IAO7E,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,MAAM;IAThB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,gBAAgB,CAEtB;gBAGQ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,SAAS;IAS3B,cAAc,IAAI,aAAa,CAAC,YAAY,CAAC;IAK7C,MAAM,IAAI,IAAI;IAKR,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAK3B,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IASjD,4BAA4B,IAAI,UAAU,CAAC,yBAAyB,CAAC;IAOrE,+BAA+B,CACpC,QAAQ,EAAE,yBAAyB,GAClC,UAAU,CAAC,yBAAyB,CAAC;yCApD7B,mBAAmB;6CAAnB,mBAAmB;CA2D/B"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valtimo/security",
|
|
3
3
|
"license": "EUPL-1.2",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.7.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^14.
|
|
7
|
-
"@angular/core": "^14.
|
|
6
|
+
"@angular/common": "^14.3.0",
|
|
7
|
+
"@angular/core": "^14.3.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"ngx-toastr": "^15.2.
|
|
11
|
-
"tslib": "^2.
|
|
10
|
+
"ngx-toastr": "^15.2.2",
|
|
11
|
+
"tslib": "^2.5.0"
|
|
12
12
|
},
|
|
13
13
|
"module": "fesm2015/valtimo-security.mjs",
|
|
14
14
|
"es2020": "fesm2020/valtimo-security.mjs",
|