API Testing: JSON Web Token (JWT)
According to RFC Standard 7519, JSON Web Token is pronounced as "Jot".
JWT is used to represent as self-contained session of authenticated user and the roles of the user.
It has set of claims that encodes users identity, users permission and digitally signed to protect the content.
Example of JSON Web Token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
It has three parts and separated by two dots.
First Part: Header
Second Part: Payload
Third Part: Signature
JSON Web Token Decoder: https://jwt.io/
Header: Algorithm and Token Type
Payload: Data
Sub is compulsory: To whom the token refers to
iat : Issued at Time.