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
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
b6dafd63dd
Make Validation::algorithms an error if empty
2022-02-02 22:10:11 +01:00
Vincent Prouillet
c9442834ed
Make DecodingKey own all the data
...
Closes #120
Supersedes #128
2022-02-02 22:10:11 +01:00
Vincent Prouillet
f50e4901cb
Avoid allocation
2022-02-02 22:10:11 +01:00
Adrian Black
2aad217087
add verify_sig fn ( #161 )
...
* add verify_sig fn
* fix missing comma
* fmt whitespace changes
2022-02-02 22:10:11 +01:00
Vincent Prouillet
d2c8ae3f11
Impl PartialEq for ErrorKind
...
Closes #125
2022-02-02 22:10:11 +01:00
Vincent Prouillet
5c706b005a
Remove deprecated fn
2022-02-02 22:10:11 +01:00
Vincent Prouillet
ea4ed55551
Bytes everywhere for sign/verify
2022-02-02 22:10:11 +01:00
Charles Lehner
2178cc7506
Add EdDSA (Ed25519) ( #154 )
2022-02-02 22:10:11 +01:00
Piotr Maks
29aad97739
Format code and check style in Github Actions ( #145 )
2020-08-07 18:10:26 +02:00
Craig Colegrove
64f276c814
Add new function and tests ( #138 )
...
Co-authored-by: Vincent Prouillet <balthek@gmail.com>
2020-06-30 20:03:53 +02:00
Vincent Prouillet
6262b4700b
Slight tweaks
2020-06-30 19:58:11 +02:00
Craig Colegrove
636c0dc203
Rename dangerous_unsafe_decode to dangerous_insecure_decode ( #139 )
...
* Rename dangerous_unsafe_decode to dangerous_insecure_decode
* Add back old function name with deprecation flag
2020-06-30 19:50:45 +02:00
Hexilee
946aef1b57
revert breaking change of DecodingKey
2020-02-28 15:20:41 +08:00
Hexilee
a750d5586f
fix issue 120: DecodingKey can be converted to static
2020-02-28 01:26:58 +08:00
Vincent Prouillet
689cc6d32e
Validate key type with algo in encode/decode
2020-01-13 19:41:06 +01:00
Vincent Prouillet
77ae0effc8
Add DecodingKey
2019-12-29 21:50:06 +01:00
Vincent Prouillet
51dacd9bc4
Update docs
2019-11-14 19:43:43 +01:00
Vincent Prouillet
8e4757cb1d
More refactoring in the crypto mod
2019-11-11 20:29:57 +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