Skip to content

feat(token): add SetType and SetContentType header helpers to Token (fix #497) - #534

Open
Jaymr1031-Z wants to merge 1 commit into
golang-jwt:mainfrom
Jaymr1031-Z:feat/token-header-setters
Open

feat(token): add SetType and SetContentType header helpers to Token (fix #497)#534
Jaymr1031-Z wants to merge 1 commit into
golang-jwt:mainfrom
Jaymr1031-Z:feat/token-header-setters

Conversation

@Jaymr1031-Z

Copy link
Copy Markdown

Fixes #497

Summary

Adds convenience helper methods on Token to set standard RFC 7519 header parameters typ (Type, Section 5.1) and cty (Content Type, Section 5.2) without requiring manual map mutation.

Changes

  • Added Token.SetType(typ string)
  • Added Token.SetContentType(cty string)
  • Added TestToken_SetTypeAndContentType in token_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add helpers for setting typ and cty header parameters

1 participant