Newer
Older
import {OAuthStorage} from 'angular-oauth2-oidc';
import {Injectable} from '@angular/core';
/**
* Custom storage in memory for sensible data like token
* (cf best practice https://auth0.com/docs/security/store-tokens)
*/
@Injectable()
export class DlcmStorage extends OAuthStorage {
private storageValues: Map<string, string>;
constructor() {
super();
this.storageValues = new Map<string, string>();
}
getItem(key: string): string | null {
return this.storageValues[key];
}
removeItem(key: string): void {
this.storageValues.delete(key);
}
setItem(key: string, data: string): void {