auth
This commit is contained in:
@@ -38,4 +38,13 @@ export class KeycloakService {
|
||||
isLoggedIn(): boolean {
|
||||
return this.keycloak.authenticated ?? false;
|
||||
}
|
||||
|
||||
async getToken(): Promise<string | undefined> {
|
||||
try {
|
||||
await this.keycloak.updateToken(30);
|
||||
return this.keycloak.token;
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user