Skip to main content

IdentityStore

Trait IdentityStore 

Source
pub trait IdentityStore: Send + Sync {
    // Required methods
    fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        email: &'life1 str,
        password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Identity>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Identity>, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn has_users<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        email: &'life2 str,
        password: &'life3 str,
        roles: &'life4 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait;
    fn update_profile<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        name: &'life2 str,
        email: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn change_password<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn set_roles<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        roles: &'life2 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn authenticate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, email: &'life1 str, password: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Identity>, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn has_users<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn create_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, name: &'life1 str, email: &'life2 str, password: &'life3 str, roles: &'life4 [String], ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source

fn update_profile<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, id: &'life1 str, name: &'life2 str, email: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn change_password<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, password: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn set_roles<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, roles: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<Identity, AuthError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§