mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 19:43:04 +00:00
Add withCredentials param to ServerAuthService's checkAuthenticationCookie method
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import { filter, map, switchMap, take } from 'rxjs/operators';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpHeaders } from '@angular/common/http';
|
import { HttpHeaders } from '@angular/common/http';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import { filter, map, switchMap, take } from 'rxjs/operators';
|
||||||
|
|
||||||
import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service';
|
||||||
import { AuthStatus } from './models/auth-status.model';
|
import { AuthStatus } from './models/auth-status.model';
|
||||||
@@ -59,6 +59,7 @@ export class ServerAuthService extends AuthService {
|
|||||||
headers = headers.append('X-Requested-With', referer);
|
headers = headers.append('X-Requested-With', referer);
|
||||||
}
|
}
|
||||||
options.headers = headers;
|
options.headers = headers;
|
||||||
|
options.withCredentials = true;
|
||||||
return this.authRequestService.getRequest('status', options).pipe(
|
return this.authRequestService.getRequest('status', options).pipe(
|
||||||
map((status: NormalizedAuthStatus) => Object.assign(new AuthStatus(), status))
|
map((status: NormalizedAuthStatus) => Object.assign(new AuthStatus(), status))
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user