@dsivd/prestations-ng 16.5.4-beta.1 → 16.5.4-beta.3
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/dsivd-prestations-ng-v16.5.4-beta.3.tgz +0 -0
- package/esm2020/sdk-redirect/iam-expired-interceptor.service.mjs +4 -6
- package/fesm2015/dsivd-prestations-ng.mjs +3 -5
- package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
- package/fesm2020/dsivd-prestations-ng.mjs +3 -5
- package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/dsivd-prestations-ng-v16.5.4-beta.1.tgz +0 -0
|
@@ -5,7 +5,7 @@ import { ActivatedRoute, NavigationStart, RouterModule, NavigationEnd, RouterLin
|
|
|
5
5
|
import { of, BehaviorSubject, combineLatest, Subject, throwError, tap as tap$1, concat, toArray, EMPTY, merge, withLatestFrom, debounceTime as debounceTime$1, switchMap as switchMap$1, map as map$1 } from 'rxjs';
|
|
6
6
|
import { map, shareReplay, debounceTime, catchError, switchMap, tap, first, filter, throttleTime, mergeMap, share, finalize, distinctUntilChanged } from 'rxjs/operators';
|
|
7
7
|
import * as i1 from '@angular/common/http';
|
|
8
|
-
import {
|
|
8
|
+
import { HttpResponseBase, HttpErrorResponse, HttpParams, HttpEventType, HttpResponse, HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';
|
|
9
9
|
import * as i3 from '@angular/forms';
|
|
10
10
|
import { NgModel, NgForm, FormsModule } from '@angular/forms';
|
|
11
11
|
import * as i2 from '@angular/common';
|
|
@@ -1420,7 +1420,7 @@ class IamExpiredInterceptorService {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
intercept(req, next) {
|
|
1422
1422
|
return next.handle(req).pipe(map(event => {
|
|
1423
|
-
if (event instanceof
|
|
1423
|
+
if (event instanceof HttpResponseBase) {
|
|
1424
1424
|
if (hasIamExpiredHeader(event) ||
|
|
1425
1425
|
isRedirectionToLogin(event)) {
|
|
1426
1426
|
this._isIamSessionExpired.next(true);
|
|
@@ -1431,12 +1431,10 @@ class IamExpiredInterceptorService {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
handleError(err) {
|
|
1433
1433
|
if (err instanceof HttpErrorResponse) {
|
|
1434
|
-
// status is 200, but still an error since
|
|
1435
1434
|
// login page is returned when xml/json is expected
|
|
1436
|
-
const isStatusOk = err.status === 200 /* HttpStatusCode.Ok */;
|
|
1437
1435
|
const isUrlCyberLogin = err.url.includes(CYBER_LOGIN_PATH);
|
|
1438
1436
|
const isUrlAcvLogin = err.url.includes(ACV_LOGIN_PATH);
|
|
1439
|
-
if (
|
|
1437
|
+
if (isUrlCyberLogin || isUrlAcvLogin) {
|
|
1440
1438
|
this._isIamSessionExpired.next(true);
|
|
1441
1439
|
}
|
|
1442
1440
|
}
|