Update config and dependencies for auth

Refactor configuration loading to separate user credentials from server
settings.
Update dependencies to their latest compatible versions to leverage new
features
and security patches.

Key changes include:
- Moving user credentials (`api_key`, `web_password`, `role`) from
  `.env`
  to a dedicated `users.toml` file for better manageability and
  security.
- Introducing an `AuthenticatedUser` struct and extractor for API
  key-based
  authentication.
- Updating `axum` and related crates to leverage Rust edition 2024
  improvements.
- Adjusting configuration values and tests to reflect these changes.
This commit is contained in:
2026-04-13 12:51:27 +02:00
parent 80a6537e16
commit 08c6e12a74
8 changed files with 237 additions and 98 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"
[dependencies]
axum = "0.7"
axum = "0.8"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.12", features = ["json", "multipart"] }
askama = "0.12"
@@ -16,10 +16,10 @@ uuid = { version = "1", features = ["v4"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
tower-http = { version = "0.5", features = ["limit", "trace"] }
tower-http = { version = "0.6", features = ["limit", "trace"] }
rand = "0.8"
bcrypt = "0.15"
axum-extra = { version = "0.9", features = ["cookie"] }
axum-extra = { version = "0.12", features = ["cookie"] }
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }