/** * Client ID Metadata Document Handler * * Handles Client ID Metadata Document operations for MCP 2025-11-25 specification. * Client ID Metadata Documents allow using HTTPS URLs as client identifiers. * * @see MCP 2025-11-25 Authorization Specification */ import { ClientIDMetadataDocument } from '../types/client-id-metadata.js'; export interface RegistrationResult { success: boolean; clientId: string; metadata?: ClientIDMetadataDocument; error?: string; errors?: string[]; warnings?: string[]; } export interface ValidationResult { valid: boolean; metadata?: ClientIDMetadataDocument; errors: string[]; warnings: string[]; debug?: { request?: { url?: string; method?: string; headers?: Record; }; response?: { status?: number; statusText?: string; headers?: Record; body?: string; }; }; } /** * Client ID Metadata Document Handler * * Provides methods for validating and using Client ID Metadata Documents * as defined in MCP 2025-11-25. */ export declare class ClientIDMetadataHandler { /** * Register client using Client ID Metadata Document * * This method validates the metadata document and prepares it for use * with the authorization server. * * @param metadataDocumentUrl - HTTPS URL to the client metadata document * @returns Registration result with metadata or errors */ registerWithMetadata(metadataDocumentUrl: string): Promise; /** * Validate metadata document meets MCP 2025-11-25 requirements * * @param metadataUrl - URL to the metadata document * @param enableDebug - Enable HTTP request/response debugging * @returns Validation result with metadata and any errors/warnings */ validateMetadata(metadataUrl: string, enableDebug?: boolean): Promise; /** * Fetch metadata document without full validation * * Useful for retrieving the document to inspect its contents. * * @param metadataUrl - URL to the metadata document * @returns The metadata document or throws error */ fetchMetadata(metadataUrl: string): Promise; /** * Check if a client ID is a valid Client ID Metadata Document URL * * @param clientId - The client identifier to check * @returns true if it's a valid metadata document URL */ isMetadataDocumentUrl(clientId: string): boolean; /** * Extract redirect URIs from metadata document * * @param metadata - Client ID Metadata Document * @returns Array of redirect URIs */ getRedirectUris(metadata: ClientIDMetadataDocument): string[]; /** * Get client authentication method from metadata * * @param metadata - Client ID Metadata Document * @returns Authentication method (default: 'none' for public clients) */ getAuthMethod(metadata: ClientIDMetadataDocument): string; /** * Check if client uses private_key_jwt authentication * * @param metadata - Client ID Metadata Document * @returns true if private_key_jwt is configured */ usesPrivateKeyJWT(metadata: ClientIDMetadataDocument): boolean; /** * Get JWKS configuration for private_key_jwt * * @param metadata - Client ID Metadata Document * @returns JWKS URI or JWKS object */ getJWKSConfig(metadata: ClientIDMetadataDocument): { jwks_uri?: string; jwks?: object; }; } //# sourceMappingURL=client-id-metadata-handler.d.ts.map