@mercury-labs/nest-auth
Version:
Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.
17 lines (16 loc) • 754 B
TypeScript
import { Observable } from 'rxjs';
import { IAuthDefinitions, IAuthResponse } from '../definitions';
import { IJwtPayload } from '../entities';
import { AuthRepository } from '../repositories';
import { TokenService } from '../services';
export interface IGetUserByJwtTokenActionOptions {
jwtPayload: IJwtPayload;
accessToken: string;
}
export declare class GetUserByJwtTokenAction {
readonly authDefinitions: IAuthDefinitions;
readonly authRepository: AuthRepository;
readonly tokenService: TokenService;
constructor(authDefinitions: IAuthDefinitions, authRepository: AuthRepository, tokenService: TokenService);
handle({ jwtPayload, accessToken, }: IGetUserByJwtTokenActionOptions): Observable<IAuthResponse | undefined>;
}