Skip to main content

UserMapper

Trait UserMapper 

Source
pub trait UserMapper: Send + Sync {
    type LocalUser: Send + Sync;

    // Required method
    fn map_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 Identity,
    ) -> Pin<Box<dyn Future<Output = Result<Self::LocalUser, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for mapping a provider identity to a local user.

Required Associated Types§

Required Methods§

Source

fn map_user<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 Identity, ) -> Pin<Box<dyn Future<Output = Result<Self::LocalUser, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Map an identity to a local user. This could involve creating a new user or finding an existing one.

Implementations on Foreign Types§

Source§

impl UserMapper for ()

Source§

type LocalUser = ()

Source§

fn map_user<'life0, 'life1, 'async_trait>( &'life0 self, _identity: &'life1 Identity, ) -> Pin<Box<dyn Future<Output = Result<Self::LocalUser, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§