import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class AuthService {
  readonly JWT_ITEM = '@app/token';

  getAuthorizationToken() {
    return localStorage.getItem(this.JWT_ITEM);
  }

  setAuthorizationToken(token: string) {
    localStorage.setItem(this.JWT_ITEM, token);
  }

  clearAuthorizationToken() {
    localStorage.removeItem(this.JWT_ITEM);
  }
}
