/** * Web Standard authentication handler. * * Authenticates Web Standard Request objects by shimming them into * Node.js IncomingMessage format, allowing existing AuthProvider * implementations to work unchanged. */ import { IncomingMessage } from 'node:http'; import { AuthConfig, AuthResult } from '../auth/types.js'; /** * Create a minimal IncomingMessage shim from a Web Standard Request. * Existing AuthProvider implementations only read req.headers, req.url, * and req.socket.remoteAddress — this shim satisfies all three. */ export declare function createIncomingMessageShim(request: Request, sourceIp?: string): IncomingMessage; /** * Authenticate a Web Standard Request using the framework's auth system. * * Returns `{ result }` on success or `{ response }` on failure. * The failure response is a fully-formed Web Standard Response with * proper status code, WWW-Authenticate header, and JSON error body. */ export declare function authenticateWebRequest(request: Request, authConfig: AuthConfig | undefined, context: string, sourceIp?: string): Promise<{ result: AuthResult; } | { response: Response; }>;