Currently applications must mutate the Token.Header map directly to set header parameters typ RFC7519 Section 5.1 and cty RFC7519 Section 5.2.
Example:
token.Header["typ"] = "JWT"
This issue proposes adding small helper methods:
token.SetType("at+jwt")
token.SetContentType("JWT")
These would simply modify Token.Header internally and would not change signing or validation behaviour.
This may improve discoverability for these registered header parameters.
Related discussion: #238
Currently applications must mutate the
Token.Headermap directly to set header parameterstypRFC7519 Section 5.1 andctyRFC7519 Section 5.2.Example:
This issue proposes adding small helper methods:
These would simply modify Token.Header internally and would not change signing or validation behaviour.
This may improve discoverability for these registered header parameters.
Related discussion: #238