pub struct HttpBasicAuth { /* private fields */ }Expand description
HTTP Basic Authorization based on RFC 7617
It takes a userand password and generates an authorization header:
Authorization: Basic basic-credentials-base64
Basic authorization header is always set.
Note: for compatibility userand password should be formed by ASCII characters.
Implementations§
Source§impl HttpBasicAuth
impl HttpBasicAuth
pub fn new(user: &str, password: &str) -> HttpBasicAuth
Trait Implementations§
Source§impl AuthManager for HttpBasicAuth
impl AuthManager for HttpBasicAuth
Source§fn support_scheme(&self, scheme: &str) -> bool
fn support_scheme(&self, scheme: &str) -> bool
Checks if the Auth Manager supports
scheme (e.g. Basic, Digest, …)Calculates at least the
Authrization header or generates a std::io::Error
if not capable to generate this headers returns ’CannotAuthorize`.
Params: Read moreAuto Trait Implementations§
impl Freeze for HttpBasicAuth
impl RefUnwindSafe for HttpBasicAuth
impl Send for HttpBasicAuth
impl Sync for HttpBasicAuth
impl Unpin for HttpBasicAuth
impl UnwindSafe for HttpBasicAuth
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