Structure (1/1)
Explain the structure of a JWT.
    A JWT consists of three parts: Header, Payload, and Signature. These parts are base64 encoded and concatenated with dots. The structure looks like `header.payload.signature`.
    • Header: The header typically consists of two parts: the type of the token, which is JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA.
    • Payload: The second part of the token is the payload, which contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims. The payload is then Base64Url encoded to form the second part of the JSON Web Token.
    • Signature: The signature is used to verify the message wasn't changed along the way, and, in the case of tokens signed with a private key, it can also verify that the sender of the JWT is who it says it is.
    Structure of the token: