@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.
@@ -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 { HttpResponse, HttpErrorResponse, HttpParams, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';
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 HttpResponse) {
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 (isStatusOk && (isUrlCyberLogin || isUrlAcvLogin)) {
1437
+ if (isUrlCyberLogin || isUrlAcvLogin) {
1440
1438
  this._isIamSessionExpired.next(true);
1441
1439
  }
1442
1440
  }