pub struct MapBasicAuthCredsValidator<Creds>where
Creds: BasicAuthCred + Clone,{
pub creds: HashMap<String, Creds>,
}Fields§
§creds: HashMap<String, Creds>Implementations§
Source§impl<Creds> MapBasicAuthCredsValidator<Creds>where
Creds: BasicAuthCred + Clone,
impl<Creds> MapBasicAuthCredsValidator<Creds>where
Creds: BasicAuthCred + Clone,
Sourcepub fn from_config(config: &BasicAuthCredsConfig<Creds>) -> CredsResult<Self>
pub fn from_config(config: &BasicAuthCredsConfig<Creds>) -> CredsResult<Self>
Create a new validator from configuration.
Trait Implementations§
Source§impl<Creds> BasicAuthCredsValidator<Creds> for MapBasicAuthCredsValidator<Creds>where
Creds: BasicAuthCred + Clone,
impl<Creds> BasicAuthCredsValidator<Creds> for MapBasicAuthCredsValidator<Creds>where
Creds: BasicAuthCred + Clone,
fn get_cred(&self, username: &str) -> CredsResult<Option<&Creds>>
fn verify_cred( &self, username: &str, password: &str, ) -> CredsResult<Option<&Cred>>
Auto Trait Implementations§
impl<Creds> Freeze for MapBasicAuthCredsValidator<Creds>
impl<Creds> RefUnwindSafe for MapBasicAuthCredsValidator<Creds>where
Creds: RefUnwindSafe,
impl<Creds> Send for MapBasicAuthCredsValidator<Creds>where
Creds: Send,
impl<Creds> Sync for MapBasicAuthCredsValidator<Creds>where
Creds: Sync,
impl<Creds> Unpin for MapBasicAuthCredsValidator<Creds>where
Creds: Unpin,
impl<Creds> UnsafeUnpin for MapBasicAuthCredsValidator<Creds>
impl<Creds> UnwindSafe for MapBasicAuthCredsValidator<Creds>where
Creds: UnwindSafe,
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