pub trait Authenticator {
// Required method
fn authenticate(
&self,
credentials: &Credentials,
) -> Result<Identity, AuthError>;
}Expand description
A way of signing in. Passwords are UserDirectory; a way that talks to an outside provider,
as OAuth 2 does, implements this and asks UserDirectory::identity_of for the roles.
Required Methods§
Sourcefn authenticate(&self, credentials: &Credentials) -> Result<Identity, AuthError>
fn authenticate(&self, credentials: &Credentials) -> Result<Identity, AuthError>
Who this is, or why not.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".