use crate::{AccessToken, Claims, NythosResult, Password, PasswordHash, SessionId};
pub trait PasswordHasher {
async fn hash(&self, password: &Password) -> NythosResult<PasswordHash>;
async fn verify(&self, password: &Password, hash: &PasswordHash) -> NythosResult<bool>;
}
pub trait TokenSigner {
async fn sign(&self, claims: &Claims) -> NythosResult<AccessToken>;
async fn verify(&self, token: &AccessToken) -> NythosResult<Claims>;
}
pub trait RevocationChecker {
async fn is_revoked(&self, session_id: SessionId) -> NythosResult<bool>;
}