Commit Graph

41 Commits

Author SHA1 Message Date
Vincent Prouillet 5ed8af440c Rename set_iss to be in line with set_audience 2022-02-02 22:10:11 +01:00
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
Vincent Prouillet a11106faff Add types for JWK/JWKS based on biscuit (#195)
* Add types for JWK/JWKS based on biscuit

* Address comments

* Fix issues
2022-02-02 22:10:11 +01:00
Vincent Prouillet 48770d4797 Prepare for v8 2022-02-02 22:10:11 +01:00
Vincent Prouillet 874952b7a5 More clippy 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
Vincent Prouillet d6d0da7ab9
Merge pull request #83 from rakenodiax/chrono-example
Add example of using `chrono::DateTime` in claims
2019-06-16 18:13:43 +02:00
Vincent Prouillet 20013a4e4f Fixed conflicts 2019-06-16 18:00:00 +02:00
Vincent Prouillet 84ee604e88 trait -> enum 2019-06-16 17:51:43 +02:00
Jake Shadle bae7a12a4b Fix examples 2019-05-15 16:20:09 +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
Vincent Prouillet 8f0809318d rustfmt 2018-10-28 19:58:35 +01:00
Vincent Prouillet ab0ab9b48b Update examples and readme for exp use 2018-10-28 19:54:35 +01:00
Vincent Prouillet eae3743017 Make it mandatory to specify algorithm 2017-10-22 13:23:46 +02:00
Vincent Prouillet fc9f83b837 No need to pass an algorithm to decode 2017-04-22 15:21:44 +09:00
Vincent Prouillet 57c513c757 Actually take a ref to Validation
Seems like I updated the docs but not the code...
2017-04-14 20:32:40 +09:00
Vincent Prouillet d144227256 Reorganise a bit and add more docs 2017-04-13 16:36:32 +09:00
Vincent Prouillet 3e3c752974 Update README 2017-04-13 10:29:30 +09:00
Vincent Prouillet 410499e6b6 Add validation 2017-04-12 17:51:05 +09:00
Vincent Prouillet c244e835e0 Take ref to Header, not by value 2017-04-11 12:54:32 +09:00
Vincent Prouillet e3a4294e85 Move to serde + base64
Remove Part trait
Move tests to tests directory
Reorganise code
2017-04-11 12:40:40 +09:00
Vincent Prouillet e715eb4930 Fix example 2016-12-26 13:20:18 +09:00
Vincent Prouillet 60b511a97a Print token on claims example 2016-03-23 13:27:46 +00:00
Vincent Prouillet 002f8a8c7f Change order of encode method args + make alg field public 2015-12-21 19:24:13 +00:00
Vincent Prouillet f7e87663e2 More examples + fix header struct access 2015-12-20 01:17:10 +00:00
Vincent Prouillet 1179eb8b55 Add all params of header from RFC 2015-12-18 21:07:48 +00:00
Markus Unterwaditzer d6d0ce058b Allow non-UTF8 keys for decoding too 2015-12-16 18:40:28 +01:00
Kevin Butler 4ebcfca049 Rewrite decode 2015-11-06 22:45:47 +00:00
Kevin Butler 09c4d14609 Weaken parameter requirements for encode 2015-11-06 17:23:29 +00:00
Vincent Prouillet fb229e1425 Better example 2015-11-03 16:00:52 +00:00
Vincent Prouillet 31d99324e2 Remove useless import + improve readme 2015-11-02 23:32:32 +00:00
Vincent Prouillet e11579c604 Rename to jsonwebtoken 2015-11-02 23:27:28 +00:00
Vincent Prouillet 2057a0ac1f Start of README 2015-11-02 21:04:58 +00:00
Vincent Prouillet 3f9b05bbed Add example + travis 2015-11-02 20:34:11 +00:00