/**
 * MCP Authentication Middleware
 * Handles Clerk OAuth authentication for remote MCP server
 */
export interface AuthenticatedUser {
    userId: string;
    email: string;
    sessionId: string;
    authenticated: boolean;
}
export interface SessionData {
    user: AuthenticatedUser;
    createdAt: Date;
    expiresAt: Date;
}
/**
 * Session manager for authenticated users
 */
export declare class SessionManager {
    private sessions;
    private sessionTimeout;
    /**
     * Create a new session for an authenticated user
     */
    createSession(user: AuthenticatedUser): string;
    /**
     * Get session data by session ID
     */
    getSession(sessionId: string): SessionData | null;
    /**
     * Validate a session and return the user
     */
    validateSession(sessionId: string): AuthenticatedUser | null;
    /**
     * Invalidate a session
     */
    invalidateSession(sessionId: string): void;
    /**
     * Clean up expired sessions
     */
    private cleanupExpiredSessions;
    /**
     * Get all active sessions (for debugging/monitoring)
     */
    getActiveSessions(): number;
}
/**
 * Verify Clerk Bearer token and extract user information
 */
export declare function verifyClerkToken(token: string): Promise<AuthenticatedUser | null>;
/**
 * Extract Bearer token from Authorization header
 */
export declare function extractBearerToken(authHeader?: string): string | null;
/**
 * Middleware to authenticate requests using Clerk
 */
export declare function authenticateRequest(authHeader?: string, sessionManager?: SessionManager): Promise<{
    authenticated: boolean;
    user?: AuthenticatedUser;
    error?: string;
}>;
/**
 * Log authentication event
 */
export declare function logAuthEvent(event: 'success' | 'failure' | 'session_created' | 'session_expired', details: Record<string, unknown>): void;
//# sourceMappingURL=mcp-auth.d.ts.map