use crate::entities::UserId; use std::future::Future; pub trait AuthPort { fn generate_token(&self, user_id: UserId) -> String; fn validate_token(&self, token: &str) -> Option; } pub trait PasswordHashPort { fn hash(&self, plain: &str) -> impl Future> + Send; fn verify(&self, plain: &str, hash: &str) -> impl Future> + Send; }