Skip to main content
Glama
jakedx6
by jakedx6
auth.d.ts1.79 kB
export interface AuthContext { userId: string; tenantId: string | null; profile: any; authenticated: boolean; } export declare class AuthManager { private static instance; private authContext; private constructor(); static getInstance(): AuthManager; /** * Authenticate with various methods */ authenticate(method: 'token' | 'api_key', credentials: string): Promise<AuthContext>; /** * Authenticate with user session token (legacy - not used with API) */ private authenticateWithToken; /** * Authenticate with API key via Helios-9 API */ private authenticateWithApiKey; /** * Get current auth context */ getAuthContext(): AuthContext; /** * Check if authenticated */ isAuthenticated(): boolean; /** * Ensure authenticated before API calls */ ensureAuthenticated(): Promise<AuthContext>; /** * Clear authentication */ clearAuth(): void; /** * Middleware for MCP operations that require authentication */ requireAuth<T extends any[], R>(operation: (...args: T) => Promise<R>): (...args: T) => Promise<R>; /** * Get rate limiting info for current user */ getRateLimitInfo(): { limit: number; window: number; current: number; }; /** * Validate permissions for specific operations */ validatePermission(resource: string, action: string, resourceId?: string): Promise<boolean>; } export declare const authManager: AuthManager; export declare function authenticate(method: 'token' | 'api_key', credentials: string): Promise<AuthContext>; export declare function requireAuth<T extends any[], R>(operation: (...args: T) => Promise<R>): (...args: T) => Promise<R>;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jakedx6/helios9-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server