HTTP | JWT

JWT (JSON Web Token) typically consists of a header + payload + signature.

 

Header

 

Contains the metadata information about JWT

 


{
  "alg": "HS256",
  "typ": "JWT"
}

You can find more headers but the previous will be always there.

 

Payload

 

The payload contains the claims of the JWT. The standard headers are the following:

 


{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022
}

 

Signature

 

The signature is created using the Encoded Header, Encoded Payload, a Secret and a Cryptographic Algorithm.


eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5M
DIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Algorithms supported

The following algorithms are supported by both Client and Server JWT components.

 

 

OpenSSL libraries are required to sign and verify the JWT.

Components

 

 

 

* JWT Components require at least Indy version 10.6.0.5169 or sgcWebSockets Enterprise Edition.