UNPKG

nest-phylax

Version:

Security library for NestJS

21 lines (20 loc) 751 B
import { Jwt, PasswordEncoder, UserRepository } from '../../common'; import { PasswordLoginArgs } from './types'; import { JwtGenerationOptions } from '../types'; export declare class JwtAuthService { private readonly options; private readonly userRepository; private readonly passwordEncoder; constructor(options: JwtGenerationOptions, userRepository: UserRepository, passwordEncoder: PasswordEncoder); passwordLogin({ email, password, config }: PasswordLoginArgs): Promise<{ accessToken: Jwt; refreshToken?: Jwt; }>; refreshToken(refreshToken: string): Promise<{ accessToken: { value: string; sub: string; role: string; }; }>; }