Commit Graph

17 Commits

Author SHA1 Message Date
Ten0 f9771f7835 Improve deserialization performance around validation and its tests (#202)
* 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
2022-02-02 22:10:11 +01:00
Saber Haj Rabiee 45fb43c1f7 removed unnecessary conversions (#180)
* removed unnecessary conversions
2022-02-02 22:10:11 +01:00
Vincent Prouillet 51dacd9bc4 Update docs 2019-11-14 19:43:43 +01:00
Vincent Prouillet 1f6d0ffb2c Refactor decoding 2019-11-11 20:16:34 +01:00
Vincent Prouillet b27981549f Not working yet jwk decoding 2019-11-09 11:42:40 +00:00
Vincent Prouillet 34ea194179 Move crypto to a dir 2019-11-08 19:00:19 +00:00
Vincent Prouillet e3632b3a2c Remove Key approach in favour of &[u8] with pem 2019-11-06 22:32:13 +00:00
Vincent Prouillet 73d96357c3 Simplify header decoding 2019-11-03 16:13:22 +00:00
Vincent Prouillet b8627260b2 Update to edition 2018 2019-07-06 20:36:32 +02:00
Vincent Prouillet 8f0809318d rustfmt 2018-10-28 19:58:35 +01:00
Mike Engel 5758c0008c
Make the `TokenData` struct public 2017-07-02 15:49:14 -06:00
Mike Engel cbd9b236da
Remove trait from `TokenData` struct 2017-04-21 23:41:25 -06:00
Mike Engel 0932f14bc2
Migrate `Deserialize` trait to `DeserializeOwned` for Serde 1.0 2017-04-21 23:21:04 -06:00
Vincent Prouillet 35fd9d63cc Add some docs 2017-04-13 10:08:07 +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 f7d0a7a002 Work on RSA 2017-04-11 12:40:55 +09:00