@valtimo/security 4.15.3-next-main.16 → 4.17.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.
@@ -9,282 +9,282 @@ import { ToastrService } from 'ngx-toastr';
9
9
  import { HttpHeaders, HTTP_INTERCEPTORS, HttpClient } from '@angular/common/http';
10
10
  import { __awaiter } from 'tslib';
11
11
 
12
- /*
13
- * Copyright 2015-2020 Ritense BV, the Netherlands.
14
- *
15
- * Licensed under EUPL, Version 1.2 (the "License");
16
- * you may not use this file except in compliance with the License.
17
- * You may obtain a copy of the License at
18
- *
19
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
20
- *
21
- * Unless required by applicable law or agreed to in writing, software
22
- * distributed under the License is distributed on an "AS IS" basis,
23
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
- * See the License for the specific language governing permissions and
25
- * limitations under the License.
26
- */
27
- class AuthGuardService {
28
- constructor(configService, injector, logger) {
29
- this.injector = injector;
30
- this.logger = logger;
31
- this.authGuardServiceProvider = injector.get(configService.config.authentication.authProviders.guardServiceProvider);
32
- this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);
33
- }
34
- canActivate(route, state) {
35
- this.logger.debug('Delegating AuthGuard canActivate');
36
- return this.authGuardServiceProvider.canActivate(route, state);
37
- }
38
- }
39
- AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(ConfigService), ɵɵinject(INJECTOR), ɵɵinject(NGXLogger)); }, token: AuthGuardService, providedIn: "root" });
40
- AuthGuardService.decorators = [
41
- { type: Injectable, args: [{
42
- providedIn: 'root',
43
- },] }
44
- ];
45
- AuthGuardService.ctorParameters = () => [
46
- { type: ConfigService },
47
- { type: Injector },
48
- { type: NGXLogger }
12
+ /*
13
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
14
+ *
15
+ * Licensed under EUPL, Version 1.2 (the "License");
16
+ * you may not use this file except in compliance with the License.
17
+ * You may obtain a copy of the License at
18
+ *
19
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software
22
+ * distributed under the License is distributed on an "AS IS" basis,
23
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
+ * See the License for the specific language governing permissions and
25
+ * limitations under the License.
26
+ */
27
+ class AuthGuardService {
28
+ constructor(configService, injector, logger) {
29
+ this.injector = injector;
30
+ this.logger = logger;
31
+ this.authGuardServiceProvider = injector.get(configService.config.authentication.authProviders.guardServiceProvider);
32
+ this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);
33
+ }
34
+ canActivate(route, state) {
35
+ this.logger.debug('Delegating AuthGuard canActivate');
36
+ return this.authGuardServiceProvider.canActivate(route, state);
37
+ }
38
+ }
39
+ AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(ConfigService), ɵɵinject(INJECTOR), ɵɵinject(NGXLogger)); }, token: AuthGuardService, providedIn: "root" });
40
+ AuthGuardService.decorators = [
41
+ { type: Injectable, args: [{
42
+ providedIn: 'root',
43
+ },] }
44
+ ];
45
+ AuthGuardService.ctorParameters = () => [
46
+ { type: ConfigService },
47
+ { type: Injector },
48
+ { type: NGXLogger }
49
49
  ];
50
50
 
51
- /*
52
- * Copyright 2015-2020 Ritense BV, the Netherlands.
53
- *
54
- * Licensed under EUPL, Version 1.2 (the "License");
55
- * you may not use this file except in compliance with the License.
56
- * You may obtain a copy of the License at
57
- *
58
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
59
- *
60
- * Unless required by applicable law or agreed to in writing, software
61
- * distributed under the License is distributed on an "AS IS" basis,
62
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
- * See the License for the specific language governing permissions and
64
- * limitations under the License.
65
- */
66
- class ErrorComponent {
67
- constructor(activatedRoute) {
68
- this.activatedRoute = activatedRoute;
69
- }
70
- ngOnInit() {
71
- if (this.activatedRoute.snapshot.data) {
72
- this.err = {
73
- title: this.activatedRoute.snapshot.data.title,
74
- error: this.activatedRoute.snapshot.data.error,
75
- };
76
- }
77
- }
78
- }
79
- ErrorComponent.decorators = [
80
- { type: Component, args: [{
81
- selector: 'valtimo-error',
82
- template: "<!--\n ~ Copyright 2015-2020 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
- styles: [""]
84
- },] }
85
- ];
86
- ErrorComponent.ctorParameters = () => [
87
- { type: ActivatedRoute }
51
+ /*
52
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
53
+ *
54
+ * Licensed under EUPL, Version 1.2 (the "License");
55
+ * you may not use this file except in compliance with the License.
56
+ * You may obtain a copy of the License at
57
+ *
58
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software
61
+ * distributed under the License is distributed on an "AS IS" basis,
62
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ * See the License for the specific language governing permissions and
64
+ * limitations under the License.
65
+ */
66
+ class ErrorComponent {
67
+ constructor(activatedRoute) {
68
+ this.activatedRoute = activatedRoute;
69
+ }
70
+ ngOnInit() {
71
+ if (this.activatedRoute.snapshot.data) {
72
+ this.err = {
73
+ title: this.activatedRoute.snapshot.data.title,
74
+ error: this.activatedRoute.snapshot.data.error,
75
+ };
76
+ }
77
+ }
78
+ }
79
+ ErrorComponent.decorators = [
80
+ { type: Component, args: [{
81
+ selector: 'valtimo-error',
82
+ template: "<!--\n ~ Copyright 2015-2020 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
+ styles: [""]
84
+ },] }
85
+ ];
86
+ ErrorComponent.ctorParameters = () => [
87
+ { type: ActivatedRoute }
88
88
  ];
89
89
 
90
- /*
91
- * Copyright 2015-2020 Ritense BV, the Netherlands.
92
- *
93
- * Licensed under EUPL, Version 1.2 (the "License");
94
- * you may not use this file except in compliance with the License.
95
- * You may obtain a copy of the License at
96
- *
97
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
98
- *
99
- * Unless required by applicable law or agreed to in writing, software
100
- * distributed under the License is distributed on an "AS IS" basis,
101
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102
- * See the License for the specific language governing permissions and
103
- * limitations under the License.
104
- */
105
- const InterceptorSkip = 'X-Skip-Interceptor';
90
+ /*
91
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
92
+ *
93
+ * Licensed under EUPL, Version 1.2 (the "License");
94
+ * you may not use this file except in compliance with the License.
95
+ * You may obtain a copy of the License at
96
+ *
97
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
98
+ *
99
+ * Unless required by applicable law or agreed to in writing, software
100
+ * distributed under the License is distributed on an "AS IS" basis,
101
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102
+ * See the License for the specific language governing permissions and
103
+ * limitations under the License.
104
+ */
105
+ const InterceptorSkip = 'X-Skip-Interceptor';
106
106
  const InterceptorSkipHeader = new HttpHeaders().set(InterceptorSkip, '');
107
107
 
108
- class HttpErrorInterceptor {
109
- constructor(toastr, logger) {
110
- this.toastr = toastr;
111
- this.logger = logger;
112
- }
113
- intercept(request, next) {
114
- if (request.headers && request.headers.has(InterceptorSkip)) {
115
- const headers = request.headers.delete(InterceptorSkip);
116
- return next.handle(request.clone({ headers }));
117
- }
118
- else {
119
- return next.handle(request).pipe(retry(1), catchError((error) => {
120
- let errorMessage = '';
121
- if (error.error instanceof ErrorEvent) {
122
- // client-side error
123
- errorMessage = `Error: ${error.error.message}`;
124
- }
125
- else {
126
- // server-side error
127
- if (error.error.errors) {
128
- errorMessage = error.error.errors;
129
- }
130
- else if (error.error.message) {
131
- errorMessage = error.error.message;
132
- }
133
- else {
134
- errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
135
- }
136
- }
137
- this.toastr.warning(`An unexpected error occurred...${errorMessage}`);
138
- return throwError(errorMessage);
139
- }));
140
- }
141
- }
142
- }
143
- HttpErrorInterceptor.ɵprov = ɵɵdefineInjectable({ factory: function HttpErrorInterceptor_Factory() { return new HttpErrorInterceptor(ɵɵinject(ToastrService), ɵɵinject(NGXLogger)); }, token: HttpErrorInterceptor, providedIn: "root" });
144
- HttpErrorInterceptor.decorators = [
145
- { type: Injectable, args: [{
146
- providedIn: 'root',
147
- },] }
148
- ];
149
- HttpErrorInterceptor.ctorParameters = () => [
150
- { type: ToastrService },
151
- { type: NGXLogger }
108
+ class HttpErrorInterceptor {
109
+ constructor(toastr, logger) {
110
+ this.toastr = toastr;
111
+ this.logger = logger;
112
+ }
113
+ intercept(request, next) {
114
+ if (request.headers && request.headers.has(InterceptorSkip)) {
115
+ const headers = request.headers.delete(InterceptorSkip);
116
+ return next.handle(request.clone({ headers }));
117
+ }
118
+ else {
119
+ return next.handle(request).pipe(retry(1), catchError((error) => {
120
+ let errorMessage = '';
121
+ if (error.error instanceof ErrorEvent) {
122
+ // client-side error
123
+ errorMessage = `Error: ${error.error.message}`;
124
+ }
125
+ else {
126
+ // server-side error
127
+ if (error.error.errors) {
128
+ errorMessage = error.error.errors;
129
+ }
130
+ else if (error.error.message) {
131
+ errorMessage = error.error.message;
132
+ }
133
+ else {
134
+ errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
135
+ }
136
+ }
137
+ this.toastr.warning(`An unexpected error occurred...${errorMessage}`);
138
+ return throwError(errorMessage);
139
+ }));
140
+ }
141
+ }
142
+ }
143
+ HttpErrorInterceptor.ɵprov = ɵɵdefineInjectable({ factory: function HttpErrorInterceptor_Factory() { return new HttpErrorInterceptor(ɵɵinject(ToastrService), ɵɵinject(NGXLogger)); }, token: HttpErrorInterceptor, providedIn: "root" });
144
+ HttpErrorInterceptor.decorators = [
145
+ { type: Injectable, args: [{
146
+ providedIn: 'root',
147
+ },] }
148
+ ];
149
+ HttpErrorInterceptor.ctorParameters = () => [
150
+ { type: ToastrService },
151
+ { type: NGXLogger }
152
152
  ];
153
153
 
154
- /*
155
- * Copyright 2015-2020 Ritense BV, the Netherlands.
156
- *
157
- * Licensed under EUPL, Version 1.2 (the "License");
158
- * you may not use this file except in compliance with the License.
159
- * You may obtain a copy of the License at
160
- *
161
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
162
- *
163
- * Unless required by applicable law or agreed to in writing, software
164
- * distributed under the License is distributed on an "AS IS" basis,
165
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
- * See the License for the specific language governing permissions and
167
- * limitations under the License.
168
- */
169
- const ɵ0 = { title: 'Access Forbidden', error: 403 }, ɵ1 = { title: 'Not Found', error: 404 }, ɵ2 = { title: 'Internal Server Error', error: 500 }, ɵ3 = { title: 'Service Unavailable', error: 503 };
170
- const routes = [
171
- { path: '403', component: ErrorComponent, data: ɵ0 },
172
- { path: '404', component: ErrorComponent, data: ɵ1 },
173
- { path: '500', component: ErrorComponent, data: ɵ2 },
174
- { path: '503', component: ErrorComponent, data: ɵ3 },
175
- ];
176
- class ErrorRoutingModule {
177
- }
178
- ErrorRoutingModule.decorators = [
179
- { type: NgModule, args: [{
180
- declarations: [],
181
- imports: [CommonModule, RouterModule.forChild(routes)],
182
- exports: [RouterModule],
183
- providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
184
- },] }
154
+ /*
155
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
156
+ *
157
+ * Licensed under EUPL, Version 1.2 (the "License");
158
+ * you may not use this file except in compliance with the License.
159
+ * You may obtain a copy of the License at
160
+ *
161
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
162
+ *
163
+ * Unless required by applicable law or agreed to in writing, software
164
+ * distributed under the License is distributed on an "AS IS" basis,
165
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
+ * See the License for the specific language governing permissions and
167
+ * limitations under the License.
168
+ */
169
+ const ɵ0 = { title: 'Access Forbidden', error: 403 }, ɵ1 = { title: 'Not Found', error: 404 }, ɵ2 = { title: 'Internal Server Error', error: 500 }, ɵ3 = { title: 'Service Unavailable', error: 503 };
170
+ const routes = [
171
+ { path: '403', component: ErrorComponent, data: ɵ0 },
172
+ { path: '404', component: ErrorComponent, data: ɵ1 },
173
+ { path: '500', component: ErrorComponent, data: ɵ2 },
174
+ { path: '503', component: ErrorComponent, data: ɵ3 },
175
+ ];
176
+ class ErrorRoutingModule {
177
+ }
178
+ ErrorRoutingModule.decorators = [
179
+ { type: NgModule, args: [{
180
+ declarations: [],
181
+ imports: [CommonModule, RouterModule.forChild(routes)],
182
+ exports: [RouterModule],
183
+ providers: [{ provide: HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
184
+ },] }
185
185
  ];
186
186
 
187
- /*
188
- * Copyright 2015-2020 Ritense BV, the Netherlands.
189
- *
190
- * Licensed under EUPL, Version 1.2 (the "License");
191
- * you may not use this file except in compliance with the License.
192
- * You may obtain a copy of the License at
193
- *
194
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
195
- *
196
- * Unless required by applicable law or agreed to in writing, software
197
- * distributed under the License is distributed on an "AS IS" basis,
198
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
- * See the License for the specific language governing permissions and
200
- * limitations under the License.
201
- */
202
- class SecurityModule {
203
- }
204
- SecurityModule.decorators = [
205
- { type: NgModule, args: [{
206
- declarations: [ErrorComponent],
207
- imports: [ErrorRoutingModule],
208
- exports: [ErrorComponent],
209
- providers: [AuthGuardService],
210
- },] }
187
+ /*
188
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
189
+ *
190
+ * Licensed under EUPL, Version 1.2 (the "License");
191
+ * you may not use this file except in compliance with the License.
192
+ * You may obtain a copy of the License at
193
+ *
194
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
195
+ *
196
+ * Unless required by applicable law or agreed to in writing, software
197
+ * distributed under the License is distributed on an "AS IS" basis,
198
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ * See the License for the specific language governing permissions and
200
+ * limitations under the License.
201
+ */
202
+ class SecurityModule {
203
+ }
204
+ SecurityModule.decorators = [
205
+ { type: NgModule, args: [{
206
+ declarations: [ErrorComponent],
207
+ imports: [ErrorRoutingModule],
208
+ exports: [ErrorComponent],
209
+ providers: [AuthGuardService],
210
+ },] }
211
211
  ];
212
212
 
213
- class UserProviderService {
214
- constructor(configService, injector, http, logger) {
215
- this.configService = configService;
216
- this.injector = injector;
217
- this.http = http;
218
- this.logger = logger;
219
- this.valtimoApiConfig = configService.config.valtimoApi;
220
- this.userService = injector.get(configService.config.authentication.authProviders.userServiceProvider);
221
- this.logger.debug('Loading UserProviderService service', this.userService);
222
- }
223
- getUserSubject() {
224
- this.logger.debug('Delegating UserProviderService::getUserIdentity');
225
- return this.userService.getUserSubject();
226
- }
227
- logout() {
228
- this.logger.debug('Delegating UserProviderService::logout');
229
- return this.userService.logout();
230
- }
231
- getToken() {
232
- return __awaiter(this, void 0, void 0, function* () {
233
- this.logger.debug('Delegating UserProviderService::getToken');
234
- return this.userService.getToken();
235
- });
236
- }
237
- updateToken(minValidity) {
238
- return __awaiter(this, void 0, void 0, function* () {
239
- this.logger.debug('Delegating UserProviderService::updateToken');
240
- if (this.userService.updateToken) {
241
- return this.userService.updateToken(minValidity);
242
- }
243
- else {
244
- return new Promise(resolve => resolve(true));
245
- }
246
- });
247
- }
248
- getEmailNotificationSettings() {
249
- this.logger.debug('getEmailNotificationSettings');
250
- return this.http.get(`${this.valtimoApiConfig.endpointUri}email-notification-settings`);
251
- }
252
- updateEmailNotificationSettings(settings) {
253
- this.logger.debug('updateEmailNotificationSettings', settings);
254
- return this.http.put(`${this.valtimoApiConfig.endpointUri}email-notification-settings`, settings);
255
- }
256
- }
257
- UserProviderService.ɵprov = ɵɵdefineInjectable({ factory: function UserProviderService_Factory() { return new UserProviderService(ɵɵinject(ConfigService), ɵɵinject(INJECTOR), ɵɵinject(HttpClient), ɵɵinject(NGXLogger)); }, token: UserProviderService, providedIn: "root" });
258
- UserProviderService.decorators = [
259
- { type: Injectable, args: [{
260
- providedIn: 'root',
261
- },] }
262
- ];
263
- UserProviderService.ctorParameters = () => [
264
- { type: ConfigService },
265
- { type: Injector },
266
- { type: HttpClient },
267
- { type: NGXLogger }
213
+ class UserProviderService {
214
+ constructor(configService, injector, http, logger) {
215
+ this.configService = configService;
216
+ this.injector = injector;
217
+ this.http = http;
218
+ this.logger = logger;
219
+ this.valtimoApiConfig = configService.config.valtimoApi;
220
+ this.userService = injector.get(configService.config.authentication.authProviders.userServiceProvider);
221
+ this.logger.debug('Loading UserProviderService service', this.userService);
222
+ }
223
+ getUserSubject() {
224
+ this.logger.debug('Delegating UserProviderService::getUserIdentity');
225
+ return this.userService.getUserSubject();
226
+ }
227
+ logout() {
228
+ this.logger.debug('Delegating UserProviderService::logout');
229
+ return this.userService.logout();
230
+ }
231
+ getToken() {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ this.logger.debug('Delegating UserProviderService::getToken');
234
+ return this.userService.getToken();
235
+ });
236
+ }
237
+ updateToken(minValidity) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ this.logger.debug('Delegating UserProviderService::updateToken');
240
+ if (this.userService.updateToken) {
241
+ return this.userService.updateToken(minValidity);
242
+ }
243
+ else {
244
+ return new Promise(resolve => resolve(true));
245
+ }
246
+ });
247
+ }
248
+ getEmailNotificationSettings() {
249
+ this.logger.debug('getEmailNotificationSettings');
250
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}email-notification-settings`);
251
+ }
252
+ updateEmailNotificationSettings(settings) {
253
+ this.logger.debug('updateEmailNotificationSettings', settings);
254
+ return this.http.put(`${this.valtimoApiConfig.endpointUri}email-notification-settings`, settings);
255
+ }
256
+ }
257
+ UserProviderService.ɵprov = ɵɵdefineInjectable({ factory: function UserProviderService_Factory() { return new UserProviderService(ɵɵinject(ConfigService), ɵɵinject(INJECTOR), ɵɵinject(HttpClient), ɵɵinject(NGXLogger)); }, token: UserProviderService, providedIn: "root" });
258
+ UserProviderService.decorators = [
259
+ { type: Injectable, args: [{
260
+ providedIn: 'root',
261
+ },] }
262
+ ];
263
+ UserProviderService.ctorParameters = () => [
264
+ { type: ConfigService },
265
+ { type: Injector },
266
+ { type: HttpClient },
267
+ { type: NGXLogger }
268
268
  ];
269
269
 
270
- /*
271
- * Copyright 2015-2020 Ritense BV, the Netherlands.
272
- *
273
- * Licensed under EUPL, Version 1.2 (the "License");
274
- * you may not use this file except in compliance with the License.
275
- * You may obtain a copy of the License at
276
- *
277
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
278
- *
279
- * Unless required by applicable law or agreed to in writing, software
280
- * distributed under the License is distributed on an "AS IS" basis,
281
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
282
- * See the License for the specific language governing permissions and
283
- * limitations under the License.
270
+ /*
271
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
272
+ *
273
+ * Licensed under EUPL, Version 1.2 (the "License");
274
+ * you may not use this file except in compliance with the License.
275
+ * You may obtain a copy of the License at
276
+ *
277
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
278
+ *
279
+ * Unless required by applicable law or agreed to in writing, software
280
+ * distributed under the License is distributed on an "AS IS" basis,
281
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
282
+ * See the License for the specific language governing permissions and
283
+ * limitations under the License.
284
284
  */
285
285
 
286
- /**
287
- * Generated bundle index. Do not edit.
286
+ /**
287
+ * Generated bundle index. Do not edit.
288
288
  */
289
289
 
290
290
  export { AuthGuardService, ErrorComponent, InterceptorSkip, InterceptorSkipHeader, SecurityModule, UserProviderService, ErrorRoutingModule as ɵa, HttpErrorInterceptor as ɵb };
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-security.js","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.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-2020 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-2020 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-2020 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-2020 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 retry(1),\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.message) {\n errorMessage = error.error.message;\n } else {\n errorMessage = `Error Code: ${error.status}\\nMessage: ${error.message}`;\n }\n }\n this.toastr.warning(`An unexpected error occurred...${errorMessage}`);\n return throwError(errorMessage);\n })\n );\n }\n }\n}\n","/*\n * Copyright 2015-2020 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-2020 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-2020 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/contract';\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}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}email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2020 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\nexport {ErrorRoutingModule as ɵa} from './lib/error/error-routing.module';\nexport {HttpErrorInterceptor as ɵb} from './lib/error/http-error.interceptor';"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,gBAAgB;IAG3B,YACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB;QADnB,aAAQ,GAAR,QAAQ,CAAU;QAChB,WAAM,GAAN,MAAM,CAAW;QAE3B,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;QAE1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAChE;;;;YAvBF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAJO,aAAa;YAJD,QAAQ;YAEpB,SAAS;;;AClBjB;;;;;;;;;;;;;;;MAyBa,cAAc;IAGzB,YAAoB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;KAAI;IAEtD,QAAQ;QACN,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE;YACrC,IAAI,CAAC,GAAG,GAAG;gBACT,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;gBAC9C,KAAK,EAAE,IAAI,CAAC,cAA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AC,6CAA6C,CAAC,CAAC;YACjE,IAAI,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;gBAChC,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;aAClD;iBAAM;gBACL,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;aAC9C;SACF;KAAA;IAEM,4BAA4B;QACjC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,6BAA6B,CAClE,CAAC;KACH;IAEM,+BAA+B,CACpC,QAAmC;QAEnC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE,QAAQ,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,6BAA6B,EACjE,QAAQ,CACT,CAAC;KACH;;;;YA7DF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAJO,aAAa;YAVD,QAAQ;YASpB,UAAU;YAPV,SAAS;;;AClBjB;;;;;;;;;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"valtimo-security.js","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.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-2020 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-2020 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-2020 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-2020 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 retry(1),\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.message) {\n errorMessage = error.error.message;\n } else {\n errorMessage = `Error Code: ${error.status}\\nMessage: ${error.message}`;\n }\n }\n this.toastr.warning(`An unexpected error occurred...${errorMessage}`);\n return throwError(errorMessage);\n })\n );\n }\n }\n}\n","/*\n * Copyright 2015-2020 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-2020 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-2020 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}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}email-notification-settings`,\n settings\n );\n }\n}\n","/*\n * Copyright 2015-2020 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\nexport {ErrorRoutingModule as ɵa} from './lib/error/error-routing.module';\nexport {HttpErrorInterceptor as ɵb} from './lib/error/http-error.interceptor';"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,gBAAgB;IAG3B,YACE,aAA4B,EACpB,QAAkB,EAChB,MAAiB;QADnB,aAAQ,GAAR,QAAQ,CAAU;QAChB,WAAM,GAAN,MAAM,CAAW;QAE3B,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;QAE1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAChE;;;;YAvBF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAJO,aAAa;YAJD,QAAQ;YAEpB,SAAS;;;AClBjB;;;;;;;;;;;;;;;MAyBa,cAAc;IAGzB,YAAoB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;KAAI;IAEtD,QAAQ;QACN,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE;YACrC,IAAI,CAAC,GAAG,GAAG;gBACT,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK;gBAC9C,KAAK,EAAE,IAAI,CAAC,cAAc,CA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