pub struct BasicAuth { /* private fields */ }Expand description
HTTP Basic authentication (RFC 7617)
Implementations§
Source§impl BasicAuth
impl BasicAuth
Sourcepub fn verify_with<F, Fut>(self, f: F) -> Self
pub fn verify_with<F, Fut>(self, f: F) -> Self
Check credentials yourself, e.g. against password hashes in a database. Replaces the built-in users.
Sourcepub fn except_paths<I, S>(self, paths: I) -> Self
pub fn except_paths<I, S>(self, paths: I) -> Self
Paths served without credentials
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BasicAuth
impl !UnwindSafe for BasicAuth
impl Freeze for BasicAuth
impl Send for BasicAuth
impl Sync for BasicAuth
impl Unpin for BasicAuth
impl UnsafeUnpin for BasicAuth
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