From 6ba03b79be1df73d974107325d67199a965d746f Mon Sep 17 00:00:00 2001 From: DenebTM Date: Sat, 10 Feb 2024 10:51:56 +0100 Subject: [PATCH] authenticator skeleton --- src/auth.rs | 13 +++++++++++++ src/main.rs | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 src/auth.rs diff --git a/src/auth.rs b/src/auth.rs new file mode 100644 index 0000000..e69d218 --- /dev/null +++ b/src/auth.rs @@ -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!() + } +} diff --git a/src/main.rs b/src/main.rs index 89f6cb1..d2bd204 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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};