Php

Learn PHP Rest API Development with JWT Token for Beginners #16 JWT Token Structure Details



In this video we’ll see:

DETAILS OF JWT TOKEN STRUCTURE

JWT Structure:

xxxxx.yyyyy.zzzzz (Header.Payload.Signature)

Header : a = Base64Url( {
“alg”: “HS256”,
“typ”: “JWT”
} )

Payload: b = Base64Url( {
“sub”: “1234567890”,
“name”: “John Doe”,
“admin”: true
} )

Signature:
HMACSHA256(
base64UrlEncode(header) + “.” +
base64UrlEncode(payload),
secret)

HMACSHA256(a + “.” + b, secret);

SOCIAL :…

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *