Revision 61435
Added by Konstantinos Spyrou almost 3 years ago
auth-guard.service.ts | ||
---|---|---|
10 | 10 |
constructor (private authenticationService: AuthenticationService, private router: Router) {} |
11 | 11 |
|
12 | 12 |
canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { |
13 |
if ( this.authenticationService.getIsUserLoggedIn() ) { return true; } |
|
13 | 14 |
|
14 |
if ( (getCookie('openAIREUser') !== null) && |
|
15 |
(getCookie('openAIREUser') !== '') && |
|
16 |
this.authenticationService.getIsUserLoggedIn() ) { return true; } |
|
17 |
|
|
18 |
if ( (getCookie('openAIREUser') !== null) && (getCookie('openAIREUser') !== '') ) { return true; } |
|
19 |
|
|
20 | 15 |
/* If no cookie was found, clear the app's session. |
21 | 16 |
The user may have logged out using another OpenAIRE portal */ |
22 | 17 |
sessionStorage.clear(); |
Also available in: Unified diff
removed openAIREUser cookie usage