PHPackages                             revenuewire/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. revenuewire/jwt

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

revenuewire/jwt
===============

handle JWT token and validation

v2.2.1(8y ago)16.1k↓42.9%Apache-2.0PHP

Since Apr 7Pushed 8y ago7 watchersCompare

[ Source](https://github.com/revenuewire/jwt)[ Packagist](https://packagist.org/packages/revenuewire/jwt)[ Docs](https://github.com/cosmostail/jwt)[ RSS](/packages/revenuewire-jwt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (16)Used By (0)

JWT
===

[](#jwt)

[![Build Status](https://camo.githubusercontent.com/059faa350d11e6f2b0a9a1ab85ce63cc13fb5e64e5daf2afaa219854f376d599/68747470733a2f2f7472617669732d63692e6f72672f726576656e7565776972652f6a77742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/revenuewire/jwt)[![Coverage Status](https://camo.githubusercontent.com/3c4563ca57b3dd902163d7aa526608b9fce45eefa1106bb9366f321258d153c6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f726576656e7565776972652f6a77742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/revenuewire/jwt?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/5cf13cb36706d2a73fe6bf0c8ee7aac3ba5c49e252548e62f90b1009e3eec6d3/68747470733a2f2f706f7365722e707567782e6f72672f726576656e7565776972652f6a77742f762f737461626c65)](https://packagist.org/packages/revenuewire/jwt)

### JWT Token

[](#jwt-token)

```
require_once ("vendor/autoload.php");

$jwt = new \RW\JWT\Token();
$jwt->setIssuer('carambola')
    ->setAudience('jackfruit')
    ->setSecret("super-01-secret")
    ->setPayload(array("hello" => "world"))
    ->setExpiry(5);
$token = $jwt->getToken();
echo $token . "\n";
```

### JWT Validation

[](#jwt-validation)

```
$validator = \RW\JWT\Token::init($token);
$payload = $validator->setSecret("super-01-secret")
                ->validate()
                ->getPayload();
print_r($payload);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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

Every ~23 days

Recently: every ~42 days

Total

15

Last Release

3000d ago

Major Versions

v1.04 → v2.0.02017-09-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/734c4a5502142de0958b3e298555f3991ee0fd3203995dfa8c0c218835e428f8?d=identicon)[swang](/maintainers/swang)

---

Top Contributors

[![cosmostail](https://avatars.githubusercontent.com/u/2172362?v=4)](https://github.com/cosmostail "cosmostail (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[pmill/aws-cognito

A PHP client for AWS Cognito user pools

74266.0k3](/packages/pmill-aws-cognito)

PHPackages © 2026

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