Commit Graph

10 Commits

Author SHA1 Message Date
Adam Gleave 369d1090bb (`next`) Remove chrono (#213)
* Remove chrono from all dependencies

* Fix tests

* Fix tests and comments
2022-02-02 22:10:11 +01:00
Vincent Prouillet 1dcfda92f0 Unify various decode into the validation struct (#199) 2022-02-02 22:10:11 +01:00
Piotr Maks 90b9700748
Clippy (#146)
* Bump minimum required Rust version to 1.40

Motivation for this change is use of `#[non_exhaustive]` attribute that
was stabilized in Rust 1.40.0

* Migrate benchmarks to criterion

Remove use of unstable features in favour of criterion benchmarks

* Enable clippy in Github Actions

* Fix clippy::manual_non_exhaustive

Remove manual implementations of the non-exhaustive pattern. Instead
use the `#[non_exhaustive]` attribute.

* Allow reexport of deprecated function

Silence rustc `deprecated` working in function reexport

* Remove redundant clone

* Fix various clippy warnings

* Remove redundant pattern
* Use `unreachable!()` to fail test
* No need to add `&` to all patterns
2020-08-31 12:04:57 +02:00
Valentin Brandl 09aad3ca2f
Fix Broken chrono Example (#126)
* Add quickcheck as test dependencie

* Use timestamp nanos

* Add test property for en/decoding

* Fix existing test

* Remove quickcheck dependency

* Normalize `DateTime` values in claims
2020-04-24 19:57:51 +02:00
Vincent Prouillet 77ae0effc8 Add DecodingKey 2019-12-29 21:50:06 +01:00
Vincent Prouillet 0abeeac25f Add EncodingKey 2019-12-29 19:33:17 +01:00
Vincent Prouillet e3632b3a2c Remove Key approach in favour of &[u8] with pem 2019-11-06 22:32:13 +00:00
Vincent Prouillet 417e00780d Use serde with derive feature 2019-11-03 15:46:08 +00:00
Vincent Prouillet 3c62b98bd9 Update example to v7 style 2019-06-16 18:15:14 +02:00
Kellen Frodelius-Fujimoto 6bac1bdbf0
Add example of using `chrono::DateTime` in claims
Using `chrono`'s `serde` feature uses ISO 8601 instead of a Unix 
timestamp as specified in RFC 7519 section 2, "NumericDate". This 
example uses  custom de/serialize functions as shown in the [serde.rs 
example, "Custom Date 
Format"](https://serde.rs/custom-date-format.html).

NOTE: Currently fractional values are not supported in the example, 
though they are in the spec.
2019-04-01 12:11:28 +02:00