import type { AuthResult } from '@cepseudo/shared'; import type { UserService } from './user_service.js'; /** * Centralized authentication middleware for all components. * * Replaces the duplicated authenticateRequest/authenticateUser methods * found in AssetsManager, TilesetManager, MapManager, and CustomTableManager. * * @example * ```typescript * const result = await authMiddleware.authenticate(req) * if (!result.success) { * return result.response * } * const userRecord = result.userRecord * ``` */ export declare class AuthMiddleware { #private; constructor(userService: UserService); /** * Authenticate a request and return the user record. * * Handles all auth modes: * - Auth disabled → creates anonymous user via UserService * - Gateway mode → parses APISIX headers * - JWT mode → validates Bearer token */ authenticate(req: { headers?: Record; }): Promise; } //# sourceMappingURL=auth_middleware.d.ts.map