jwt
Installation
SKILL.md
JSON Web Token (JWT)
JWT is a compact, URL-safe means of representing claims to be transferred between two parties. The claims are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) or JSON Web Encryption (JWE).
When to Use
- Stateless Authentication: API doesn't need to check a database session for every request.
- Information Exchange: Securely transmitting information (like User ID + Roles) between microservices.
Quick Start (Structure)
Header.Payload.Signature
// Header
{
"alg": "RS256",
"typ": "JWT"
}