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§
Sourcefn initialize<'a>(
&'a mut self,
config: AuthConfig,
metadata_service: Option<Arc<dyn Any + Send + Sync>>,
) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>
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.
Sourcefn shutdown(
&mut self,
) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + '_>>
fn shutdown( &mut self, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + '_>>
Shutdown the provider.
Sourcefn create_user<'a>(
&'a self,
user: User,
) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>
fn create_user<'a>( &'a self, user: User, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>
Create a user.
Sourcefn delete_user<'a>(
&'a self,
username: &'a str,
) -> 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>>
Delete a user.
Sourcefn update_user<'a>(
&'a self,
user: User,
) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>
fn update_user<'a>( &'a self, user: User, ) -> Pin<Box<dyn Future<Output = AuthServiceResult<()>> + Send + 'a>>
Update a user.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".