UNPKG

@stardyn/angular-auth

Version:

Angular Authentication Service - Lightweight, configurable authentication service for Angular applications with token management and role-based access control

23 lines (22 loc) 844 B
import { StorageService } from '@stardyn/angular-data-source'; import { ModuleConsoleService } from "@stardyn/angular-console"; import { AuthResponse } from '../models/AuthResponse'; import { XConUser } from '../models/XConUser'; export declare class AuthTokenManager { private storageService; private dconsole; private readonly TOKEN_KEY; private readonly USER_KEY; private readonly TOKEN_EXPIRES_KEY; private readonly TOKEN_TYPE_KEY; constructor(storageService: StorageService, dconsole: ModuleConsoleService); storeTokens(response: AuthResponse): void; private calculateExpirationTime; storeUser(user: XConUser): void; getToken(): string | null; getTokenExpiration(): number | null; getStoredUser(): XConUser | null; clearTokens(): void; clearUser(): void; clearAll(): void; }