traits
traits copied to clipboard
JWK Serialization for RFC7638 Thumbprints
The JwkEcKey struct supports serialization to JSON, but does so in a manner where the fields are always specified to match the human-readable output (i.e. with kty
first). Unfortunately, this makes the serialization incompatible with RFC7638, JSON Web Key Thumbprints, which requires that fields are serialized in lexicographic order.
It would be great to have either (a) the default serialization output lexicographic order, so that it can be used as the input to a JWK thumbprint, or (b) a wrapper struct for serializing a JWK in lexicographic order to create a JWK thumbprint.
I guess, ideally, this would end up in the JOSE crate, but I'm opening the issue here b/c this is where I discovered the issue, and it looks like the JOSE crate isn't yet implemented.