pub enum AuthMode {
ApiKey,
TokenCommand,
EntraClientCredentials,
EntraManagedIdentity,
}Expand description
Authentication mode for an LLM endpoint.
Variants§
ApiKey
Static API key. Sent as Authorization: Bearer <key> by default;
set AuthConfig::api_key_header (or use the azure provider)
to send it in a different header.
TokenCommand
Execute a command and use its stdout (first line) as the bearer
token. Uses the token_command field. Provider-agnostic escape
hatch — e.g. az account get-access-token ….
EntraClientCredentials
Entra ID (Azure AD) OAuth 2.0 client-credentials grant: exchanges
client_id + client_secret in tenant_id for a bearer token.
EntraManagedIdentity
Entra ID managed identity: fetches a bearer token from the IMDS
endpoint (works on Azure VMs / App Service / ACI with a
system-assigned identity; zero credentials in the config).
Trait Implementations§
impl Copy for AuthMode
Source§impl<'de> Deserialize<'de> for AuthMode
impl<'de> Deserialize<'de> for AuthMode
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
impl Eq for AuthMode
impl StructuralPartialEq for AuthMode
Auto Trait Implementations§
impl Freeze for AuthMode
impl RefUnwindSafe for AuthMode
impl Send for AuthMode
impl Sync for AuthMode
impl Unpin for AuthMode
impl UnsafeUnpin for AuthMode
impl UnwindSafe for AuthMode
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