/** * memory-journal-mcp — Authorization Server Discovery (RFC 8414) * * Discovers and caches OAuth 2.0 Authorization Server Metadata * as specified in RFC 8414. * * @see https://datatracker.ietf.org/doc/html/rfc8414 */ import type { AuthorizationServerMetadata, AuthServerDiscoveryConfig } from './types.js'; /** * Authorization Server Metadata Discovery * * Fetches and caches OAuth 2.0 authorization server metadata * from the /.well-known/oauth-authorization-server endpoint. */ export declare class AuthorizationServerDiscovery { private readonly authServerUrl; private readonly cacheTtl; private readonly timeout; private cachedMetadata; private cacheExpiry; constructor(config: AuthServerDiscoveryConfig); /** * Discover authorization server metadata * * Fetches from /.well-known/oauth-authorization-server * Results are cached for cacheTtl seconds. * * @returns Authorization server metadata * @throws AuthServerDiscoveryError if discovery fails */ discover(): Promise; /** * Validate required metadata fields per RFC 8414 */ private validateMetadata; /** * Get cached metadata (throws if not discovered) */ getMetadata(): AuthorizationServerMetadata; /** * Get JWKS URI from metadata * * @throws Error if metadata not discovered or jwks_uri not present */ getJwksUri(): string; /** * Get token endpoint from metadata */ getTokenEndpoint(): string; /** * Get issuer from metadata */ getIssuer(): string; /** * Get registration endpoint from metadata (RFC 7591) * * @returns Registration endpoint or null if not supported */ getRegistrationEndpoint(): string | null; /** * Check if dynamic client registration is supported */ supportsClientRegistration(): boolean; /** * Get supported scopes from metadata */ getSupportedScopes(): string[]; /** * Check if a specific scope is supported */ isScopeSupported(scope: string): boolean; /** * Clear cached metadata */ clearCache(): void; /** * Check if cache is valid */ isCacheValid(): boolean; /** * Get the authorization server URL */ getAuthServerUrl(): string; } /** * Create an Authorization Server Discovery instance */ export declare function createAuthServerDiscovery(authServerUrl: string, options?: Partial>): AuthorizationServerDiscovery; //# sourceMappingURL=authorization-server-discovery.d.ts.map