use std::collections::HashMap;
use async_trait::async_trait;
pub type Credentials = HashMap<String, String>;
pub type AuthConfig = HashMap<String, String>;
#[async_trait]
pub trait AuthStrategy: Send + Sync {
async fn authenticate(&self, config: &AuthConfig) -> anyhow::Result<Credentials>;
async fn refresh_token(&self, _credentials: &Credentials) -> anyhow::Result<Credentials> {
anyhow::bail!("this auth strategy does not support token refresh")
}
fn validate_credentials(&self, credentials: &Credentials) -> bool;
}