feat: auth basics

This commit is contained in:
nullishamy 2025-04-24 20:19:54 +01:00
parent 005c13e1d4
commit 9c7c2858cc
Signed by: amy
SSH key fingerprint: SHA256:WmV0uk6WgAQvDJlM8Ld4mFPHZo02CLXXP5VkwQ5xtyk
11 changed files with 215 additions and 29 deletions

View file

@ -1,2 +1,11 @@
pub mod ap;
pub mod config;
use rand::{Rng, distributions::Alphanumeric};
pub fn gen_token(len: usize) -> String {
rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(len)
.map(char::from)
.collect()
}