Reputation: 11639
I'm reading about JWT and I'm confused about why there's a signature:
What is the purpose of the signature if it's just a hashed version of the header and payload?
Also, why not just use oAuth? Or whatever 2 factor auth uses?
Upvotes: 0
Views: 243
Reputation: 39241
The purpose of Oauth2 and JWT is different, so it is not possible to compare them directly
JWT is self contained and does not need server sessions . The digital signature is performed with server private key and protects the content. Any alteration of the header, the payload or the signature will be detected by the server and reject the token.
Upvotes: 2