Files
iam-service/Cargo.toml
2026-02-11 14:03:03 +08:00

77 lines
1.8 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[package]
name = "iam-service"
version = "0.1.0"
edition = "2024"
[dependencies]
common-telemetry = { version = "0.1.5", registry = "kellnr", default-features = false, features = [
"response",
"telemetry",
"with-anyhow",
"with-sqlx",
] } # 内部公共库(统一错误/响应/日志/Telemetry
auth-kit = { version = "0.1.1", registry = "kellnr" } # 认证库JWT、OAuth2
# Web 框架与 HTTP 基础
axum = "0.8.8"
http = "1.4.0"
# 异步运行时与通用异步工具
async-trait = "0.1.89"
tokio = { version = "1", features = ["full"] }
# 序列化
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# 数据库 (PostgreSQL)
sqlx = { version = "0.8", features = [
"chrono",
"json",
"postgres",
"runtime-tokio-native-tls",
"uuid",
] }
# 配置管理
config = "0.15.19" # 方便读取配置
dotenvy = "0.15" # 加载 .env
# 错误处理
anyhow = "1"
thiserror = "2.0.18"
# 可观测性(日志与 tracing
tracing = "0.1"
tracing-subscriber = "0.3"
# 安全与加密密码、JWT、密钥/编码)
argon2 = "0.5"
base64 = "0.22.1"
hex = "0.4.3"
jsonwebtoken = { version = "10.3.0", features = ["aws_lc_rs"] }
rand = "0.9.2"
rsa = "0.9.10"
uuid = { version = "1", features = ["v4", "serde"] }
hmac = "0.12.1"
sha2 = "0.10.9"
redis = { version = "0.27.6", features = ["tokio-comp", "connection-manager"] }
# API 文档 (OpenAPI/Scalar)
utoipa = { version = "5", features = ["axum_extras", "uuid", "chrono"] }
utoipa-scalar = { version = "0.3.0", features = ["axum"] } # Scalar 集成
# 中间件组件(限流)
governor = "0.10.4"
ipnet = "2.11.0"
tower_governor = { version = "0.8.0", features = ["axum"] }
# 时间处理
chrono = "0.4.43"
url = "2.5.4"
percent-encoding = "2.3.2"
[dev-dependencies]
# 测试工具
tower = "0.5"