0
0
Spring Bootframework~5 mins

JWT structure (header, payload, signature) in Spring Boot - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are the three main parts of a JWT?
A JWT has three parts: Header, Payload, and Signature. These parts are separated by dots (.) in the token string.
Click to reveal answer
beginner
What information does the JWT header contain?
The header usually contains the type of token (which is JWT) and the signing algorithm used, like HS256 or RS256.
Click to reveal answer
beginner
What is stored in the JWT payload?
The payload contains the claims, which are statements about an entity (usually the user) and additional data. Claims can be registered, public, or private.
Click to reveal answer
beginner
What is the purpose of the JWT signature?
The signature is used to verify that the token was not changed after it was issued. It is created by encoding the header and payload and signing them with a secret or private key.
Click to reveal answer
beginner
How are the parts of a JWT separated in the token string?
The three parts of a JWT (header, payload, signature) are separated by dots (.). For example: header.payload.signature
Click to reveal answer
Which part of a JWT contains the signing algorithm?
AHeader
BPayload
CSignature
DClaims
What does the payload of a JWT usually contain?
ASignature data
BClaims about the user or entity
CEncryption keys
DToken expiration time only
What is the main purpose of the JWT signature?
ATo verify token integrity
BTo encrypt the payload
CTo store user roles
DTo define token expiration
How are the parts of a JWT separated?
ABy commas
BBy spaces
CBy semicolons
DBy dots (.)
Which of these is NOT a part of a JWT?
AHeader
BSignature
CCertificate
DPayload
Explain the structure of a JWT and the role of each part.
Think of JWT as a sealed envelope with a label (header), letter inside (payload), and a seal (signature).
You got /3 concepts.
    Why is the signature important in a JWT?
    The signature is like a wax seal that proves the letter is original.
    You got /3 concepts.