-
|
Hello, im trying jwt-go and found no way to modify header claims. Is there a way that im missing or i need to modify the code to accept it? If you dont mind i can provide the diff after the change. thanks in advance, BR |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
|
sorry, my mistake on last note, deleted to avoid confusion. |
Beta Was this translation helpful? Give feedback.
-
|
What is the header you're referring to, any chance you can share some code snippet or link so we can better understand? The smallest reproducible example would help us here.. |
Beta Was this translation helpful? Give feedback.
-
|
for sure. im working with something called stir and shaken (specs: atis100082, atis100074, atis 100085 and the rfc's referenced from those documents, 8224, 8225,8226,7519, and others)
for diverted/re routed calls (atis100085) header is
BR |
Beta Was this translation helpful? Give feedback.
-
|
You can just use You can see an example here https://github.com/oxisto/oauth2go/blob/b135c891f36ea062cb72a9f8d34a7900e0bf3783/server_test.go#L61-L66 |
Beta Was this translation helpful? Give feedback.
-
|
great!! thanks, that helped. |
Beta Was this translation helpful? Give feedback.
You can just use
jwt.NewWithClaimsto retrieve aTokenobject and just modify theHeaderof it before signing it withSignedString.You can see an example here https://github.com/oxisto/oauth2go/blob/b135c891f36ea062cb72a9f8d34a7900e0bf3783/server_test.go#L61-L66