You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jws.Encode properly encodes private claims, however, jws.Decode ignores private claims and the resulting structure only contains the standard claims. It should also populate the "Private Claims" field.
The following modification to TestSignAndVerify will currently fail:
EDIT: Since there doesn't appear to be an easy way to fix this issue in the jws package with encoding/json, I've temporarily vendored an inefficient patch in my code that decodes the JWS twice: once into the claims struct, and once into the PirvateClaims map and then deletes the standard claims from the private claims map. Obviously this is not ideal.
The text was updated successfully, but these errors were encountered:
@SamWhited Yes, reuse of the existing types is currently difficult if you need customization. I recently raised Issue #193 to request extensibility of Header along the lines of ClaimSet.PrivateClaims. Hopefully, some more consideration for extensibility for both types will be provided so you're not forced into vendoring or outright code duplication.
jws.Encode
properly encodes private claims, however,jws.Decode
ignores private claims and the resulting structure only contains the standard claims. It should also populate the "Private Claims" field.The following modification to
TestSignAndVerify
will currently fail:EDIT: Since there doesn't appear to be an easy way to fix this issue in the jws package with
encoding/json
, I've temporarily vendored an inefficient patch in my code that decodes the JWS twice: once into the claims struct, and once into the PirvateClaims map and then deletes the standard claims from the private claims map. Obviously this is not ideal.The text was updated successfully, but these errors were encountered: