-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCargo.toml
125 lines (108 loc) · 3.8 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[package]
name = "jwt-compact"
version = "0.9.0-beta.1"
authors = [
"Alex Ostrovski <ostrovski.alex@gmail.com>",
"Akhil Velagapudi <akhilvelagapudi@gmail.com>",
"Frank Denis <github@pureftpd.org>",
"Maximilian Münchow <github@maxmuen.de>",
"Eran Rundstein <eran@rundste.in>",
"Bruno Green",
]
edition = "2021"
rust-version = "1.70"
readme = "README.md"
license = "Apache-2.0"
keywords = ["JWT", "token", "authorization"]
categories = ["web-programming", "cryptography", "no-std"]
description = "Minimalistic JWT implementation with focus on type safety and secure cryptographic primitives"
repository = "https://github.com/slowli/jwt-compact"
exclude = ["e2e-tests"]
[package.metadata.docs.rs]
# Enable non-conflicting additional algorithms in documentation on `docs.rs`.
features = ["exonum-crypto", "es256k", "p256", "rsa"]
# Set `docsrs` to enable unstable `doc(cfg(...))` attributes.
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
# Public dependencies (present in the public API).
anyhow = { version = "1.0.95", default-features = false }
base64ct = { version = "1.5.2", features = ["alloc"] }
ciborium = { version = "0.2.2", default-features = false, optional = true }
chrono = { version = "0.4.39", default-features = false }
rand_core = "0.6.2"
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
# SHA crypto backend (private dependency; re-exported `digest` crate is public).
hmac = "0.12.0"
sha2 = { version = "0.10", default-features = false }
# Private dependencies (not exposed in the public API).
lazy_static = { version = "1.5", optional = true }
smallvec = "1.13.2"
subtle = { version = "2.6.1", default-features = false }
zeroize = { version = "1.8", features = ["zeroize_derive"] }
# Crypto backends (all public dependencies).
secp256k1 = { version = "0.30", optional = true }
[dependencies.k256]
version = "0.13.4"
default-features = false
features = ["ecdsa"]
optional = true
[dependencies.p256]
version = "0.13.0"
default-features = false
features = ["ecdsa"]
optional = true
[dependencies.exonum-crypto]
version = "1.0.0"
default-features = false
features = ["sodiumoxide-crypto"]
optional = true
[dependencies.ed25519-dalek]
version = "2.1.1"
optional = true
default-features = false
[dependencies.ed25519-compact]
version = "2.1.1"
optional = true
default-features = false
features = ["random"]
[dependencies.rsa]
version = "0.9"
optional = true
default-features = false
[dev-dependencies]
assert_matches = "1.3"
const-decoder = "0.4.0"
criterion = "0.5.1"
doc-comment = "0.3.3"
hex-buffer-serde = "0.4.0"
num-bigint = { package = "num-bigint-dig", version = "0.8.2" }
rand = "0.8.3"
uuid = { version = "1.11.0", features = ["serde", "v4"] }
version-sync = "0.9"
[features]
default = ["std", "clock", "ciborium"]
# Enables `std`-specific functionality (such as error types implementing
# the standard `Error` trait).
std = ["anyhow/std", "serde_json/std", "ciborium?/std"]
# Enables getting the current time using `Utc::now()` from `chrono`.
# Without it, some `TimeOptions` constructors, such as the `Default` impl,
# are not available. It is still possible to create `TimeOptions`
# with an excplicitly specified clock function, or to set / verify
# time-related `Claims` fields manually.
clock = ["chrono/clock"]
# `secp256k1` crypto backend; `lazy_static` is required for internal initialization.
es256k = ["secp256k1", "lazy_static"]
# RSA algorithm and its dependencies (currently, `getrandom`-based RNG).
rsa = ["dep:rsa", "rand_core/getrandom", "sha2/oid"]
[[bench]]
name = "encoding"
harness = false
path = "benches/encoding.rs"
required-features = ["std", "clock"]
[[test]]
name = "rsa"
path = "tests/rsa.rs"
required-features = ["rsa/pem"]
[workspace]
members = [".", "e2e-tests/no-std", "e2e-tests/wasm"]