[][src]Trait registry_api::UserProvider

pub trait UserProvider: Send + Sync + 'static {
#[must_use]    fn authenticate_user<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        username: &'life1 str,
        token: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

authenticates users. authorization is checking the authenticated username vs crate owners. control authorization via RegistryIndex.owners.

Required methods

#[must_use]fn authenticate_user<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    username: &'life1 str,
    token: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

check a token for validity

Loading content...

Implementors

Loading content...