use std::any::Any;
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
use crate::authentication::model::user::User;
use crate::config::AuthConfig;
use crate::AuthServiceResult;
pub trait AuthenticationMetadataProvider: Send + Sync {
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>>;
}