API Evangelist API Evangelist
API Learnings
APIs
API Governance
API Solutions
API Discovery
API Building Blocks
API Evangelist LLC

JSON Web Token (JWT)

Secondary

JWT stands for JSON Web Token. It is an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed using a secret key (HMAC) or a public/private key pair (RSA or ECDSA).

Some of the common use cases for JWT are:

  • Authentication - Stateless session management in APIs and web applications.
  • Authorization - Granting access to specific resources based on claims in the token.
  • Information Exchange - Securely transmitting data between parties (e.g., between microservices).
  • Single Sign-On (SSO) - Allows users to log in once and access multiple services without re-authentication.

JWT is the preferred approach for microservices, and applications build on top of first-party APIs, but OAuth 2.0 is the preferred approach for public APIs with many different users of first or third party APIs. JWT is considered to be more structured, secure, and provides a better opportunity to manage the complexity of handling authentication across many APIs and applications.