
Check out how to install it in the "Installing Requirements" section PyJWT with the cryptography dependency installed.

#Decode token for free#
If you want to know more about JWTs, you should check this page that talks about JSON web tokens in a very practical way, or if you want a more in-depth resource, I recommend the "JWT Handbook" available for free in the link below. In the RFC7519, you'll also find the description of what each claim means. The signature itself is based on the header and payload, in combination with a secret, or private/public key pair, depending on the algorithm.Ĭlaims follow the standard key-value pairing that you see in dictionaries and JSON objects, and most of the claims commonly used in JWTs have a standardized naming defined in the JWT specification (RFC7519). The final part is the signature, and it helps you ensure that a given token wasn't tampered with because signing JWTs requires either a secret or a public/private key pair agreed on previously. In a login scenario, this would be information about the user. While the payload (or the body) carries information about a given asset.In the header, we find claims about the token itself, like what algorithm was used for signing that token.The header and payload both have what we call claims, they are statements about an entity and all additional data that needs to be passed in the request:

They are defined as a 3 part structure consisting of a header, a payload, and a signature. JSON Web Tokens are a very compact way to carry information.
