import { IncomingMessage } from "node:http"; import { AuthProvider, AuthResult } from "../types.js"; export declare const DEFAULT_API_KEY_HEADER_NAME = "X-API-Key"; /** * Configuration options for API key authentication */ export interface APIKeyConfig { /** * Valid API keys */ keys: string[]; /** * Name of the header containing the API key. * Note: Some SSE client libraries (including the standard EventSource API) * do not support custom headers. For these clients, the API key can also * be sent as a query parameter: ?api_key= or ?apiKey= * @default "X-API-Key" */ headerName?: string; } /** * API key-based authentication provider */ export declare class APIKeyAuthProvider implements AuthProvider { private config; constructor(config: APIKeyConfig); /** * Get the number of configured API keys */ getKeyCount(): number; /** * Get the configured header name */ getHeaderName(): string; authenticate(req: IncomingMessage): Promise; getAuthError(): { message: string; status: number; }; }