pub enum Credential {
Bearer(SecretString),
Basic {
username: String,
password: SecretString,
},
ApiKey(SecretString),
Provider(TokenProvider),
}Expand description
A per-scheme credential supplied at client construction: a static secret or a token provider for rotation. Missing required credentials are a construction-time error, not a 401.
Variants§
Bearer(SecretString)
Authorization: Bearer <token>.
Basic
HTTP basic auth.
ApiKey(SecretString)
An apiKey value.
Provider(TokenProvider)
A rotating token supplied on demand.
Trait Implementations§
Source§impl Clone for Credential
impl Clone for Credential
Auto Trait Implementations§
impl !RefUnwindSafe for Credential
impl !UnwindSafe for Credential
impl Freeze for Credential
impl Send for Credential
impl Sync for Credential
impl Unpin for Credential
impl UnsafeUnpin for Credential
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