[Logo]
Forums Register Login
How to build simple JWT structure?
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


You know it is dark times when the trees riot. I think this tiny ad is their leader:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA


This thread has been viewed 130 times.

All times above are in ranch (not your local) time.
The current ranch time is
Aug 17, 2018 08:01:48.