# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

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

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

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

[lib]
name = "jwks_cache"
path = "src/lib.rs"

[[test]]
name = "integration"
path = "tests/integration/main.rs"

[dependencies.base64]
version = "0.22"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.http]
version = "1.4"

[dependencies.http-cache-semantics]
version = "2.1"

[dependencies.httpdate]
version = "1.0"

[dependencies.jsonwebtoken]
version = "10.2"
features = ["aws_lc_rs"]

[dependencies.metrics]
version = "0.24"
optional = true

[dependencies.metrics-exporter-prometheus]
version = "0.18"
optional = true

[dependencies.rand]
version = "0.9"
features = [
    "small_rng",
    "std",
]

[dependencies.redis]
version = "0.32"
features = [
    "aio",
    "tokio-comp",
]
optional = true
default-features = false

[dependencies.reqwest]
version = "0.12"
features = [
    "http2",
    "json",
    "rustls-tls",
    "stream",
]
default-features = false

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.sha2]
version = "0.10"

[dependencies.smallvec]
version = "1.15"
optional = true

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1.48"
features = [
    "macros",
    "rt-multi-thread",
    "sync",
    "time",
]

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2.5"
features = ["serde"]

[dev-dependencies.metrics-util]
version = "0.20"
features = ["debugging"]

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
]

[dev-dependencies.wiremock]
version = "0.6"

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

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