- Added cookie key to AppState for managing session cookies. - Updated AppState initialization to derive cookie key from configuration. - Removed session-based authentication option from cargo-generate prompts. - Refactored JWT authentication logic to improve clarity and error handling. - Updated password validation to align with NIST recommendations (minimum length increased). - Removed unused session store implementation and related code. - Improved error handling in user repository for unique constraint violations. - Refactored OIDC service to include state management for authentication flow. - Cleaned up dependencies in Cargo.toml and Cargo.toml.template for clarity and efficiency.
50 lines
1.1 KiB
TOML
50 lines
1.1 KiB
TOML
[package]
|
|
name = "api"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
default-run = "api"
|
|
|
|
[features]
|
|
default = ["sqlite", "auth-jwt"]
|
|
sqlite = ["infra/sqlite"]
|
|
postgres = ["infra/postgres"]
|
|
auth-oidc = ["infra/auth-oidc"]
|
|
auth-jwt = ["infra/auth-jwt"]
|
|
|
|
[dependencies]
|
|
k-core = { git = "https://git.gabrielkaszewski.dev/GKaszewski/k-core", features = [
|
|
"logging",
|
|
"db-sqlx",
|
|
"sqlite",
|
|
"http",
|
|
] }
|
|
domain = { path = "../domain" }
|
|
infra = { path = "../infra", default-features = false, features = ["sqlite"] }
|
|
|
|
# Web framework
|
|
axum = { version = "0.8.8", features = ["macros"] }
|
|
axum-extra = { version = "0.10", features = ["cookie-private", "cookie-key-expansion"] }
|
|
tower = "0.5.2"
|
|
tower-http = { version = "0.6.2", features = ["cors", "trace"] }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1.48.0", features = ["full"] }
|
|
|
|
# Serialization
|
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# Error handling
|
|
thiserror = "2.0.17"
|
|
anyhow = "1.0"
|
|
|
|
# Utilities
|
|
chrono = { version = "0.4.42", features = ["serde"] }
|
|
uuid = { version = "1.19.0", features = ["v4", "serde"] }
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
|
|
dotenvy = "0.15.7"
|
|
time = "0.3"
|