import { IncomingMessage } from "node:http"; import { Algorithm } from "jsonwebtoken"; import { AuthProvider, AuthResult } from "../types.js"; /** * Configuration options for JWT authentication */ export interface JWTConfig { /** * Secret key for verifying JWT tokens */ secret: string; /** * Allowed JWT algorithms * @default ["HS256"] */ algorithms?: Algorithm[]; /** * Name of the header containing the JWT token * @default "Authorization" */ headerName?: string; /** * Whether to require "Bearer" prefix in Authorization header * @default true */ requireBearer?: boolean; } /** * JWT-based authentication provider */ export declare class JWTAuthProvider implements AuthProvider { private config; constructor(config: JWTConfig); authenticate(req: IncomingMessage): Promise; getAuthError(): { message: string; status: number; }; }