I think the naming is somewhat confusing, at least to my understanding since Unprotected data may be protected. Maybe it would be better to move the Unprotected contents to a Common struct and reference it from both Protected and Unprotected?
Also not sure how this should interact with JWEs since they have the same headers. Would jose_alg be better named jose_common or something like that?
Currently,
Unprotected
has https://www.rfc-editor.org/rfc/rfc7515#section-4.1 claims, andProtected
just wraps these claims.I think the naming is somewhat confusing, at least to my understanding since
Unprotected
data may be protected. Maybe it would be better to move theUnprotected
contents to aCommon
struct and reference it from bothProtected
andUnprotected
?Also not sure how this should interact with JWEs since they have the same headers. Would
jose_alg
be better namedjose_common
or something like that?