import IAuthStrategy from "./IAuthStrategy" ; const AUTH_TOKEN_STORAGE_KEY = "jwt:authToken" ; export default class JwtAuthStrategy implements IAuthStrategy { name = "jwt" ; displayName = "JWT" ; async init ( ) { } async login ( jwt ) { window . localStorage . setItem ( AUTH_TOKEN_STORAGE_KEY , jwt ) ; } async logout ( ) { window . localStorage . removeItem ( AUTH_TOKEN_STORAGE_KEY ) ; } async getAuthToken ( ) { return window . localStorage . getItem ( AUTH_TOKEN_STORAGE_KEY ) ; } }