[package]
authors     = ["Xavier Lau <x@acg.box>"]
categories  = ["asynchronous", "authentication", "caching", "cryptography", "web-programming::http-client"]
description = "High-performance async JWKS cache with ETag revalidation, early refresh, and multi-tenant support — built for modern Rust identity systems."
edition     = "2024"
homepage    = "https://hack.ink/jwks-cache"
keywords    = ["async", "http-cache", "jwks", "jwt", "reqwest"]
license     = "GPL-3.0"
name        = "jwks-cache"
readme      = "README.md"
repository  = "https://github.com/hack-ink/jwks-cache"
version     = "0.2.0"

[package.metadata.docs.rs]
all-features = true

[profile.ci-dev]
incremental = false
inherits    = "dev"

[profile.ci-release]
inherits = "release"
lto      = true

[features]
metrics = [
	"dep:metrics",
	"smallvec",
]
prometheus = [
	"metrics",
	"metrics-exporter-prometheus",
]

[dependencies]
# crates.io
base64                      = { version = "0.22" }
chrono                      = { version = "0.4", features = ["serde"] }
http                        = { version = "1.4" }
http-cache-semantics        = { version = "2.1" }
httpdate                    = { version = "1.0" }
jsonwebtoken                = { version = "10.2", features = ["aws_lc_rs"] }
metrics                     = { version = "0.24", optional = true }
metrics-exporter-prometheus = { version = "0.18", optional = true }
rand                        = { version = "0.9", features = ["small_rng", "std"] }
redis                       = { version = "0.32", optional = true, default-features = false, features = ["aio", "tokio-comp"] }
reqwest                     = { version = "0.12", default-features = false, features = ["http2", "json", "rustls-tls", "stream"] }
serde                       = { version = "1.0", features = ["derive"] }
serde_json                  = { version = "1.0" }
sha2                        = { version = "0.10" }
smallvec                    = { version = "1.15", optional = true }
thiserror                   = { version = "2.0" }
tokio                       = { version = "1.48", features = ["macros", "rt-multi-thread", "sync", "time"] }
tracing                     = { version = "0.1" }
url                         = { version = "2.5", features = ["serde"] }

[dev-dependencies]
# crates.io
metrics-util       = { version = "0.20", features = ["debugging"] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
wiremock           = { version = "0.6" }
