Skip to content

Commit

Permalink
Prepare for 8.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Keats committed Dec 3, 2022
1 parent a11df50 commit db10dd4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 8.2.0 (2022-12-03)

- Add DecodingKey::from_jwk
- Can now use PEM certificates if you have the `use_pem` feature enabled


## 8.1.1 (2022-06-17)

- Fix invalid field name on OctetKeyParameters
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jsonwebtoken"
version = "8.1.1"
version = "8.2.0"
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
license = "MIT"
readme = "README.md"
Expand All @@ -23,7 +23,7 @@ simple_asn1 = {version = "0.6", optional = true}
[dev-dependencies]
# For the custom time example
time = "0.3"
criterion = "0.3"
criterion = "0.4"

[features]
default = ["use_pem"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ let token = decode::<Claims>(&token, &DecodingKey::from_secret("secret".as_ref()
- validation of at least one reserved claim failed

As with encoding, when using HS256, HS2384 or HS512, the key is always a shared secret like in the example above. When using
RSA/EC, the key should always be the content of the public key in the PEM or DER format.
RSA/EC, the key should always be the content of the public key in the PEM (or certificate in this case) or DER format.

In some cases, for example if you don't know the algorithm used or need to grab the `kid`, you can choose to decode only the header:

Expand Down

0 comments on commit db10dd4

Please sign in to comment.