[ADF-4665] [ADF] - Application is refreshed when you have two instances of application opened (#4849)

* refactoring getValueFromToken and fix user token refresh

* refactoring getValueFromToken and fix user token refresh

* refactoring getValueFromToken and fix user token refres

* fix unit test
This commit is contained in:
Eugenio Romano
2019-06-14 16:02:12 +01:00
committed by GitHub
parent 4733bc7d3b
commit f47cebc0a4
11 changed files with 94 additions and 93 deletions

View File

@@ -25,6 +25,7 @@ import { AppConfigService, AppConfigValues } from '../app-config/app-config.serv
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';
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30;
@@ -290,7 +291,7 @@ export class AuthenticationService {
* @returns Auth token string
*/
getToken(): string {
return localStorage.getItem('access_token');
return localStorage.getItem(JwtHelperService.USER_ACCESS_TOKEN);
}
/**