File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 9.0.0 (2023-10-16)
4
+
5
+ - Update ring
6
+ - Rejects JWTs containing audiences when the Validation doesn't contain any
7
+
3
8
## 8.3.0 (2023-03-15)
4
9
5
10
- Update base64
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " jsonwebtoken"
3
- version = " 8.3 .0"
3
+ version = " 9.0 .0"
4
4
authors = [" Vincent Prouillet <hello@vincentprouillet.com>" ]
5
5
license = " MIT"
6
6
readme = " README.md"
@@ -15,10 +15,10 @@ rust-version = "1.67.0"
15
15
[dependencies ]
16
16
serde_json = " 1.0"
17
17
serde = {version = " 1.0" , features = [" derive" ] }
18
- ring = { version = " 0.17.3 " , features = [" std" ] }
18
+ ring = { version = " 0.17.4 " , features = [" std" ] }
19
19
base64 = " 0.21.0"
20
20
# For PEM decoding
21
- pem = {version = " 2 " , optional = true }
21
+ pem = {version = " 3 " , optional = true }
22
22
simple_asn1 = {version = " 0.6" , optional = true }
23
23
24
24
[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ See [JSON Web Tokens](https://en.wikipedia.org/wiki/JSON_Web_Token) for more inf
8
8
Add the following to Cargo.toml:
9
9
10
10
``` toml
11
- jsonwebtoken = " 8 "
11
+ jsonwebtoken = " 9 "
12
12
# If you do not need pem decoding, you can disable the default feature `use_pem` that way:
13
- # jsonwebtoken = {version = "8 ", default-features = false }
13
+ # jsonwebtoken = {version = "9 ", default-features = false }
14
14
serde = {version = " 1.0" , features = [" derive" ] }
15
15
```
16
16
@@ -157,7 +157,8 @@ openssl pkcs8 -topk8 -nocrypt -in sec1.pem -out pkcs8.pem
157
157
158
158
## Validation
159
159
This library validates automatically the ` exp ` claim and ` nbf ` is validated if present. You can also validate the ` sub ` , ` iss ` and ` aud ` but
160
- those require setting the expected value in the ` Validation ` struct.
160
+ those require setting the expected value in the ` Validation ` struct. In the case of ` aud ` , if there is a value set in the token but
161
+ not in the ` Validation ` , the token will be rejected.
161
162
162
163
Since validating time fields is always a bit tricky due to clock skew,
163
164
you can add some leeway to the ` iat ` , ` exp ` and ` nbf ` validation by setting the ` leeway ` field.
You can’t perform that action at this time.
0 commit comments