I'm very aware a bunch of stuff needs to change. There are lots of improvements to be made as well. I think I also have to add MIT as a license option. But this code dump represents a somewhat fully featured implementation of JWK and JWS. All tests pass. A few things worthy of note:
-
Signing and verification is streamed. This is useful for large detached signatures.
-
There is a manual base64 implementation embedded. This needs to be reconciled with base64ct
.
-
There may be some pain points splitting this into separate crates. Particularly, I'm thinking about foreign trait impls.
-
There are questions about what to do with shared data types. For example: Thumbprint
. Also, should JWS/JWE have a hard dependency on JWK?
-
I don't currently allow unknown header parameters due to this bug: https://github.com/serde-rs/serde/issues/2200
As always, your feedback is genuinely welcome. I'm not committed to anything.
@tarcieri @CBenoit @Erik1000