Prepare for v8
This commit is contained in:
parent
874952b7a5
commit
48770d4797
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
- Add EdDSA algorithm
|
- Add EdDSA algorithm
|
||||||
- `sign`/`verify` now takes a `&[u8]` instead of `&str` to be more flexible
|
- `sign`/`verify` now takes a `&[u8]` instead of `&str` to be more flexible
|
||||||
|
- `DecodingKey` now own its data
|
||||||
|
- Remove deprecated `dangerous_unsafe_decode`
|
||||||
|
|
||||||
## 7.2.0 (2020-06-30)
|
## 7.2.0 (2020-06-30)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "jsonwebtoken"
|
name = "jsonwebtoken"
|
||||||
version = "8.0.0"
|
version = "8.0.0-beta.0"
|
||||||
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
|
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -9,7 +9,7 @@ homepage = "https://github.com/Keats/jsonwebtoken"
|
||||||
repository = "https://github.com/Keats/jsonwebtoken"
|
repository = "https://github.com/Keats/jsonwebtoken"
|
||||||
keywords = ["jwt", "web", "api", "token", "jwk"]
|
keywords = ["jwt", "web", "api", "token", "jwk"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md"]
|
include = ["src/**/*", "benches/**/*", "tests/**/*", "LICENSE", "README.md", "CHANGELOG.md"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
|
@ -15,7 +15,8 @@ fn main() {
|
||||||
Claims { sub: "b@b.com".to_owned(), company: "ACME".to_owned(), exp: 10000000000 };
|
Claims { sub: "b@b.com".to_owned(), company: "ACME".to_owned(), exp: 10000000000 };
|
||||||
let key = b"secret";
|
let key = b"secret";
|
||||||
|
|
||||||
let header = Header { kid: Some("signing_key".to_owned()), alg: Algorithm::HS512, ..Default::default() };
|
let header =
|
||||||
|
Header { kid: Some("signing_key".to_owned()), alg: Algorithm::HS512, ..Default::default() };
|
||||||
|
|
||||||
let token = match encode(&header, &my_claims, &EncodingKey::from_secret(key)) {
|
let token = match encode(&header, &my_claims, &EncodingKey::from_secret(key)) {
|
||||||
Ok(t) => t,
|
Ok(t) => t,
|
||||||
|
|
Loading…
Reference in New Issue