JWT Token online encoding generation

JWT Token online encoding generation

The three parts of JWT are as follows

  • Header
  • Payload
  • Signature (= Signature)

The Header in the head

{
  "alg": "HS256",
  "typ": "JWT"
}
Copy the code

Payload

Iss (Issuer) : exp (expiration time) : expiration time sub (subject) : aud (audience) : NBF (Not Before) : iAT (Issued At) : Issue time JTI (JWT ID) : numberCopy the code

Signature (= Signature)

Generate rules,secret is the secret key, to be strictly confidential.

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret)
Copy the code

tooltt.com/jwt-encode/