# lcobucci/jwt

A simple library to work with JSON Web Token and JSON Web Signature

Repository: https://github.com/lcobucci/jwt
Canonical: https://ross.abutalabs.com/products/lcobucci-jwt
Homepage: https://lcobucci-jwt.readthedocs.io/en/stable/
Language: PHP
License: BSD-3-Clause
License Family: permissive
Topics: php, jwt, tokens, hacktoberfest
Last push: 2026-08-22T13:13:21+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 52, longevity 100
- inputs: {"age_days": 4564, "days_push": 11, "days_rel": 320, "gap_med": 26, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7483, forks 595 (observed 2026-08-28T04:10:00.226099+00:00)

## What it is
A PHP library for creating, parsing, and validating JSON Web Tokens (JWT) and JSON Web Signatures (JWS) per RFC 7519. It is installed via Composer and widely used as the JWT foundation in PHP applications and frameworks.

## Use cases
- issue and sign JWTs for user authentication
- validate and parse JWTs from incoming API requests
- implement token-based auth in a PHP application
- sign tokens with HMAC, RSA, or ECDSA keys
- handle token claims, expiration, and refresh flows

## When to choose
- you need a mature, well-tested JWT library for PHP
- you want fine-grained control over token claims, signing, and validation
- you're building token-based auth for APIs or microservices in PHP

## When to avoid
- you need a full authentication framework with sessions and user management
- your project is not PHP-based
- you only need opaque session tokens rather than standards-based JWTs

## Facets
- artifact type: library
- maturity: stable
- function: auth, serialization, security
- domain: security, web-development, backend, apis
- platform: php
- tags: jwt, jws, rfc7519, token-generation, token-validation, composer

## Member repositories
- lcobucci/jwt (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:00.226099+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:37:35.466125+00:00, confidence not recorded.
  - readme: https://github.com/lcobucci/jwt (fetched 2026-08-28T04:10:00.226099+00:00, sha 2063302dabe8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
