UNPKG

645 BTypeScriptView Raw
1import { CanActivate, ExecutionContext } from '@nestjs/common';
2import { Type } from './interfaces';
3import { IAuthModuleOptions } from './interfaces/auth-module.options';
4export type IAuthGuard = CanActivate & {
5 logIn<TRequest extends {
6 logIn: Function;
7 } = any>(request: TRequest): Promise<void>;
8 handleRequest<TUser = any>(err: any, user: any, info: any, context: ExecutionContext, status?: any): TUser;
9 getAuthenticateOptions(context: ExecutionContext): IAuthModuleOptions | undefined;
10 getRequest(context: ExecutionContext): any;
11};
12export declare const AuthGuard: (type?: string | string[]) => Type<IAuthGuard>;