mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Fix typo in RFC 9728 impl (#5126)
This commit is contained in:
committed by
GitHub
parent
32c7070d7f
commit
ed2b4c6aa4
@@ -145,20 +145,6 @@ export function getMCPDiscoveryState(): MCPDiscoveryState {
|
||||
return mcpDiscoveryState;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse www-authenticate header to extract OAuth metadata URI.
|
||||
*
|
||||
* @param wwwAuthenticate The www-authenticate header value
|
||||
* @returns The resource metadata URI if found, null otherwise
|
||||
*/
|
||||
function _parseWWWAuthenticate(wwwAuthenticate: string): string | null {
|
||||
// Parse header like: Bearer realm="MCP Server", resource_metadata_uri="https://..."
|
||||
const resourceMetadataMatch = wwwAuthenticate.match(
|
||||
/resource_metadata_uri="([^"]+)"/,
|
||||
);
|
||||
return resourceMetadataMatch ? resourceMetadataMatch[1] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract WWW-Authenticate header from error message string.
|
||||
* This is a more robust approach than regex matching.
|
||||
|
||||
Reference in New Issue
Block a user