mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix usage of prefix and remove localstorage use in favour of our internal service
This commit is contained in:
@@ -26,6 +26,7 @@ import { UserRepresentation } from '@alfresco/js-api';
|
||||
import { map, catchError, tap } from 'rxjs/operators';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { JwtHelperService } from './jwt-helper.service';
|
||||
import { StorageService } from './storage.service';
|
||||
|
||||
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
|
||||
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30;
|
||||
@@ -43,6 +44,7 @@ export class AuthenticationService {
|
||||
|
||||
constructor(
|
||||
private appConfig: AppConfigService,
|
||||
private storageService: StorageService,
|
||||
private alfrescoApi: AlfrescoApiService,
|
||||
private cookie: CookieService,
|
||||
private logService: LogService) {
|
||||
@@ -292,7 +294,7 @@ export class AuthenticationService {
|
||||
* @returns Auth token string
|
||||
*/
|
||||
getToken(): string {
|
||||
return localStorage.getItem(JwtHelperService.USER_ACCESS_TOKEN);
|
||||
return this.storageService.getItem(JwtHelperService.USER_ACCESS_TOKEN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user