UNPKG

bb-inspired

Version:

Core library for BB-inspired NestJS backend

17 lines (16 loc) 784 B
import { ExternalAuthOptions, AuthRequest, AuthToken, AuthValidationResult } from '../../../interfaces/auth.interfaces'; import { CacheService } from '../../cache/cache.service'; export declare class ExternalAuthService { private readonly options; private readonly cacheService; private readonly logger; private readonly httpClient; private readonly cacheEnabled; private readonly cacheTtl; constructor(options: ExternalAuthOptions, cacheService: CacheService); authenticate(credentials: AuthRequest): Promise<AuthToken>; validateToken(token: string): Promise<AuthValidationResult>; refreshToken(refreshToken: string): Promise<AuthToken>; logout(token: string, userId?: string | number): Promise<boolean>; private handleRequestError; }