• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to build simple JWT structure?  RSS feed

 
Ranch Hand
Posts: 1514
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the example at jwt.io, and related Java Postings, which (confusingly) don't use the same example data, I'm not able to create the same hashed value they have on their page.

This is the code I"m working with from that page:



But it doesn't generate the same value as shown there.

For me, using the code above, I get: "eyJhbGciOiJIUzI1NiJ9.ewogICJzdWIiOiAiMTIzNDU2Nzg5MCIsCiAgIm5hbWUiOiAiSm9obiBEb2UiLAogICJhZG1pbiI6IHRydWUKfQ.9kg87S4P-lGhcSpT5r-sQfSyxgD5GhwmnN4LFZjw8uI"

It's not clear if I need to specify the header or exactly how to do it if needed.

The examples I've found suffer from snippet-only presentation, but not a full working simple-to-understand example.

Would appreciate any suggestions how to get the same hashed value as shown on jwt.io.

I'm sure I'm missing something basic...

Thanks,

- mike


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!