mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Use configured HTTP clients for all MCP OAuth requests (#35814)
## What changed - Require callers to provide an HTTP client for MCP OAuth discovery and login, removing the separate direct `reqwest` path. - Use the shared `http` and `url` types throughout the MCP client and drop its direct `reqwest` dependency. - Preserve configured MCP headers when routing OAuth discovery through the provided client. ## Testing - Add coverage that routed OAuth discovery forwards configured headers. GitOrigin-RevId: 1345f56bd794626533133447597a5908e57b9b48
This commit is contained in:
1 parent
9ea975a2dc
commit
709283b432
25 files changed
+181
-380
No files matched your search
@@ -25,7 +25,7 @@ use codex_mcp::ElicitationReviewerHandle;
|
||||
use codex_mcp::McpOAuthLoginSupport;
|
||||
use codex_mcp::McpPermissionPromptAutoApproveContext;
|
||||
use codex_mcp::mcp_permission_prompt_is_auto_approved;
|
||||
use codex_mcp::oauth_login_support_with_http_client;
|
||||
use codex_mcp::oauth_login_support;
|
||||
use codex_mcp::resolve_oauth_scopes;
|
||||
use codex_mcp::should_retry_without_scopes;
|
||||
|
||||
@@ -148,7 +148,7 @@ pub(crate) async fn maybe_install_mcp_dependencies(
|
||||
} else {
|
||||
OAuthDiscoveryTimeout::Requested
|
||||
};
|
||||
let login_support = oauth_login_support_with_http_client(
|
||||
let login_support = oauth_login_support(
|
||||
&server_config.transport,
|
||||
Arc::clone(&http_client),
|
||||
discovery_timeout,
|
||||
|
||||
Reference in new issue
Block a user