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

ActiveLibrary

naux/jwt-simple
===============

1.0.5(10y ago)13761PHP

Since Dec 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/NauxLiu/jwt-simple)[ Packagist](https://packagist.org/packages/naux/jwt-simple)[ RSS](/packages/naux-jwt-simple/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

jwt-simple
==========

[](#jwt-simple)

[JWT(JSON Web Token)](http://self-issued.info/docs/draft-jones-json-web-token.html) encode and decode module for PHP.

Install
-------

[](#install)

```
$ composer require naux/jwt

```

Usage
-----

[](#usage)

```
$secret = 'xxx';

$jwt = new \Naux\JWT($secret);
$payload = ['iss' => 1, 'exp' => 1450539234, 'foo' => 'bar'];

// encode
$token = $jwt->encode($payload);

// decode
$decoded = $jwt->decode($token);

var_dump($decoded);
```

### Algorithms

[](#algorithms)

By default the algorithm to encode is `HS256`.

The supported algorithms for encoding and decoding are `ECDSA`, `ES256`, `ES384`, `ES512`, `HMAC`, `HS256`, `HS384`, `HS512`, `PublicKey`, `RS256`, `RS384`, `RS512`, `RSA`.

```
// using HS512
$jwt = new JWT('secret', 'HS512');
```

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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 ~1 days

Total

5

Last Release

3741d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22071ff5935f95277f8b0c794c2f23703e6de307ed0e65e25e7c3a878a45c012?d=identicon)[NauxLiu](/maintainers/NauxLiu)

---

Top Contributors

[![nauxliu](https://avatars.githubusercontent.com/u/9570112?v=4)](https://github.com/nauxliu "nauxliu (12 commits)")

### Embed Badge

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

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

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8299.4M42](/packages/php-open-source-saver-jwt-auth)[rusticisoftware/tincan

Experience API (Tin Can API) Library

87824.5k2](/packages/rusticisoftware-tincan)[kleegroup/franceconnect-bundle

Symfony 4, 5 &amp; 6 OpenID security extension FranceConnect

126.2k](/packages/kleegroup-franceconnect-bundle)

PHPackages © 2026

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