pub struct McpOauthLoginOptions { /* private fields */ }Expand description
Extensible McpOauthLoginRequest, including inputs added after it was published.
Required inputs are McpOauthLoginOptions::new arguments; optional inputs have fluent setters.
Input-only: it serialises to the flat wire request and is not deserialisable.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Implementations§
Source§impl McpOauthLoginOptions
impl McpOauthLoginOptions
Sourcepub fn force_reauth(self, value: bool) -> Self
pub fn force_reauth(self, value: bool) -> Self
When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck.
Sourcepub fn client_name(self, value: impl Into<String>) -> Self
pub fn client_name(self, value: impl Into<String>) -> Self
Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees.
Sourcepub fn callback_success_message(self, value: impl Into<String>) -> Self
pub fn callback_success_message(self, value: impl Into<String>) -> Self
Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return.
Sourcepub fn client_id(self, value: impl Into<String>) -> Self
pub fn client_id(self, value: impl Into<String>) -> Self
Optional OAuth client ID override for this login. When set, the runtime uses this pre-registered static client instead of dynamic client registration.
Sourcepub fn client_secret(self, value: impl Into<String>) -> Self
pub fn client_secret(self, value: impl Into<String>) -> Self
Optional OAuth client secret override for this login. The runtime treats this as an ephemeral host-owned secret, uses it for this authentication attempt and does not persist it.
Sourcepub fn public_client(self, value: bool) -> Self
pub fn public_client(self, value: bool) -> Self
Optional override indicating whether the static OAuth client is public. When false, the runtime treats it as confidential and uses the per-login clientSecret if provided, otherwise retrieving the client secret from the MCP OAuth secret store.
Sourcepub fn grant_type(self, value: McpOauthLoginGrantType) -> Self
pub fn grant_type(self, value: McpOauthLoginGrantType) -> Self
Optional OAuth grant type override for this login. Defaults to the server configuration, or authorization_code when no grant type is specified.
Sourcepub fn login_id(self, value: impl Into<String>) -> Self
pub fn login_id(self, value: impl Into<String>) -> Self
Required for owned login. Consumes the exact prepareLogin handle once. Set forceReauth and display options during preparation, not consumption.
Sourcepub fn expected_installation_id(self, value: impl Into<String>) -> Self
pub fn expected_installation_id(self, value: impl Into<String>) -> Self
Exact owned receipt identity. Owned login never uses an implicit helper session.