[][src]Trait libunftp::auth::Authenticator

pub trait Authenticator<User>: Sync + Send + Debug where
    User: UserDetail
{ #[must_use] pub fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        password: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<User, AuthenticationError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; pub fn name(&self) -> &str { ... } }

Defines the requirements for Authentication implementations

Required methods

#[must_use]pub fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    username: &'life1 str,
    password: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<User, AuthenticationError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Authenticate the given user with the given password.

Loading content...

Provided methods

pub fn name(&self) -> &str[src]

Implement to set the name of the authenticator. By default it returns the type signature.

Loading content...

Implementors

impl Authenticator<DefaultUser> for AnonymousAuthenticator[src]

impl Authenticator<DefaultUser> for JsonFileAuthenticator[src]

impl Authenticator<DefaultUser> for PAMAuthenticator[src]

impl Authenticator<DefaultUser> for RestAuthenticator[src]

Loading content...