@mercury-labs/auth
Version:
Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.
19 lines (18 loc) • 932 B
TypeScript
import { ExecutionContext } from '@nestjs/common';
import { Reflector } from '@nestjs/core';
import { Observable } from 'rxjs';
import { IAuthDefinitions } from '../../domain';
import { AuthBasicGuard } from './auth.basic.guard';
import { AuthJwtGuard } from './auth.jwt.guard';
import { AuthRefreshTokenGuard } from './auth.refresh-token.guard';
export declare const IS_INTERNAL_ONLY: string;
export declare const IS_PUBLIC_KEY: string;
export declare const IS_REFRESH_TOKEN_KEY: string;
export declare class AuthGlobalGuard extends AuthJwtGuard {
private readonly _options;
private readonly _reflector;
private readonly _basicAuthGuard;
private readonly _refreshTokenGuard;
constructor(_options: IAuthDefinitions, _reflector: Reflector, _basicAuthGuard: AuthBasicGuard, _refreshTokenGuard: AuthRefreshTokenGuard);
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean>;
}