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§
Sourcefn 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,
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.