mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
b215961a56
## Why #28522 routes selected-plugin HTTP MCP traffic through the owning executor, but OAuth bootstrap and refresh still used host-local clients. Executor-only servers therefore cannot complete discovery or login through the same network boundary as the MCP connection. ## What changed - adapt `codex_exec_server::HttpClient` to RMCP 1.8's `OAuthHttpClient` contract - let RMCP own discovery, dynamic registration, PKCE, token exchange, and refresh - route auth status, persisted-token startup, and app-server login through the server runtime while preserving the existing local discovery path - add optional `threadId` to `mcpServer/oauth/login` and echo it in the completion notification - implement RMCP's redirect policy and 1 MiB OAuth response limit over executor HTTP - cover selected-thread OAuth discovery and login through an executor-only route Depends on #28522.
44 lines
1.7 KiB
Rust
44 lines
1.7 KiB
Rust
mod auth_status;
|
|
mod elicitation_client_service;
|
|
mod executor_process_transport;
|
|
mod http_client_adapter;
|
|
mod in_process_transport;
|
|
mod logging_client_handler;
|
|
mod oauth;
|
|
mod oauth_http_client;
|
|
mod perform_oauth_login;
|
|
mod program_resolver;
|
|
mod rmcp_client;
|
|
mod stdio_server_launcher;
|
|
mod utils;
|
|
|
|
pub use auth_status::StreamableHttpOAuthDiscovery;
|
|
pub use auth_status::determine_streamable_http_auth_status;
|
|
pub use auth_status::determine_streamable_http_auth_status_with_http_client;
|
|
pub use auth_status::discover_streamable_http_oauth;
|
|
pub use auth_status::discover_streamable_http_oauth_with_http_client;
|
|
pub use auth_status::supports_oauth_login;
|
|
pub use codex_protocol::protocol::McpAuthStatus;
|
|
pub use in_process_transport::InProcessTransportFactory;
|
|
pub use oauth::StoredOAuthTokens;
|
|
pub use oauth::WrappedOAuthTokenResponse;
|
|
pub use oauth::delete_oauth_tokens;
|
|
pub(crate) use oauth::load_oauth_tokens;
|
|
pub use oauth::save_oauth_tokens;
|
|
pub use perform_oauth_login::OAuthProviderError;
|
|
pub use perform_oauth_login::OauthLoginHandle;
|
|
pub use perform_oauth_login::perform_oauth_login;
|
|
pub use perform_oauth_login::perform_oauth_login_return_url;
|
|
pub use perform_oauth_login::perform_oauth_login_return_url_with_http_client;
|
|
pub use perform_oauth_login::perform_oauth_login_silent;
|
|
pub use rmcp::model::ElicitationAction;
|
|
pub use rmcp_client::Elicitation;
|
|
pub use rmcp_client::ElicitationResponse;
|
|
pub use rmcp_client::ListToolsWithConnectorIdResult;
|
|
pub use rmcp_client::RmcpClient;
|
|
pub use rmcp_client::SendElicitation;
|
|
pub use rmcp_client::ToolWithConnectorId;
|
|
pub use stdio_server_launcher::ExecutorStdioServerLauncher;
|
|
pub use stdio_server_launcher::LocalStdioServerLauncher;
|
|
pub use stdio_server_launcher::StdioServerLauncher;
|