pub enum AuthCredential {
Basic {
username: String,
password: String,
},
Bearer {
token: String,
},
Negotiate {
token_bytes: Vec<u8>,
},
ClientCert {
subject_dn: String,
},
}Expand description
Parsed credential from an HTTP Authorization header.
Variants§
Basic
HTTP Basic: username and password (password may be an OTP).
Bearer
Bearer token (opaque string; interpretation is caller’s responsibility).
Negotiate
Negotiate (GSSAPI/SPNEGO): raw token bytes from base64-decoded header.
ClientCert
Client certificate distinguished name extracted from TLS peer info.
Trait Implementations§
Source§impl Clone for AuthCredential
impl Clone for AuthCredential
Source§fn clone(&self) -> AuthCredential
fn clone(&self) -> AuthCredential
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 moreAuto Trait Implementations§
impl Freeze for AuthCredential
impl RefUnwindSafe for AuthCredential
impl Send for AuthCredential
impl Sync for AuthCredential
impl Unpin for AuthCredential
impl UnsafeUnpin for AuthCredential
impl UnwindSafe for AuthCredential
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