mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3593] remove rxjs-compat layer (#3886)
* remove rxjs-compat layer * add rxjs linter * observable new instead of create * lint fixes * disable rxjs-no-subject-value for certain scenarios * fix auth rxjs
This commit is contained in:
committed by
Eugenio Romano
parent
ccc52d40dd
commit
f5a7b07370
@@ -27,7 +27,7 @@ import { map, catchError, tap } from 'rxjs/operators';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
|
||||
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30 ;
|
||||
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30;
|
||||
|
||||
@Injectable()
|
||||
export class AuthenticationService {
|
||||
@@ -50,10 +50,10 @@ export class AuthenticationService {
|
||||
* @returns True if logged in, false otherwise
|
||||
*/
|
||||
isLoggedIn(): boolean {
|
||||
if (!this.isOauth() && this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
||||
return false;
|
||||
}
|
||||
return this.alfrescoApi.getInstance().isLoggedIn();
|
||||
if (!this.isOauth() && this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
||||
return false;
|
||||
}
|
||||
return this.alfrescoApi.getInstance().isLoggedIn();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,7 +284,7 @@ export class AuthenticationService {
|
||||
}
|
||||
|
||||
addTokenToHeader(headersArg?: HttpHeaders): Observable<HttpHeaders> {
|
||||
return Observable.create(async (observer: Observer<any>) => {
|
||||
return new Observable((observer: Observer<any>) => {
|
||||
let headers = headersArg;
|
||||
if (!headers) {
|
||||
headers = new HttpHeaders();
|
||||
|
Reference in New Issue
Block a user