pub struct AuthenticateParams {
pub channel: Uri,
pub resource: String,
pub token: String,
pub scopes: Option<Vec<String>>,
}Expand description
Pushes a Bearer token for a protected resource. The resource field MUST
match a protected-resource identifier the client has discovered from the
server — whether declared statically in AgentInfo.protectedResources,
or discovered dynamically from a live McpServerAuthRequiredState.resource
or ToolCallAuthRequiredState.auth.resource (both surfaced only once the
corresponding MCP server or tool call actually challenges for auth).
Servers MUST accept any resource value they have themselves advertised
through one of these three mechanisms.
Tokens are delivered using RFC 6750 (Bearer Token Usage) semantics. The client obtains the token from the authorization server(s) listed in the resource’s metadata and pushes it to the server via this command.
Fields§
§channel: UriChannel URI this command targets.
resource: StringThe protected resource identifier. MUST match a resource value the
server has advertised — via ProtectedResourceMetadata in
AgentInfo.protectedResources, or via a live
McpServerAuthRequiredState.resource / ToolCallAuthRequiredState.auth.resource.
token: StringBearer token obtained from the resource’s authorization server
scopes: Option<Vec<String>>OAuth scopes the token grants, when known. Lets the server determine
whether a specific challenge — e.g. the requiredScopes on a live
McpServerAuthRequiredState or ToolCallAuthRequiredState.auth — is
satisfied without decoding the (opaque, server-specific) token itself.
Omit when the client doesn’t track granted scopes separately from the
token.
Trait Implementations§
Source§impl Clone for AuthenticateParams
impl Clone for AuthenticateParams
Source§fn clone(&self) -> AuthenticateParams
fn clone(&self) -> AuthenticateParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more