niom-turn/src/traits/credential_store.rs

9 lines
312 B
Rust

use async_trait::async_trait;
/// CredentialStore trait - async abstraction for credential backends
#[async_trait]
pub trait CredentialStore: Send + Sync + 'static {
/// Look up a password for a username. Returns None if user not found.
async fn get_password(&self, username: &str) -> Option<String>;
}