monkey-front-core 0.0.326 → 0.0.328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/core/directives/monkeyecx-security-directive.mjs +3 -1
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-error.interceptor.mjs +1 -12
- package/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +1 -8
- package/fesm2015/monkey-front-core.mjs +2 -18
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +2 -18
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.328.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.326.tgz +0 -0
|
@@ -3827,6 +3827,8 @@ class MonkeyEcxSecurityDirective {
|
|
|
3827
3827
|
handleAccess() {
|
|
3828
3828
|
const { roles, byExclusion } = this;
|
|
3829
3829
|
let display = 'none';
|
|
3830
|
+
console.log('this.tokenCredentials');
|
|
3831
|
+
console.log(this.tokenCredentials);
|
|
3830
3832
|
const found = roles?.indexOf(this.getRole());
|
|
3831
3833
|
if (byExclusion) {
|
|
3832
3834
|
display = 'block';
|
|
@@ -5321,36 +5323,25 @@ class MonkeyEcxHttpConfigErrorInterceptor {
|
|
|
5321
5323
|
// no to do
|
|
5322
5324
|
}
|
|
5323
5325
|
async handle(request, error) {
|
|
5324
|
-
console.log('=====================6');
|
|
5325
5326
|
if (this.monkeyecxAuthenticationService.refreshShouldHappen(error)) {
|
|
5326
5327
|
await this.monkeyecxAuthenticationService?.refreshToken();
|
|
5327
5328
|
const headers = await this.monkeyecxAuthenticationService.getRequestWithHeadersAsync(request);
|
|
5328
5329
|
return headers;
|
|
5329
5330
|
}
|
|
5330
|
-
console.log('=====================7');
|
|
5331
5331
|
return throwError(null);
|
|
5332
5332
|
}
|
|
5333
5333
|
intercept(request, next) {
|
|
5334
|
-
console.log('=====================1');
|
|
5335
5334
|
return next.handle(request).pipe(map((event) => {
|
|
5336
5335
|
return event;
|
|
5337
5336
|
}), catchError((error) => {
|
|
5338
|
-
console.log('=====================2');
|
|
5339
|
-
console.log(error);
|
|
5340
5337
|
return from(this.handle(request, error)).pipe(take(1), map((event) => {
|
|
5341
|
-
console.log('=====================3');
|
|
5342
|
-
console.log(event);
|
|
5343
5338
|
return event;
|
|
5344
5339
|
}), mergeMap((resp) => {
|
|
5345
|
-
console.log('=====================4');
|
|
5346
|
-
console.log(resp);
|
|
5347
5340
|
request = request.clone({
|
|
5348
5341
|
setHeaders: resp
|
|
5349
5342
|
});
|
|
5350
5343
|
return next.handle(request);
|
|
5351
5344
|
}), catchError(() => {
|
|
5352
|
-
console.log('=====================5');
|
|
5353
|
-
console.log(error);
|
|
5354
5345
|
this.monkeyecxErrorHandlingService.handleError(error, 'refresh_token');
|
|
5355
5346
|
return throwError(error);
|
|
5356
5347
|
}));
|
|
@@ -5396,21 +5387,14 @@ class MonkeyEcxHttpConfigHeaderInterceptor {
|
|
|
5396
5387
|
return resp;
|
|
5397
5388
|
}
|
|
5398
5389
|
intercept(request, next) {
|
|
5399
|
-
console.log('****************1');
|
|
5400
5390
|
return from(this.handle(request)).pipe(take(1), map((event) => {
|
|
5401
|
-
console.log('****************2');
|
|
5402
|
-
console.log(event);
|
|
5403
5391
|
return event;
|
|
5404
5392
|
}), mergeMap((resp) => {
|
|
5405
|
-
console.log('****************3');
|
|
5406
|
-
console.log(resp);
|
|
5407
5393
|
request = request.clone({
|
|
5408
5394
|
setHeaders: resp
|
|
5409
5395
|
});
|
|
5410
5396
|
return next.handle(request);
|
|
5411
5397
|
}), catchError((error) => {
|
|
5412
|
-
console.log('****************4');
|
|
5413
|
-
console.log(error);
|
|
5414
5398
|
this.errorHandlingService.handleError(error);
|
|
5415
5399
|
return throwError(error);
|
|
5416
5400
|
}));
|