use std::sync::Arc; use tokio::sync::Mutex; use tracing::instrument; use crate::{ db::{/* Database, */ SqliteDatabase}, secrets::{Password, UserToken}, }; #[derive(Debug)] pub struct Authenticator { db: Arc>, } impl Authenticator { pub fn new(db: Arc>) -> Self { Self { db } } #[instrument] pub async fn create_user_token(&mut self, username: &str, password: &Password) -> UserToken { todo!() } #[instrument] pub async fn verify_user_token(&self, username: &str, token: &UserToken) -> bool { todo!() } }