From 4e8a4f06c96f8a7f8e49d7b8e8a359dedfb961f8 Mon Sep 17 00:00:00 2001 From: Sphereso Date: Tue, 1 Apr 2025 12:30:50 +0200 Subject: [PATCH] argon2 --- crates/backend/Cargo.toml | 2 ++ crates/backend/src/main.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml index 310a889..261c06c 100644 --- a/crates/backend/Cargo.toml +++ b/crates/backend/Cargo.toml @@ -13,6 +13,8 @@ actix-cors = "0.7" actix-files = "0.6" tracing-actix-web = "0.7.16" +argon2 = "0.5.3" + env_logger = "0.11" serde = {version = "1", features = ["derive"]} diff --git a/crates/backend/src/main.rs b/crates/backend/src/main.rs index d57ae7c..cefd4d6 100644 --- a/crates/backend/src/main.rs +++ b/crates/backend/src/main.rs @@ -1,6 +1,7 @@ use actix_files::NamedFile; use actix_session::{storage::RedisSessionStore, SessionMiddleware}; use actix_web::{cookie::Key, middleware::Logger, web, App, HttpResponse, HttpServer}; +use argon2::Argon2; use db::Database; use std::env; @@ -25,6 +26,7 @@ async fn main() -> std::io::Result<()> { HttpServer::new(move || { let app = App::new() .app_data(web::Data::new(database.clone())) + .app_data(web::Data::new(Argon2::default())) .wrap(Logger::default()) .wrap(SessionMiddleware::new( redis_conn.clone(),