A JWT is a standard that defines self-contained way to securely tranmit between server and client as a json object.
JWT should be used during authorization and information exchange
Claims are expected in the Payload Area.THere are 3 types of claims, registered, public, and private.
It is still secure because without knowing what the private key is, the content becomes read-only.
Hash(payload + secret)
By sending a hash that contains the content concatenated with the secret, we can ensure that the information will remain confidenial and if in the event of a interception, we can be assured that the content will not be albe to be changed.
Because it allows for information to be transferred securely between two systems. Also, they are digitally signed so the information is trusted and secure.
Because it is compact, it can be sent via a URL and is fast to be transferred. Self contained makes it so we can avoid querying the database more than we need to.
Header, Payload, Signature