JWT Documentation

A comprehensive guide to understanding and implementing JSON Web Tokens

What is JWT?
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.

Key Features

  • Compact: JWTs can be sent through URL, POST parameter, or HTTP header, making it fast to transmit.
  • Self-contained: The payload contains all the required information about the user, avoiding the need to query the database multiple times.
  • Secure: JWTs can be signed using a secret or a public/private key pair, ensuring the integrity of the claims.

Common Use Cases

  • Authentication: The most common scenario for using JWT. Once the user is logged in, each subsequent request will include the JWT.
  • Information Exchange: JWTs are a good way of securely transmitting information between parties because they can be signed.
  • Authorization: Once a user is logged in, each subsequent request will include the JWT, allowing access to routes, services, and resources permitted with that token.
Complete Documentation