mirror of
https://github.com/nullishamy/ferri.git
synced 2025-06-28 09:04:18 +00:00
feat: auth basics
This commit is contained in:
parent
005c13e1d4
commit
9c7c2858cc
11 changed files with 215 additions and 29 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue