introduce a session manager

This commit is contained in:
Sven Czarnian committed 2022-11-04 21:03:20 +01:00
1 parent 33d4f14878
commit acea193aa0
1 file changed
+13
+13
View File
@@ -0,0 +1,13 @@
export class Session {
static reset(): void {
localStorage.removeItem('token');
}
static setBearerToken(token: string): void {
localStorage.setItem('token', token);
}
static bearerToken(): string | null {
return localStorage.getItem('token');
}
}