* exp & nbf as float
In order to properly align with JWT NumericType wire protocol
allow for type on wire to either be u64 or f64. In either case we
convert in the most lossless way possible to a u64, so that nobody
needs to know that the spec is overly permissive.
* minimal cleanup
* Improve deserialization performance around validation and its tests
The claims validation was done via deserializing into a Map, which
implies allocations/deallocations. This was done even if the map was not
used afterwards.
This commit improves performance of the validation by never
deserializing in a `Map`, and deserializing only when necessary, to
a struct that typically only borrows from the original b64-decoded
json string.
The validation function interface change required update to the tests,
which are also made easier to read by using the `serde_json::json!`
macro.
* unrelated: fix bench compilation
* 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