jwtiny 0.2.0

Minimal, type-safe JWT validation library
Documentation
[package]
name = "jwtiny"
version = "0.2.0"
edition = "2021"
authors = ["Sebastian Müller <c@sbstjn.com>"]
description = "Minimal, type-safe JWT validation library"
license = "MIT"
repository = "https://github.com/sbstjn/jwtiny"

[features]
default = []

# RSA and ECDSA algorithm features
# Default backend: ring
rsa = ["dep:ring"]
ecdsa = ["dep:ring"]
# Switch backend to aws-lc-rs for all asymmetric algorithms
aws-lc-rs = ["dep:aws-lc-rs"]

# Convenience feature
all-algorithms = ["rsa", "ecdsa"]

# Remote fetching features
remote = []
remote-rustls = ["remote", "dep:rustls", "dep:webpki-roots", "dep:rustls-pki-types"]

[dependencies]
# Core - minimal JSON serialization
miniserde = "0.1"

# HMAC algorithms (always enabled)
hmac = "0.12"
sha2 = "0.10"
constant_time_eq = "0.4.2"

# RSA and ECDSA algorithms (optional)
# Default backend: ring
ring = { version = "0.17", optional = true }
# Alternative backend: aws-lc-rs
aws-lc-rs = { version = "1", optional = true }

# Remote fetching (optional)
rustls = { version = "0.23", optional = true }
webpki-roots = { version = "0.26", optional = true }
rustls-pki-types = { version = "1.7", optional = true }

[dev-dependencies]
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
# For RSA key generation in tests
rsa = { version = "0.9", features = ["std"] }
rand = "0.8"
# HTTP client for test helper (only used in tests)
reqwest = { version = "0.12", features = ["json"] }
serde_json = "1.0"
# For benchmarking
criterion = { version = "0.5", features = ["html_reports"] }
base64 = "0.21"
# For comparison benchmarks (only used in jsonwebtoken_comparison bench)
jsonwebtoken = "9"

[[example]]
name = "basic"

[[example]]
name = "multi_algorithm"
required-features = ["all-algorithms"]

[[bench]]
name = "rsa_signature_verification"
harness = false

[[bench]]
name = "rsa_end_to_end"
harness = false

[[bench]]
name = "rsa_jsonwebtoken_comparison"
harness = false

[[bench]]
name = "hmac_algorithms"
harness = false

[[bench]]
name = "token_parsing"
harness = false

[[bench]]
name = "claims_validation"
harness = false

[[bench]]
name = "ecdsa_algorithms"
harness = false
required-features = ["ecdsa"]

[[bench]]
name = "algorithm_selection"
harness = false

[[bench]]
name = "jwks_caching"
harness = false
required-features = ["remote"]