#[non_exhaustive]pub enum AuthMethod {
EnvVar(AuthMethodEnvVar),
Terminal(AuthMethodTerminal),
Other(OtherAuthMethod),
Agent(AuthMethodAgent),
}unstable_protocol_v2 only.Expand description
Describes an available authentication method.
The type field acts as the discriminator in the serialized JSON form.
When no type is present, the method is treated as agent.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EnvVar(AuthMethodEnvVar)
unstable_auth_methods only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
User provides a key that the client passes to the agent as an environment variable.
Terminal(AuthMethodTerminal)
unstable_auth_methods only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Client runs an interactive terminal for the user to authenticate via a TUI.
Other(OtherAuthMethod)
Custom or future authentication method.
Values beginning with _ are reserved for implementation-specific
extensions. Unknown values that do not begin with _ are reserved for
future ACP variants.
Clients that do not understand this method type should preserve the raw payload when storing, replaying, proxying, or forwarding initialization data, and otherwise ignore the method or display it generically.
Agent(AuthMethodAgent)
Agent handles authentication itself.
This is the default when no type is specified.
Implementations§
Source§impl AuthMethod
impl AuthMethod
Sourcepub fn id(&self) -> &AuthMethodId
pub fn id(&self) -> &AuthMethodId
The unique identifier for this authentication method.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Optional description providing more details about this authentication method.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthMethod
impl Debug for AuthMethod
Source§impl<'de> Deserialize<'de> for AuthMethod
impl<'de> Deserialize<'de> for AuthMethod
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthMethod, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for AuthMethod
Source§impl IntoV1 for AuthMethod
impl IntoV1 for AuthMethod
Source§type Output = AuthMethod
type Output = AuthMethod
Source§fn into_v1(
self,
) -> Result<<AuthMethod as IntoV1>::Output, ProtocolConversionError>
fn into_v1( self, ) -> Result<<AuthMethod as IntoV1>::Output, ProtocolConversionError>
Source§impl JsonSchema for AuthMethod
impl JsonSchema for AuthMethod
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AuthMethod
impl PartialEq for AuthMethod
Source§fn eq(&self, other: &AuthMethod) -> bool
fn eq(&self, other: &AuthMethod) -> bool
self and other values to be equal, and is used by ==.