import { IncomingMessage, ServerResponse } from 'node:http'; import { AuthConfig, AuthResult } from '../../auth/types.js'; /** * Shared authentication handler for transport layers. * Handles both API Key and OAuth authentication with proper error responses. * * @param req - Incoming HTTP request * @param res - HTTP response object * @param authConfig - Authentication configuration from transport * @param context - Description of the context (e.g., "initialize", "message", "SSE connection") * @returns AuthResult if authenticated, null if authentication failed (response already sent) */ export declare function handleAuthentication(req: IncomingMessage, res: ServerResponse, authConfig: AuthConfig | undefined, context: string): Promise;