/**
 * Dashboard Authentication Middleware
 * Session-based auth with httpOnly cookies for CCS dashboard.
 */
/// <reference types="node" />
import type { IncomingMessage } from 'http';
import type { NextFunction, Request, Response } from 'express';
declare module 'express-session' {
    interface SessionData {
        authenticated: boolean;
        username: string;
    }
}
/**
 * Rate limiter for login attempts.
 * 5 attempts per 15 minutes per IP.
 */
export declare const loginRateLimiter: import("express-rate-limit").RateLimitRequestHandler;
/**
 * Create session middleware configured for CCS dashboard.
 */
export declare function createSessionMiddleware(): (req: Request, res: Response, next: NextFunction) => void;
/**
 * Auth middleware that protects all routes except public paths.
 * Only active when dashboard_auth.enabled = true.
 */
export declare function authMiddleware(req: Request, res: Response, next: NextFunction): void;
export declare function isLoopbackRemoteAddress(value: string | undefined): boolean;
export declare function isDashboardWebSocketOriginAllowed(req: IncomingMessage): boolean;
export declare function isDashboardWebSocketUpgradeAllowed(req: IncomingMessage): boolean;
export declare function getDashboardWebSocketRejectionStatus(req?: IncomingMessage): 401 | 403;
export declare function requireLocalAccessWhenAuthDisabled(req: Request, res: Response, error?: string): boolean;
//# sourceMappingURL=auth-middleware.d.ts.map