@valtimo/security 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/valtimo-security.mjs +458 -0
- package/fesm2022/valtimo-security.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/constants/csp.constant.d.ts +4 -0
- package/lib/constants/csp.constant.d.ts.map +1 -0
- package/lib/constants/index.d.ts +2 -0
- package/lib/constants/index.d.ts.map +1 -0
- package/lib/error/error-routing.module.d.ts +9 -0
- package/lib/error/error-routing.module.d.ts.map +1 -0
- package/lib/error/error.component.d.ts +13 -0
- package/lib/error/error.component.d.ts.map +1 -0
- package/lib/error/error.d.ts +5 -0
- package/lib/error/error.d.ts.map +1 -0
- package/lib/error/http-error.interceptor.d.ts +12 -0
- package/lib/error/http-error.interceptor.d.ts.map +1 -0
- package/lib/guard/auth-guard.service.d.ts +15 -0
- package/lib/guard/auth-guard.service.d.ts.map +1 -0
- package/lib/initializers/index.d.ts +2 -0
- package/lib/initializers/index.d.ts.map +1 -0
- package/lib/initializers/initialize-csp.d.ts +5 -0
- package/lib/initializers/initialize-csp.d.ts.map +1 -0
- package/lib/interceptors/index.d.ts +2 -0
- package/lib/interceptors/index.d.ts.map +1 -0
- package/lib/interceptors/zone-offset.interceptor.d.ts +10 -0
- package/lib/interceptors/zone-offset.interceptor.d.ts.map +1 -0
- package/lib/security.module.d.ts +8 -0
- package/lib/security.module.d.ts.map +1 -0
- package/lib/user-provider.service.d.ts +24 -0
- package/lib/user-provider.service.d.ts.map +1 -0
- package/package.json +26 -0
- package/public_api.d.ts +8 -0
- package/public_api.d.ts.map +1 -0
- package/valtimo-security.d.ts.map +1 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, NgModule, SecurityContext } from '@angular/core';
|
|
3
|
+
import * as i1 from '@valtimo/shared';
|
|
4
|
+
import { InterceptorSkip } from '@valtimo/shared';
|
|
5
|
+
import * as i2 from 'ngx-logger';
|
|
6
|
+
import * as i2$1 from '@angular/common/http';
|
|
7
|
+
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
8
|
+
import * as i1$1 from '@angular/router';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import { throwError } from 'rxjs';
|
|
12
|
+
import { catchError } from 'rxjs/operators';
|
|
13
|
+
import moment from 'moment';
|
|
14
|
+
import { getCSP } from 'csp-header';
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
18
|
+
*
|
|
19
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
20
|
+
* you may not use this file except in compliance with the License.
|
|
21
|
+
* You may obtain a copy of the License at
|
|
22
|
+
*
|
|
23
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
24
|
+
*
|
|
25
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
26
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
27
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
28
|
+
* See the License for the specific language governing permissions and
|
|
29
|
+
* limitations under the License.
|
|
30
|
+
*/
|
|
31
|
+
class AuthGuardService {
|
|
32
|
+
constructor(configService, injector, logger) {
|
|
33
|
+
this.injector = injector;
|
|
34
|
+
this.logger = logger;
|
|
35
|
+
this.authGuardServiceProvider = injector.get(configService.config.authentication.authProviders.guardServiceProvider);
|
|
36
|
+
this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);
|
|
37
|
+
}
|
|
38
|
+
canActivate(route, state) {
|
|
39
|
+
this.logger.debug('Delegating AuthGuard canActivate');
|
|
40
|
+
return this.authGuardServiceProvider.canActivate(route, state);
|
|
41
|
+
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuardService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
43
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuardService, providedIn: 'root' }); }
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuardService, decorators: [{
|
|
46
|
+
type: Injectable,
|
|
47
|
+
args: [{
|
|
48
|
+
providedIn: 'root',
|
|
49
|
+
}]
|
|
50
|
+
}], ctorParameters: () => [{ type: i1.ConfigService }, { type: i0.Injector }, { type: i2.NGXLogger }] });
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
54
|
+
*
|
|
55
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
56
|
+
* you may not use this file except in compliance with the License.
|
|
57
|
+
* You may obtain a copy of the License at
|
|
58
|
+
*
|
|
59
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
60
|
+
*
|
|
61
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
62
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
63
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
64
|
+
* See the License for the specific language governing permissions and
|
|
65
|
+
* limitations under the License.
|
|
66
|
+
*/
|
|
67
|
+
class ErrorComponent {
|
|
68
|
+
constructor(activatedRoute) {
|
|
69
|
+
this.activatedRoute = activatedRoute;
|
|
70
|
+
}
|
|
71
|
+
ngOnInit() {
|
|
72
|
+
if (this.activatedRoute.snapshot.data) {
|
|
73
|
+
this.err = {
|
|
74
|
+
title: this.activatedRoute.snapshot.data.title,
|
|
75
|
+
error: this.activatedRoute.snapshot.data.error,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ErrorComponent, deps: [{ token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ErrorComponent, isStandalone: false, selector: "valtimo-error", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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
|
+
}
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{ selector: 'valtimo-error', standalone: false, template: "<!--\n ~ Copyright 2015-2025 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" }]
|
|
85
|
+
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }] });
|
|
86
|
+
|
|
87
|
+
class HttpErrorInterceptor {
|
|
88
|
+
constructor(globalNotificationService) {
|
|
89
|
+
this.globalNotificationService = globalNotificationService;
|
|
90
|
+
}
|
|
91
|
+
intercept(request, next) {
|
|
92
|
+
let skipStatusCodes = [];
|
|
93
|
+
let response$;
|
|
94
|
+
if (request.headers && request.headers.has(InterceptorSkip)) {
|
|
95
|
+
skipStatusCodes = request.headers.get(InterceptorSkip)?.split(',') ?? [];
|
|
96
|
+
const headers = request.headers.delete(InterceptorSkip);
|
|
97
|
+
response$ = next.handle(request.clone({ headers }));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
response$ = next.handle(request);
|
|
101
|
+
}
|
|
102
|
+
return response$.pipe(catchError((error) => {
|
|
103
|
+
if (skipStatusCodes.find(skipStatusCode => skipStatusCode === 'all' || skipStatusCode === error.status.toString())) {
|
|
104
|
+
return throwError(() => error);
|
|
105
|
+
}
|
|
106
|
+
let errorMessage = '';
|
|
107
|
+
if (error?.error instanceof ErrorEvent) {
|
|
108
|
+
// client-side error
|
|
109
|
+
errorMessage = `Error: ${error.error.message}`;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
// server-side error
|
|
113
|
+
if (error?.error?.errors) {
|
|
114
|
+
errorMessage = error?.error?.errors;
|
|
115
|
+
}
|
|
116
|
+
else if (error?.error?.title && error?.error?.detail) {
|
|
117
|
+
errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;
|
|
118
|
+
}
|
|
119
|
+
else if (error?.error?.title && error?.error?.referenceId) {
|
|
120
|
+
errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;
|
|
121
|
+
}
|
|
122
|
+
else if (error?.error?.message) {
|
|
123
|
+
errorMessage = error?.error?.message;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
errorMessage = `Error Code: ${error?.status} </br>Message: ${error?.message}`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
this.globalNotificationService.showToast({
|
|
130
|
+
title: 'An unexpected error occurred',
|
|
131
|
+
caption: errorMessage,
|
|
132
|
+
type: 'error',
|
|
133
|
+
});
|
|
134
|
+
return throwError(() => error);
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HttpErrorInterceptor, deps: [{ token: i1.GlobalNotificationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
138
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HttpErrorInterceptor, providedIn: 'root' }); }
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HttpErrorInterceptor, decorators: [{
|
|
141
|
+
type: Injectable,
|
|
142
|
+
args: [{
|
|
143
|
+
providedIn: 'root',
|
|
144
|
+
}]
|
|
145
|
+
}], ctorParameters: () => [{ type: i1.GlobalNotificationService }] });
|
|
146
|
+
|
|
147
|
+
/*
|
|
148
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
149
|
+
*
|
|
150
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
151
|
+
* you may not use this file except in compliance with the License.
|
|
152
|
+
* You may obtain a copy of the License at
|
|
153
|
+
*
|
|
154
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
155
|
+
*
|
|
156
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
157
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
158
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
159
|
+
* See the License for the specific language governing permissions and
|
|
160
|
+
* limitations under the License.
|
|
161
|
+
*/
|
|
162
|
+
const routes = [
|
|
163
|
+
{ path: '403', component: ErrorComponent, data: { title: 'Access Forbidden', error: 403 } },
|
|
164
|
+
{ path: '404', component: ErrorComponent, data: { title: 'Not Found', error: 404 } },
|
|
165
|
+
{ path: '500', component: ErrorComponent, data: { title: 'Internal Server Error', error: 500 } },
|
|
166
|
+
{ path: '503', component: ErrorComponent, data: { title: 'Service Unavailable', error: 503 } },
|
|
167
|
+
];
|
|
168
|
+
class ErrorRoutingModule {
|
|
169
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ErrorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
170
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: ErrorRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] }); }
|
|
171
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ErrorRoutingModule, providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }], imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
|
|
172
|
+
}
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ErrorRoutingModule, decorators: [{
|
|
174
|
+
type: NgModule,
|
|
175
|
+
args: [{
|
|
176
|
+
declarations: [],
|
|
177
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
178
|
+
exports: [RouterModule],
|
|
179
|
+
providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
|
|
180
|
+
}]
|
|
181
|
+
}] });
|
|
182
|
+
|
|
183
|
+
class ZoneOffsetInterceptor {
|
|
184
|
+
intercept(req, next) {
|
|
185
|
+
const modifiedReq = req.clone({
|
|
186
|
+
headers: req.headers.set('X-Timezone-Offset', this.getFormattedZoneOffset()),
|
|
187
|
+
});
|
|
188
|
+
return next.handle(modifiedReq);
|
|
189
|
+
}
|
|
190
|
+
getFormattedZoneOffset() {
|
|
191
|
+
let offset = new Date().getTimezoneOffset();
|
|
192
|
+
let isNegative = false;
|
|
193
|
+
if (offset < 0) {
|
|
194
|
+
isNegative = true;
|
|
195
|
+
offset = offset * -1;
|
|
196
|
+
}
|
|
197
|
+
const duration = moment.duration(offset, 'minutes');
|
|
198
|
+
const momentOffset = moment.utc(duration.asMilliseconds()).format('HH:mm');
|
|
199
|
+
return `${isNegative ? '+' : '-'}${momentOffset}`;
|
|
200
|
+
}
|
|
201
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ZoneOffsetInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
202
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ZoneOffsetInterceptor }); }
|
|
203
|
+
}
|
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ZoneOffsetInterceptor, decorators: [{
|
|
205
|
+
type: Injectable
|
|
206
|
+
}] });
|
|
207
|
+
|
|
208
|
+
/*
|
|
209
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
210
|
+
*
|
|
211
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
212
|
+
* you may not use this file except in compliance with the License.
|
|
213
|
+
* You may obtain a copy of the License at
|
|
214
|
+
*
|
|
215
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
216
|
+
*
|
|
217
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
218
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
219
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
220
|
+
* See the License for the specific language governing permissions and
|
|
221
|
+
* limitations under the License.
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
/*
|
|
225
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
226
|
+
*
|
|
227
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
228
|
+
* you may not use this file except in compliance with the License.
|
|
229
|
+
* You may obtain a copy of the License at
|
|
230
|
+
*
|
|
231
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
232
|
+
*
|
|
233
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
234
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
235
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
236
|
+
* See the License for the specific language governing permissions and
|
|
237
|
+
* limitations under the License.
|
|
238
|
+
*/
|
|
239
|
+
class SecurityModule {
|
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
241
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: SecurityModule, imports: [ErrorRoutingModule] }); }
|
|
242
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecurityModule, providers: [
|
|
243
|
+
AuthGuardService,
|
|
244
|
+
{ provide: HTTP_INTERCEPTORS, useClass: ZoneOffsetInterceptor, multi: true },
|
|
245
|
+
], imports: [ErrorRoutingModule] }); }
|
|
246
|
+
}
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SecurityModule, decorators: [{
|
|
248
|
+
type: NgModule,
|
|
249
|
+
args: [{
|
|
250
|
+
imports: [ErrorRoutingModule],
|
|
251
|
+
providers: [
|
|
252
|
+
AuthGuardService,
|
|
253
|
+
{ provide: HTTP_INTERCEPTORS, useClass: ZoneOffsetInterceptor, multi: true },
|
|
254
|
+
],
|
|
255
|
+
}]
|
|
256
|
+
}] });
|
|
257
|
+
|
|
258
|
+
/*
|
|
259
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
260
|
+
*
|
|
261
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
262
|
+
* you may not use this file except in compliance with the License.
|
|
263
|
+
* You may obtain a copy of the License at
|
|
264
|
+
*
|
|
265
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
266
|
+
*
|
|
267
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
268
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
269
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
270
|
+
* See the License for the specific language governing permissions and
|
|
271
|
+
* limitations under the License.
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
/*
|
|
275
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
276
|
+
*
|
|
277
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
278
|
+
* you may not use this file except in compliance with the License.
|
|
279
|
+
* You may obtain a copy of the License at
|
|
280
|
+
*
|
|
281
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
282
|
+
*
|
|
283
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
284
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
285
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
286
|
+
* See the License for the specific language governing permissions and
|
|
287
|
+
* limitations under the License.
|
|
288
|
+
*/
|
|
289
|
+
class UserProviderService {
|
|
290
|
+
constructor(configService, injector, http, logger) {
|
|
291
|
+
this.configService = configService;
|
|
292
|
+
this.injector = injector;
|
|
293
|
+
this.http = http;
|
|
294
|
+
this.logger = logger;
|
|
295
|
+
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
296
|
+
this.userService = injector.get(configService.config.authentication.authProviders.userServiceProvider);
|
|
297
|
+
this.logger.debug('Loading UserProviderService service', this.userService);
|
|
298
|
+
}
|
|
299
|
+
getUserSubject() {
|
|
300
|
+
this.logger.debug('Delegating UserProviderService::getUserIdentity');
|
|
301
|
+
return this.userService.getUserSubject();
|
|
302
|
+
}
|
|
303
|
+
logout() {
|
|
304
|
+
this.logger.debug('Delegating UserProviderService::logout');
|
|
305
|
+
return this.userService.logout();
|
|
306
|
+
}
|
|
307
|
+
async getToken() {
|
|
308
|
+
this.logger.debug('Delegating UserProviderService::getToken');
|
|
309
|
+
return this.userService.getToken();
|
|
310
|
+
}
|
|
311
|
+
async updateToken(minValidity) {
|
|
312
|
+
this.logger.debug('Delegating UserProviderService::updateToken');
|
|
313
|
+
if (this.userService.updateToken) {
|
|
314
|
+
return this.userService.updateToken(minValidity);
|
|
315
|
+
}
|
|
316
|
+
return new Promise(resolve => resolve(true));
|
|
317
|
+
}
|
|
318
|
+
getEmailNotificationSettings() {
|
|
319
|
+
this.logger.debug('getEmailNotificationSettings');
|
|
320
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`);
|
|
321
|
+
}
|
|
322
|
+
updateEmailNotificationSettings(settings) {
|
|
323
|
+
this.logger.debug('updateEmailNotificationSettings', settings);
|
|
324
|
+
return this.http.put(`${this.valtimoApiConfig.endpointUri}v1/email-notification-settings`, settings);
|
|
325
|
+
}
|
|
326
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserProviderService, deps: [{ token: i1.ConfigService }, { token: i0.Injector }, { token: i2$1.HttpClient }, { token: i2.NGXLogger }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
327
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserProviderService, providedIn: 'root' }); }
|
|
328
|
+
}
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: UserProviderService, decorators: [{
|
|
330
|
+
type: Injectable,
|
|
331
|
+
args: [{
|
|
332
|
+
providedIn: 'root',
|
|
333
|
+
}]
|
|
334
|
+
}], ctorParameters: () => [{ type: i1.ConfigService }, { type: i0.Injector }, { type: i2$1.HttpClient }, { type: i2.NGXLogger }] });
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
338
|
+
*
|
|
339
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
340
|
+
* you may not use this file except in compliance with the License.
|
|
341
|
+
* You may obtain a copy of the License at
|
|
342
|
+
*
|
|
343
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
344
|
+
*
|
|
345
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
346
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
347
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
348
|
+
* See the License for the specific language governing permissions and
|
|
349
|
+
* limitations under the License.
|
|
350
|
+
*/
|
|
351
|
+
const CSP_HTTP_EQUIV = 'Content-Security-Policy';
|
|
352
|
+
const CSP_META_ID = 'CSP_META';
|
|
353
|
+
|
|
354
|
+
/*
|
|
355
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
356
|
+
*
|
|
357
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
358
|
+
* you may not use this file except in compliance with the License.
|
|
359
|
+
* You may obtain a copy of the License at
|
|
360
|
+
*
|
|
361
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
362
|
+
*
|
|
363
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
364
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
365
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
366
|
+
* See the License for the specific language governing permissions and
|
|
367
|
+
* limitations under the License.
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
/*
|
|
371
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
372
|
+
*
|
|
373
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
374
|
+
* you may not use this file except in compliance with the License.
|
|
375
|
+
* You may obtain a copy of the License at
|
|
376
|
+
*
|
|
377
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
378
|
+
*
|
|
379
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
380
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
381
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
382
|
+
* See the License for the specific language governing permissions and
|
|
383
|
+
* limitations under the License.
|
|
384
|
+
*/
|
|
385
|
+
const getSanitizedCspString = (cspHeaderParams, domSanitizer) => {
|
|
386
|
+
const csp = getCSP(cspHeaderParams);
|
|
387
|
+
return domSanitizer.sanitize(SecurityContext.HTML, csp);
|
|
388
|
+
};
|
|
389
|
+
const getCspHeaderElement = (cspHeaderParams, domSanitizer, document) => {
|
|
390
|
+
const csp = getSanitizedCspString(cspHeaderParams, domSanitizer);
|
|
391
|
+
const cspMeta = document.createElement('meta');
|
|
392
|
+
cspMeta.httpEquiv = CSP_HTTP_EQUIV;
|
|
393
|
+
cspMeta.content = csp;
|
|
394
|
+
cspMeta.id = CSP_META_ID;
|
|
395
|
+
return cspMeta;
|
|
396
|
+
};
|
|
397
|
+
const appendElementToHead = (element, document) => {
|
|
398
|
+
document.head.appendChild(element);
|
|
399
|
+
};
|
|
400
|
+
const isElementLoaded = async (elementId, document) => {
|
|
401
|
+
while (document.getElementById(elementId) === null) {
|
|
402
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
403
|
+
}
|
|
404
|
+
return !!document.getElementById(elementId);
|
|
405
|
+
};
|
|
406
|
+
const initializeCsp = (logger, configService, document, domSanitizer) => async () => {
|
|
407
|
+
const cspHeaderParams = configService?.config?.csp;
|
|
408
|
+
if (cspHeaderParams) {
|
|
409
|
+
logger.log('Create CSP header element from:', cspHeaderParams);
|
|
410
|
+
const cspHeaderElement = getCspHeaderElement(cspHeaderParams, domSanitizer, document);
|
|
411
|
+
appendElementToHead(cspHeaderElement, document);
|
|
412
|
+
return await isElementLoaded(CSP_META_ID, document);
|
|
413
|
+
}
|
|
414
|
+
logger.log('No CSP config present.');
|
|
415
|
+
return true;
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
/*
|
|
419
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
420
|
+
*
|
|
421
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
422
|
+
* you may not use this file except in compliance with the License.
|
|
423
|
+
* You may obtain a copy of the License at
|
|
424
|
+
*
|
|
425
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
426
|
+
*
|
|
427
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
428
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
429
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
430
|
+
* See the License for the specific language governing permissions and
|
|
431
|
+
* limitations under the License.
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
/*
|
|
435
|
+
* Copyright 2015-2025 Ritense BV, the Netherlands.
|
|
436
|
+
*
|
|
437
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
438
|
+
* you may not use this file except in compliance with the License.
|
|
439
|
+
* You may obtain a copy of the License at
|
|
440
|
+
*
|
|
441
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
442
|
+
*
|
|
443
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
444
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
445
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
446
|
+
* See the License for the specific language governing permissions and
|
|
447
|
+
* limitations under the License.
|
|
448
|
+
*/
|
|
449
|
+
/*
|
|
450
|
+
* Public API Surface of security
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Generated bundle index. Do not edit.
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
export { AuthGuardService, CSP_HTTP_EQUIV, CSP_META_ID, ErrorComponent, SecurityModule, UserProviderService, initializeCsp };
|
|
458
|
+
//# sourceMappingURL=valtimo-security.mjs.map
|
|
@@ -0,0 +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/http-error.interceptor.ts","../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts","../../../../projects/valtimo/security/src/lib/interceptors/zone-offset.interceptor.ts","../../../../projects/valtimo/security/src/lib/interceptors/index.ts","../../../../projects/valtimo/security/src/lib/security.module.ts","../../../../projects/valtimo/security/src/lib/error/error.ts","../../../../projects/valtimo/security/src/lib/user-provider.service.ts","../../../../projects/valtimo/security/src/lib/constants/csp.constant.ts","../../../../projects/valtimo/security/src/lib/constants/index.ts","../../../../projects/valtimo/security/src/lib/initializers/initialize-csp.ts","../../../../projects/valtimo/security/src/lib/initializers/index.ts","../../../../projects/valtimo/security/src/public_api.ts","../../../../projects/valtimo/security/src/valtimo-security.ts"],"sourcesContent":["/*\n * Copyright 2015-2025 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 {\n ActivatedRouteSnapshot,\n CanActivate,\n GuardResult,\n MaybeAsync,\n RouterStateSnapshot,\n} from '@angular/router';\nimport {NGXLogger} from 'ngx-logger';\nimport {ConfigService} from '@valtimo/shared';\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(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<GuardResult> {\n this.logger.debug('Delegating AuthGuard canActivate');\n return this.authGuardServiceProvider.canActivate(route, state);\n }\n}\n","/*\n * Copyright 2015-2025 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 standalone: false,\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-2025 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-2025 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 */\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {GlobalNotificationService, InterceptorSkip} from '@valtimo/shared';\nimport {Observable, throwError} from 'rxjs';\nimport {catchError} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HttpErrorInterceptor implements HttpInterceptor {\n constructor(private readonly globalNotificationService: GlobalNotificationService) {}\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n let skipStatusCodes: string[] = [];\n let response$: Observable<HttpEvent<any>>;\n if (request.headers && request.headers.has(InterceptorSkip)) {\n skipStatusCodes = request.headers.get(InterceptorSkip)?.split(',') ?? [];\n const headers = request.headers.delete(InterceptorSkip);\n response$ = next.handle(request.clone({headers}));\n } else {\n response$ = next.handle(request);\n }\n\n return response$.pipe(\n catchError((error: HttpErrorResponse) => {\n if (\n skipStatusCodes.find(\n skipStatusCode => skipStatusCode === 'all' || skipStatusCode === error.status.toString()\n )\n ) {\n return throwError(() => error);\n }\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?.detail) {\n errorMessage = `${error?.error?.title}. Details: </br>${error?.error?.detail}`;\n } else if (error?.error?.title && error?.error?.referenceId) {\n errorMessage = `${error?.error?.title}. Reference ID: ${error?.error?.referenceId}`;\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.globalNotificationService.showToast({\n title: 'An unexpected error occurred',\n caption: errorMessage,\n type: 'error',\n });\n return throwError(() => error);\n })\n );\n }\n}\n","/*\n * Copyright 2015-2025 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-2025 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 {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport moment from 'moment';\n\n@Injectable()\nexport class ZoneOffsetInterceptor implements HttpInterceptor {\n public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n const modifiedReq = req.clone({\n headers: req.headers.set('X-Timezone-Offset', this.getFormattedZoneOffset()),\n });\n return next.handle(modifiedReq);\n }\n\n private getFormattedZoneOffset(): string {\n let offset = new Date().getTimezoneOffset();\n let isNegative = false;\n\n if (offset < 0) {\n isNegative = true;\n offset = offset * -1;\n }\n\n const duration = moment.duration(offset, 'minutes');\n const momentOffset = moment.utc(duration.asMilliseconds()).format('HH:mm');\n\n return `${isNegative ? '+' : '-'}${momentOffset}`;\n }\n}\n","/*\n * Copyright 2015-2025 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\nexport * from './zone-offset.interceptor';\n","/*\n * Copyright 2015-2025 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 */\nimport {HTTP_INTERCEPTORS} from '@angular/common/http';\nimport {NgModule} from '@angular/core';\nimport {ErrorRoutingModule} from './error/error-routing.module';\nimport {AuthGuardService} from './guard/auth-guard.service';\nimport {ZoneOffsetInterceptor} from './interceptors';\n\n@NgModule({\n imports: [ErrorRoutingModule],\n providers: [\n AuthGuardService,\n {provide: HTTP_INTERCEPTORS, useClass: ZoneOffsetInterceptor, multi: true},\n ],\n})\nexport class SecurityModule {}\n","/*\n * Copyright 2015-2025 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\nexport interface Error {\n title: string;\n error: number;\n}\n","/*\n * Copyright 2015-2025 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/shared';\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-2025 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\nconst CSP_HTTP_EQUIV = 'Content-Security-Policy';\n\nconst CSP_META_ID = 'CSP_META';\n\nexport {CSP_HTTP_EQUIV, CSP_META_ID};\n","/*\n * Copyright 2015-2025 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\nexport * from './csp.constant';\n","/*\n * Copyright 2015-2025 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 {NGXLogger} from 'ngx-logger';\nimport {ConfigService} from '@valtimo/shared';\nimport {CSP_HTTP_EQUIV, CSP_META_ID} from '../constants';\nimport {DomSanitizer} from '@angular/platform-browser';\nimport {CSPHeaderParams, getCSP} from 'csp-header';\nimport {SecurityContext} from '@angular/core';\n\nconst getSanitizedCspString = (\n cspHeaderParams: CSPHeaderParams,\n domSanitizer: DomSanitizer\n): string => {\n const csp = getCSP(cspHeaderParams);\n return domSanitizer.sanitize(SecurityContext.HTML, csp);\n};\n\nconst getCspHeaderElement = (\n cspHeaderParams: CSPHeaderParams,\n domSanitizer: DomSanitizer,\n document: Document\n): HTMLMetaElement => {\n const csp = getSanitizedCspString(cspHeaderParams, domSanitizer);\n const cspMeta = document.createElement('meta');\n\n cspMeta.httpEquiv = CSP_HTTP_EQUIV;\n cspMeta.content = csp;\n cspMeta.id = CSP_META_ID;\n\n return cspMeta;\n};\n\nconst appendElementToHead = (element: HTMLMetaElement, document: Document): void => {\n document.head.appendChild(element);\n};\n\nconst isElementLoaded = async (elementId: string, document: Document): Promise<boolean> => {\n while (document.getElementById(elementId) === null) {\n await new Promise(resolve => requestAnimationFrame(resolve));\n }\n return !!document.getElementById(elementId);\n};\n\nexport const initializeCsp =\n (\n logger: NGXLogger,\n configService: ConfigService,\n document: Document,\n domSanitizer: DomSanitizer\n ): (() => Promise<boolean>) =>\n async (): Promise<boolean> => {\n const cspHeaderParams = configService?.config?.csp;\n\n if (cspHeaderParams) {\n logger.log('Create CSP header element from:', cspHeaderParams);\n\n const cspHeaderElement = getCspHeaderElement(cspHeaderParams, domSanitizer, document);\n\n appendElementToHead(cspHeaderElement, document);\n\n return await isElementLoaded(CSP_META_ID, document);\n }\n\n logger.log('No CSP config present.');\n\n return true;\n };\n","/*\n * Copyright 2015-2025 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\nexport * from './initialize-csp';\n","/*\n * Copyright 2015-2025 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';\nexport * from './lib/constants';\nexport * from './lib/initializers';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAgBU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB,EAAA;QADnB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACN,IAAM,CAAA,MAAA,GAAN,MAAM;AAEhB,QAAA,IAAI,CAAC,wBAAwB,GAAG,QAAQ,CAAC,GAAG,CAC1C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,oBAAoB,CACvE;QACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,EAAE,IAAI,CAAC,wBAAwB,CAAC;;IAG9F,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AA,MAAM,IAAI,OAAO,CAAC,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;;IAE9D,OAAO,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC;AAC7C,CAAC;AAEY,MAAA,aAAa,GACxB,CACE,MAAiB,EACjB,aAA4B,EAC5B,QAAkB,EAClB,YAA0B,KAE5B,YAA6B;AAC3B,IAAA,MAAM,eAAe,GAAG,aAAa,EAAE,MAAM,EAAE,GAAG;IAElD,IAAI,eAAe,EAAE;AACnB,QAAA,MAAM,CAAC,GAAG,CAAC,iCAAiC,EAAE,eAAe,CAAC;QAE9D,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,CAAC;AAErF,QAAA,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,CAAC;AAE/C,QAAA,OAAO,MAAM,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC;;AAGrD,IAAA,MAAM,CAAC,GAAG,CAAC,wBAAwB,CAAC;AAEpC,IAAA,OAAO,IAAI;AACb;;AChFF;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csp.constant.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/constants/csp.constant.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,cAAc,4BAA4B,CAAC;AAEjD,QAAA,MAAM,WAAW,aAAa,CAAC;AAE/B,OAAO,EAAC,cAAc,EAAE,WAAW,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/constants/index.ts"],"names":[],"mappings":"AAgBA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
import * as i2 from "@angular/router";
|
|
4
|
+
export declare class ErrorRoutingModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorRoutingModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ErrorRoutingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule], [typeof i2.RouterModule]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ErrorRoutingModule>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=error-routing.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-routing.module.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/error/error-routing.module.ts"],"names":[],"mappings":";;;AA8BA,qBAMa,kBAAkB;yCAAlB,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { Error } from './error';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ErrorComponent implements OnInit {
|
|
6
|
+
private activatedRoute;
|
|
7
|
+
err: Error;
|
|
8
|
+
constructor(activatedRoute: ActivatedRoute);
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorComponent, "valtimo-error", never, {}, {}, never, never, false, never>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=error.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.component.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/error/error.component.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAY,MAAM,EAAC,MAAM,eAAe,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;;AAE9B,qBAMa,cAAe,YAAW,MAAM;IAG/B,OAAO,CAAC,cAAc;IAF3B,GAAG,EAAE,KAAK,CAAC;gBAEE,cAAc,EAAE,cAAc;IAElD,QAAQ;yCALG,cAAc;2CAAd,cAAc;CAa1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/error/error.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { GlobalNotificationService } from '@valtimo/shared';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HttpErrorInterceptor implements HttpInterceptor {
|
|
6
|
+
private readonly globalNotificationService;
|
|
7
|
+
constructor(globalNotificationService: GlobalNotificationService);
|
|
8
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpErrorInterceptor, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpErrorInterceptor>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=http-error.interceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-error.interceptor.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/error/http-error.interceptor.ts"],"names":[],"mappings":"AAeA,OAAO,EAEL,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,yBAAyB,EAAkB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAC,UAAU,EAAa,MAAM,MAAM,CAAC;;AAG5C,qBAGa,oBAAqB,YAAW,eAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAAzB,yBAAyB,EAAE,yBAAyB;IAEjF,SAAS,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;yCAHxE,oBAAoB;6CAApB,oBAAoB;CAkDhC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ActivatedRouteSnapshot, CanActivate, GuardResult, MaybeAsync, RouterStateSnapshot } from '@angular/router';
|
|
3
|
+
import { NGXLogger } from 'ngx-logger';
|
|
4
|
+
import { ConfigService } from '@valtimo/shared';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AuthGuardService implements CanActivate {
|
|
7
|
+
private injector;
|
|
8
|
+
protected logger: NGXLogger;
|
|
9
|
+
private readonly authGuardServiceProvider;
|
|
10
|
+
constructor(configService: ConfigService, injector: Injector, logger: NGXLogger);
|
|
11
|
+
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): MaybeAsync<GuardResult>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuardService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuardService>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=auth-guard.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-guard.service.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/guard/auth-guard.service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAa,QAAQ,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,UAAU,EACV,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;;AAE9C,qBAGa,gBAAiB,YAAW,WAAW;IAKhD,OAAO,CAAC,QAAQ;IAChB,SAAS,CAAC,MAAM,EAAE,SAAS;IAL7B,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAc;gBAGrD,aAAa,EAAE,aAAa,EACpB,QAAQ,EAAE,QAAQ,EAChB,MAAM,EAAE,SAAS;IAQ7B,WAAW,CAAC,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC;yCAdpF,gBAAgB;6CAAhB,gBAAgB;CAkB5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/initializers/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NGXLogger } from 'ngx-logger';
|
|
2
|
+
import { ConfigService } from '@valtimo/shared';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
|
+
export declare const initializeCsp: (logger: NGXLogger, configService: ConfigService, document: Document, domSanitizer: DomSanitizer) => (() => Promise<boolean>);
|
|
5
|
+
//# sourceMappingURL=initialize-csp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-csp.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/initializers/initialize-csp.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAsCvD,eAAO,MAAM,aAAa,GAEtB,QAAQ,SAAS,EACjB,eAAe,aAAa,EAC5B,UAAU,QAAQ,EAClB,cAAc,YAAY,KACzB,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAiBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/interceptors/index.ts"],"names":[],"mappings":"AAgBA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ZoneOffsetInterceptor implements HttpInterceptor {
|
|
5
|
+
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
6
|
+
private getFormattedZoneOffset;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ZoneOffsetInterceptor, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ZoneOffsetInterceptor>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=zone-offset.interceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zone-offset.interceptor.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/security/src/lib/interceptors/zone-offset.interceptor.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAC;;AAGhC,qBACa,qBAAsB,YAAW,eAAe;IACpD,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAOtF,OAAO,CAAC,sBAAsB;yCARnB,qBAAqB;6CAArB,qBAAqB;CAsBjC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./error/error-routing.module";
|
|
3
|
+
export declare class SecurityModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SecurityModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SecurityModule, never, [typeof i1.ErrorRoutingModule], never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SecurityModule>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=security.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.module.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/security/src/lib/security.module.ts"],"names":[],"mappings":";;AAqBA,qBAOa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { Observable, ReplaySubject } from 'rxjs';
|
|
3
|
+
import { NGXLogger } from 'ngx-logger';
|
|
4
|
+
import { ConfigService, EmailNotificationService, EmailNotificationSettings, UserIdentity, UserService } from '@valtimo/shared';
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class UserProviderService implements UserService, EmailNotificationService {
|
|
8
|
+
private configService;
|
|
9
|
+
private injector;
|
|
10
|
+
private http;
|
|
11
|
+
private logger;
|
|
12
|
+
private readonly userService;
|
|
13
|
+
private valtimoApiConfig;
|
|
14
|
+
constructor(configService: ConfigService, injector: Injector, http: HttpClient, logger: NGXLogger);
|
|
15
|
+
getUserSubject(): ReplaySubject<UserIdentity>;
|
|
16
|
+
logout(): void;
|
|
17
|
+
getToken(): Promise<string>;
|
|
18
|
+
updateToken(minValidity: number): Promise<boolean>;
|
|
19
|
+
getEmailNotificationSettings(): Observable<EmailNotificationSettings>;
|
|
20
|
+
updateEmailNotificationSettings(settings: EmailNotificationSettings): Observable<EmailNotificationSettings>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserProviderService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UserProviderService>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=user-provider.service.d.ts.map
|
|
@@ -0,0 +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,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
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@valtimo/security",
|
|
3
|
+
"license": "EUPL-1.2",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^19.2.8",
|
|
7
|
+
"@angular/core": "^19.2.8"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "2.8.1",
|
|
11
|
+
"moment": "2.30.1",
|
|
12
|
+
"csp-header": "6.1.0"
|
|
13
|
+
},
|
|
14
|
+
"module": "fesm2022/valtimo-security.mjs",
|
|
15
|
+
"typings": "index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"default": "./fesm2022/valtimo-security.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false
|
|
26
|
+
}
|
package/public_api.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './lib/guard/auth-guard.service';
|
|
2
|
+
export * from './lib/security.module';
|
|
3
|
+
export * from './lib/error/error';
|
|
4
|
+
export * from './lib/error/error.component';
|
|
5
|
+
export * from './lib/user-provider.service';
|
|
6
|
+
export * from './lib/constants';
|
|
7
|
+
export * from './lib/initializers';
|
|
8
|
+
//# sourceMappingURL=public_api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/security/src/public_api.ts"],"names":[],"mappings":"AAmBA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valtimo-security.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/security/src/valtimo-security.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
|