import type { IncomingMessage, ServerResponse } from 'http';
import type { TokenManager } from './token-manager.js';
export interface AuthMiddlewareContext {
    pathname: string;
    req: IncomingMessage;
    res: ServerResponse;
    tokenManager: TokenManager;
    secretKey: string;
    unauthenticatedPaths?: Set<string>;
}
export declare function extractAuthToken(req: IncomingMessage): string | null;
export declare function isLocalhostRequest(req: IncomingMessage): boolean;
export declare function setAuthCookie(res: ServerResponse, token: string, expiresAt: Date): void;
export declare function authMiddleware(ctx: AuthMiddlewareContext): boolean;
//# sourceMappingURL=middleware.d.ts.map