mirror of
https://github.com/nullishamy/ferri.git
synced 2025-06-28 00:54:17 +00:00
feat: auth basics
This commit is contained in:
parent
005c13e1d4
commit
9c7c2858cc
11 changed files with 215 additions and 29 deletions
|
@ -13,5 +13,5 @@ uuid = { workspace = true }
|
|||
|
||||
base64 = "0.22.1"
|
||||
rsa = { version = "0.9.8", features = ["sha2"] }
|
||||
rand = "0.8"
|
||||
rand = { workspace = true }
|
||||
url = "2.5.4"
|
||||
|
|
|
@ -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