Trait salvo_extra::basic_auth::BasicAuthValidator
source · [−]pub trait BasicAuthValidator: Send + Sync {
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}
Available on crate feature
basic-auth
only.Expand description
BasicAuthValidator
Required Methods
sourcefn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn validate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Validate is that username and password is right.