pub trait BasicAuthValidator: Send + Sync {
// Required method
fn validate(
&self,
username: &str,
password: &str,
depot: &mut Depot,
) -> impl Future<Output = bool> + Send;
}Expand description
Validator for Basic Authentication credentials.
Required Methods§
Sourcefn validate(
&self,
username: &str,
password: &str,
depot: &mut Depot,
) -> impl Future<Output = bool> + Send
fn validate( &self, username: &str, password: &str, depot: &mut Depot, ) -> impl Future<Output = bool> + Send
Validates whether the provided username and password are correct.
Implement this method to check credentials against your authentication system.
Return true if authentication succeeds, false otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.