pub struct SessionRpcMcpOauth<'a> { /* private fields */ }Expand description
session.mcp.oauth.* RPCs.
Implementations§
Source§impl<'a> SessionRpcMcpOauth<'a>
impl<'a> SessionRpcMcpOauth<'a>
Sourcepub async fn handle_pending_request(
&self,
params: McpOauthHandlePendingRequest,
) -> Result<McpOauthHandlePendingResult, Error>
pub async fn handle_pending_request( &self, params: McpOauthHandlePendingRequest, ) -> Result<McpOauthHandlePendingResult, Error>
Resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request.
Wire method: session.mcp.oauth.handlePendingRequest.
§Parameters
params- Pending MCP OAuth request ID and host-provided token or cancellation response.
§Returns
Indicates whether the pending MCP OAuth response was accepted.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn login(
&self,
params: McpOauthLoginRequest,
) -> Result<McpOauthLoginResult, Error>
pub async fn login( &self, params: McpOauthLoginRequest, ) -> Result<McpOauthLoginResult, Error>
Starts OAuth authentication for a remote MCP server.
Wire method: session.mcp.oauth.login.
§Parameters
params- Remote MCP server name and optional overrides controlling reauthentication, OAuth client display name, and the callback success-page copy.
§Returns
OAuth authorization URL the caller should open, or empty when cached tokens already authenticated the server.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcMcpOauth<'a>
impl<'a> Clone for SessionRpcMcpOauth<'a>
Source§fn clone(&self) -> SessionRpcMcpOauth<'a>
fn clone(&self) -> SessionRpcMcpOauth<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more