• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

How to build simple JWT structure?  RSS feed

 
Ranch Hand
Posts: 1593
13
  • 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!