pub enum AuthMethod {
Agent {
id: String,
name: String,
description: Option<String>,
},
EnvVar {
id: String,
name: String,
description: Option<String>,
var_name: String,
link: Option<String>,
},
Terminal {
id: String,
name: String,
description: Option<String>,
args: Vec<String>,
env: HashMap<String, String>,
},
ApiKey,
OAuth2,
Bearer,
Custom(String),
}Expand description
Supported authentication methods
Follows ACP authentication specification: https://agentclientprotocol.com/protocol/auth
Variants§
Agent
Agent handles authentication itself (default/backward-compatible)
Fields
EnvVar
Environment variable-based authentication User provides a key/credential that client passes as environment variable
Fields
Terminal
Terminal/TUI-based interactive authentication Client launches interactive terminal for user to login
Fields
ApiKey
Legacy: API key authentication (deprecated, use EnvVar instead)
OAuth2
Legacy: OAuth 2.0 (use Terminal for interactive flows)
Bearer
Legacy: Bearer token authentication
Custom(String)
Custom authentication (agent-specific)
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
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 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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnwindSafe for AuthMethod
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