From 772c7844c4ca1de632f64eb9428e8e97eea64ac1 Mon Sep 17 00:00:00 2001 From: Daniel Hader Date: Fri, 29 May 2026 18:14:31 -0500 Subject: login page interaction with server --- src/auth.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/auth.rs') diff --git a/src/auth.rs b/src/auth.rs index 90ce4a5..a621756 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -1,3 +1,5 @@ +use axum::{extract::FromRequestParts, http::{StatusCode, request::Parts}}; +use serde::Serialize; use argon2::{Argon2, PasswordHash, PasswordVerifier, password_hash::{ Error, PasswordHasher, SaltString, rand_core::OsRng }}; @@ -14,6 +16,29 @@ pub fn check_password(password: &str, password_hash: &str) -> Result Result + +pub struct AuthUser(pub Claims); + +impl FromRequestParts for AuthUser { + type Rejection = StatusCode; + + async fn from_request_parts( + parts: &mut Parts, + state: &S, + ) -> Result { + todo!(); + } +} + #[cfg(test)] mod tests { use super::*; -- cgit v1.2.3