pub enum CredentialAuth {
McpOauth(McpOauthAuth),
StaticBearer(StaticBearerAuth),
Other(Value),
}Available on crate feature
managed-agents-preview only.Expand description
Credential authentication payload.
Forward-compatible: unknown wire type tags fall through to
Self::Other preserving the raw JSON.
Variants§
McpOauth(McpOauthAuth)
MCP OAuth token, optionally with a refresh block. Anthropic
refreshes on your behalf when refresh is configured.
StaticBearer(StaticBearerAuth)
Static bearer token (API key, PAT). No refresh flow.
Other(Value)
Unknown auth type; raw JSON preserved.
Implementations§
Source§impl CredentialAuth
impl CredentialAuth
Sourcepub fn mcp_oauth(
mcp_server_url: impl Into<String>,
access_token: impl Into<String>,
) -> McpOauthBuilder
pub fn mcp_oauth( mcp_server_url: impl Into<String>, access_token: impl Into<String>, ) -> McpOauthBuilder
Build an CredentialAuth::McpOauth credential.
Sourcepub fn static_bearer(
mcp_server_url: impl Into<String>,
token: impl Into<String>,
) -> Self
pub fn static_bearer( mcp_server_url: impl Into<String>, token: impl Into<String>, ) -> Self
Build a CredentialAuth::StaticBearer credential.
Trait Implementations§
Source§impl Clone for CredentialAuth
impl Clone for CredentialAuth
Source§fn clone(&self) -> CredentialAuth
fn clone(&self) -> CredentialAuth
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CredentialAuth
impl Debug for CredentialAuth
Source§impl<'de> Deserialize<'de> for CredentialAuth
impl<'de> Deserialize<'de> for CredentialAuth
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CredentialAuth
impl PartialEq for CredentialAuth
Source§impl Serialize for CredentialAuth
impl Serialize for CredentialAuth
impl StructuralPartialEq for CredentialAuth
Auto Trait Implementations§
impl Freeze for CredentialAuth
impl RefUnwindSafe for CredentialAuth
impl Send for CredentialAuth
impl Sync for CredentialAuth
impl Unpin for CredentialAuth
impl UnsafeUnpin for CredentialAuth
impl UnwindSafe for CredentialAuth
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.