Trait rocket_simpleauth::authenticator::Authenticator
[−]
[src]
pub trait Authenticator { type User: FromString + ToString; fn user(&self) -> Self::User; fn check_credentials(
username: String,
password: String
) -> Result<Self, Self>
where
Self: Sized; }
Associated Types
type User: FromString + ToString
Required Methods
fn user(&self) -> Self::User
a function that returns a user_id in the form a String
fn check_credentials(username: String, password: String) -> Result<Self, Self> where
Self: Sized,
Self: Sized,
a function that checks if the user pass combination is valid and if it is returns true and an instance of itself
Implementors
impl Authenticator for DummyAuthenticator type User = String;