authenticator skeleton

This commit is contained in:
deneb 2024-02-10 10:51:56 +01:00
parent bde8d3da15
commit 6ba03b79be
2 changed files with 15 additions and 0 deletions

13
src/auth.rs Normal file
View file

@ -0,0 +1,13 @@
pub struct Authenticator {
// TODO
}
impl Authenticator {
pub fn new(/* database credentials ? */) -> Self {
Self {}
}
pub fn create_user_token(username: &str, password: &str) -> String {
todo!()
}
}

View file

@ -19,6 +19,8 @@
#![warn(clippy::pedantic, clippy::as_conversions)]
#![forbid(unsafe_code)]
mod auth;
use color_eyre::Result;
use tracing::{event, instrument, Level};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};