Why it worked
The post effectively breaks down a complex technical topic (JWT structure) into easily digestible parts using clear visuals and concise explanations, making it highly educational and shareable within relevant communities.
Summary
The first slide explains the structure of a JSON Web Token (JWT), detailing its three main components: Header, Payload, and Signature. The subsequent slides break down each component, explaining its purpose and providing examples of its content.
Structure
- 1Introduction to JWT structure
- 2Explanation of Header
- 3Explanation of Payload
- 4Explanation of Signature
On-screen text
ESTRUCTURA DE UN JSON WEB TOKEN (JWT)
Header
Payload
Signature
JSON WEB TOKEN (JWT)
Header
Payload
Signature
Indica el tipo de token y e el algoritmo de cifrado
Contiene la información o claims (ejempló: user. id, roie, emall)
Asegura que el token no haya sido modificado
{
"alg": "HS256",
"typ": "JWT"
}
{
"sub": "1234",
"name": "John",
true
}
HMACSHA256(
base64Url
Encode(he
ader) + " " +
base64Url
Encode(
payload),
secret)