PHPackages                             sproduce/jwt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. sproduce/jwt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

sproduce/jwt
============

A simple library JSON Web Tokens (JWT) in PHP.

v1.0.1(5y ago)010BSD-3-ClausePHPPHP &gt;=5.3.0

Since Mar 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sproduce/JWT)[ Packagist](https://packagist.org/packages/sproduce/jwt)[ Docs](https://github.com/sproduce/jwt)[ RSS](/packages/sproduce-jwt/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

JWT
===

[](#jwt)

Generate key for jwt authorization

ssh-keygen -t rsa -b 2048 -m PEM -f private.key

openssl rsa -in private.key -pubout -outform PEM -out public.key

Installation
------------

[](#installation)

Use composer to manage your dependencies and download JWT:

```
composer require sproduce/jwt
```

Example generate JWT access token
---------------------------------

[](#example-generate-jwt-access-token)

```
use\Sproduce\JWT\JWT

    JWT::loadPublicKeyFromFile("path to file");

    $date = new \DateTime();
    $date->modify('+7 day');
    $payload=array("exp"=>$date->getTimestamp(),
                   "iss"=>"some data"
                );
    $accessToken=JWT::encode($payload);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1888d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48323176?v=4)[Vladimir](/maintainers/sproduce)[@sproduce](https://github.com/sproduce)

---

Top Contributors

[![sproduce](https://avatars.githubusercontent.com/u/48323176?v=4)](https://github.com/sproduce "sproduce (7 commits)")

---

Tags

phpjwt

### Embed Badge

![Health badge](/badges/sproduce-jwt/health.svg)

```
[![Health](https://phpackages.com/badges/sproduce-jwt/health.svg)](https://phpackages.com/packages/sproduce-jwt)
```

###  Alternatives

[griffinledingham/php-apple-signin

A simple library to decode and parse Apple Sign In client tokens.

2011.9M1](/packages/griffinledingham-php-apple-signin)[hyperf-ext/jwt

The Hyperf JWT package.

53134.9k2](/packages/hyperf-ext-jwt)[maicol07/flarum-ext-sso

SSO for Flarum

468.3k](/packages/maicol07-flarum-ext-sso)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
