Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public loggedIn(): boolean {
if (this.runMode === 'DEMO') {
return true;
} else {
let tokenExpired: boolean = true;
try {
tokenExpired = tokenNotExpired('unfetterUiToken');
} catch (e) { }
return tokenExpired && this.getUser() !== null && this.getUser().approved === true && !this.getUser().locked;
}
}
loggedIn() {
let result: boolean;
result = tokenNotExpired("id_token");
if(!result){
return false;
}
return result;
}
}
isLoggedIn() {
if (!tokenNotExpired()) {
localStorage.clear();
}
return tokenNotExpired();
}
}
loggedIn() {
return tokenNotExpired();
}
}
loggedIn() {
return tokenNotExpired();
}
}
loggedIn() {
return tokenNotExpired();
}
}
loggedIn() {
return tokenNotExpired();
}
}
loggedIn() {
return tokenNotExpired();
}
}
public loggedIn(): boolean {
let token = this.storageService.getToken(TokenType.AccessToken);
let expired = tokenNotExpired('token', token);
return expired;
}
isLoggedIn(): boolean {
let token = this.token.getToken();
return tokenNotExpired(null, token);
}