UNPKG

alinea

Version:
11 lines (10 loc) 423 B
import type { AuthApi, AuthedContext, RequestContext } from 'alinea/core/Connection'; export interface Verifier { (username: string, password: string): boolean | Promise<boolean>; } export declare class BasicAuth implements AuthApi { #private; constructor(context: RequestContext, verify: Verifier); authenticate(request: Request): Promise<Response>; verify(request: Request): Promise<AuthedContext>; }