pub enum AuthConfigDto {
Bearer {
token_env: ConfigValue<String>,
},
ApiKey {
location: ApiKeyLocationDto,
name: ConfigValue<String>,
value_env: ConfigValue<String>,
},
Basic {
username_env: ConfigValue<String>,
password_env: Option<ConfigValue<String>>,
},
OAuth2ClientCredentials {
token_url: ConfigValue<String>,
client_id_env: ConfigValue<String>,
client_secret_env: ConfigValue<String>,
scopes: Vec<ConfigValue<String>>,
},
}Expand description
Authentication configuration DTO.
Variants§
Bearer
Bearer token authentication.
Fields
§
token_env: ConfigValue<String>Environment variable containing the token.
ApiKey
API key authentication (in header or query parameter).
Fields
§
location: ApiKeyLocationDtoWhere to send the API key.
§
name: ConfigValue<String>Header name or query parameter name.
§
value_env: ConfigValue<String>Environment variable containing the API key value.
Basic
HTTP Basic authentication.
Fields
§
username_env: ConfigValue<String>Environment variable containing the username.
§
password_env: Option<ConfigValue<String>>Environment variable containing the password.
OAuth2ClientCredentials
OAuth2 Client Credentials flow.
Fields
§
token_url: ConfigValue<String>Token endpoint URL.
§
client_id_env: ConfigValue<String>Environment variable containing the client ID.
§
client_secret_env: ConfigValue<String>Environment variable containing the client secret.
§
scopes: Vec<ConfigValue<String>>Optional scopes to request.
Trait Implementations§
Source§impl Clone for AuthConfigDto
impl Clone for AuthConfigDto
Source§fn clone(&self) -> AuthConfigDto
fn clone(&self) -> AuthConfigDto
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AuthConfigDto
impl Debug for AuthConfigDto
Source§impl<'de> Deserialize<'de> for AuthConfigDto
impl<'de> Deserialize<'de> for AuthConfigDto
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
Source§impl PartialEq for AuthConfigDto
impl PartialEq for AuthConfigDto
Source§fn eq(&self, other: &AuthConfigDto) -> bool
fn eq(&self, other: &AuthConfigDto) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AuthConfigDto
impl Serialize for AuthConfigDto
impl StructuralPartialEq for AuthConfigDto
Auto Trait Implementations§
impl Freeze for AuthConfigDto
impl RefUnwindSafe for AuthConfigDto
impl Send for AuthConfigDto
impl Sync for AuthConfigDto
impl Unpin for AuthConfigDto
impl UnsafeUnpin for AuthConfigDto
impl UnwindSafe for AuthConfigDto
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