import type express from "express"; /** Minimum length for MCP_API_KEY. 24 characters is the floor; `openssl rand -hex 32` gives 64. */ export declare const MIN_API_KEY_LENGTH = 24; export interface HttpAuthConfig { /** Bearer token every client must present. null only when the dev-only opt-out was explicitly enabled. */ apiKey: string | null; } /** * Paths reachable without the API key: the health probe, and the OAuth * redirect target, because Clio's browser redirect cannot carry a bearer * token. Everything else, including unknown paths, requires the key. */ export declare const PUBLIC_PATHS: ReadonlySet; /** * Resolve the HTTP-mode auth configuration from the environment, or throw a * clear error. Called at startup so a misconfigured server never listens. * * - MCP_API_KEY set: must be at least MIN_API_KEY_LENGTH characters. * - MCP_API_KEY unset: only allowed with MCP_ALLOW_UNAUTHENTICATED=true (local development). */ export declare function resolveHttpAuthConfig(env?: NodeJS.ProcessEnv): HttpAuthConfig; /** Constant-time check of the Authorization header against the configured key. */ export declare function isAuthorized(config: HttpAuthConfig, authorizationHeader: string | undefined): boolean; /** Express middleware: 401 on every path except PUBLIC_PATHS unless the bearer key matches. */ export declare function createApiKeyMiddleware(config: HttpAuthConfig): express.RequestHandler; //# sourceMappingURL=httpAuth.d.ts.map