UNPKG

@mercury-labs/auth

Version:

Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.

10 lines (9 loc) 442 B
/// <reference types="node" /> import { NestMiddleware } from '@nestjs/common'; import { IncomingMessage, ServerResponse } from 'http'; import { IAuthDefinitions } from '../../domain'; export declare class BasicAuthMiddleware implements NestMiddleware { protected readonly authDefinitions: IAuthDefinitions; constructor(authDefinitions: IAuthDefinitions); use(req: IncomingMessage, res: ServerResponse, next: () => void): void; }