Skip to content

How to parse JWT Header fields? #405

Answered by lestrrat
schuerg asked this question in Q&A
Discussion options

You must be logged in to vote

@schuerg I'm going to take a wild guess, but I think you are confusing JWT and JWS. JWT may arrive to you in signed format, but at that point it's a JWS message. Header fields like alg and kid only exist in the JWS message. So if you want to manually do something with the JWS headers, you should be looking at jws.Parse

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lestrrat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants