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

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

henryeticom/php-jwt
===================

A simple library to encode and decode JSON Web Tokens (JWT) in PHP

1.0(3y ago)014MITPHPPHP ^7.1||^8.0

Since Feb 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/henryeticom/php-jwt)[ Packagist](https://packagist.org/packages/henryeticom/php-jwt)[ Docs](https://github.com/henryeticom/php-jwt)[ RSS](/packages/henryeticom-php-jwt/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

A SIMPLE PHP JWT PACKAGE
========================

[](#a-simple-php-jwt-package)

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

[](#installation)

Require this package with composer:

```
composer require henryeticom/php-jwt

```

Create JWT (Basic):
-------------------

[](#create-jwt-basic)

```
use HenryEticom\PHPJWT\JWT;

$secret = 'your-secret-key';

$headers = array(
    'alg' => 'ES256',
    'typ' => 'JWT'
);

$payload = array(
    'sub'       => 1,
    'name'      => 'Test',
    'exp' => (time() + (60 * 60))
);

$jwt = JWT::encode($headers, $payload, $secret);

var_dump($jwt);
```

Decode JWT (Basic):
-------------------

[](#decode-jwt-basic)

```
use HenryEticom\PHPJWT\JWT;

$jwt = 'response-from-encode';

$secret = 'your-secret-key';

$decode = JWT::decode($jwt, $secret);

var_dump($decode);
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

1229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e461babb7725f7f5b0acd7451fa0aff28f1233b7587d707afe3372abb43694d3?d=identicon)[henryeticom](/maintainers/henryeticom)

---

Tags

phpjwt

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[griffinledingham/php-apple-signin

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

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

The Hyperf JWT package.

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

SSO for Flarum

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

PHPackages © 2026

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