@httpc/kit
Version:
httpc toolbox for building function-based API with minimal code and end-to-end type safety
10 lines (9 loc) • 396 B
TypeScript
import { HttpCServerMiddleware } from "@httpc/server";
export type BasicCredential = {
username: string;
password: string;
};
export type BasicAuthenticationMiddlewareOptions = {
onAuthenticate?: (credentials: BasicCredential) => Promise<IUser>;
};
export declare function BasicAuthenticationMiddleware(options?: BasicAuthenticationMiddlewareOptions): HttpCServerMiddleware;