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:
+3
-3
@@ -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"] }
|
||||
|
||||
Reference in New Issue
Block a user