import { TokenIntrospection, McpAuthConfig } from './types.js'; interface TokenValidationResult { valid: boolean; introspection?: TokenIntrospection; error?: string; } /** * Validate a Bearer token * * @param token - The access token to validate * @param config - Auth configuration * @returns Validation result with token introspection data */ export declare function validateToken(token: string, config: McpAuthConfig): Promise; /** * Introspect token using OAuth 2.0 Token Introspection (RFC 7662) * * @internal - Exported for testing */ export declare function introspectToken(token: string, config: McpAuthConfig): Promise; /** * Validate JWT using JWKS * * @internal - Exported for testing */ export declare function validateJWT(token: string, config: McpAuthConfig): Promise; /** * Validate token audience (RFC 8707) * * CRITICAL: This prevents confused deputy attacks * Token MUST be issued specifically for this resource * * @param introspection - Token introspection result * @param expectedAudience - Expected audience value(s) * @returns true if audience is valid */ export declare function validateAudience(introspection: TokenIntrospection, expectedAudience?: string | string[]): boolean; /** * Validate scopes * * @param introspection - Token introspection result * @param requiredScopes - Scopes required for the operation * @returns true if token has all required scopes */ export declare function validateScopes(introspection: TokenIntrospection, requiredScopes: string[]): boolean; /** * Extract Bearer token from Authorization header or raw token string */ export declare function extractBearerToken(authHeader: string | undefined): string | null; /** * Check if token is expired */ export declare function isTokenExpired(introspection: TokenIntrospection): boolean; /** * Clear token cache (useful for testing) */ export declare function clearTokenCache(): void; export {}; //# sourceMappingURL=token-validation.d.ts.map