Skip to main content

AuthenticationMetadataProvider

Trait AuthenticationMetadataProvider 

Source
pub trait AuthenticationMetadataProvider: Send + Sync {
    // Required methods
    fn initialize<'a>(
        &'a mut self,
        config: AuthConfig,
        metadata_service: Option<Arc<dyn Any + Send + Sync>>,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>;
    fn shutdown(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + '_>>;
    fn create_user<'a>(
        &'a self,
        user: User,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>;
    fn delete_user<'a>(
        &'a self,
        username: &'a str,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>;
    fn update_user<'a>(
        &'a self,
        user: User,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>;
    fn get_user<'a>(
        &'a self,
        username: &'a str,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<User>> + Send + 'a>>;
    fn list_user<'a>(
        &'a self,
        filter: Option<&'a str>,
    ) -> Pin<Box<dyn Future<Output = AuthServiceResult<Vec<User>>> + Send + 'a>>;
}
Expand description

Authentication metadata provider for user management.

Required Methods§

Source

fn initialize<'a>( &'a mut self, config: AuthConfig, metadata_service: Option<Arc<dyn Any + Send + Sync>>, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>

Initialize the provider.

Source

fn shutdown( &mut self, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + '_>>

Shutdown the provider.

Source

fn create_user<'a>( &'a self, user: User, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>

Create a user.

Source

fn delete_user<'a>( &'a self, username: &'a str, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>

Delete a user.

Source

fn update_user<'a>( &'a self, user: User, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>

Update a user.

Source

fn get_user<'a>( &'a self, username: &'a str, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<User>> + Send + 'a>>

Get a user by username.

Source

fn list_user<'a>( &'a self, filter: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<Vec<User>>> + Send + 'a>>

List users with optional filter.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§