diff --git a/src/auth.rs b/src/auth.rs index e022532..eb56446 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -210,18 +210,3 @@ pub async fn logout(week: u8, mut db: Connection, cookies: &CookieJar<'_>) - Redirect::to(uri!(week::week(week))) } - -pub fn bypass_auth_debug(cookies: &CookieJar<'_>) { - if cookies.get_private("auth_token").is_some() { - return - } - let mut hasher = Blake2b512::new(); - hasher.update(b"8"); - hasher.update(SystemTime::now().duration_since(UNIX_EPOCH).expect("Non monotonous time event").as_secs().to_le_bytes()); - let hash = hasher.finalize_fixed().to_ascii_lowercase(); - let hash_str = String::from_utf8_lossy(hash.as_slice()).to_ascii_lowercase(); - cookies.add_private(("auth_token", hash_str.clone())); - cookies.add_private(("auth_id", 8.to_string())); - - println!("Generated hash string : {hash_str}"); -} \ No newline at end of file