mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Update rand to 0.9
This commit is contained in:
@@ -10,13 +10,13 @@ use axum::{
|
||||
use axum_extra::extract::Host;
|
||||
use headers::{ContentType, HeaderMapExt};
|
||||
use http::{HeaderValue, StatusCode, header};
|
||||
use rand::{Rng, distributions::Alphanumeric};
|
||||
use rand::{Rng, distr::Alphanumeric};
|
||||
use rustical_store::auth::{AuthenticationProvider, User};
|
||||
use serde::Deserialize;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub fn generate_app_token() -> String {
|
||||
rand::thread_rng()
|
||||
rand::rng()
|
||||
.sample_iter(Alphanumeric)
|
||||
.map(char::from)
|
||||
.take(64)
|
||||
|
||||
@@ -19,6 +19,5 @@ chrono.workspace = true
|
||||
password-auth.workspace = true
|
||||
password-hash.workspace = true
|
||||
uuid.workspace = true
|
||||
rand.workspace = true
|
||||
pbkdf2.workspace = true
|
||||
rustical_ical.workspace = true
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
use async_trait::async_trait;
|
||||
use derive_more::Constructor;
|
||||
use password_hash::PasswordHasher;
|
||||
use pbkdf2::{Params, password_hash::SaltString};
|
||||
use rand::rngs::OsRng;
|
||||
use pbkdf2::{
|
||||
Params,
|
||||
password_hash::{SaltString, rand_core::OsRng},
|
||||
};
|
||||
use rustical_store::{
|
||||
Error, Secret,
|
||||
auth::{AuthenticationProvider, User, user::AppToken},
|
||||
|
||||
Reference in New Issue
Block a user