PHPackages                             undeadline/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. [Templating &amp; Views](/categories/templating)
4. /
5. undeadline/jwt

ActiveLibrary[Templating &amp; Views](/categories/templating)

undeadline/jwt
==============

JSON Web Token (JWT) library

v2.0.0(3y ago)03MITPHPPHP &gt;=8.0

Since May 15Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (0)

JSON Web Token (JWT)
====================

[](#json-web-token-jwt)

This package help you with JWT generating, refreshing, checking.

Composer install

```
composer require undeadline/jwt

```

How to use:

Generate token

```
$payload = ['id' => 1];

$jwt = new \Undeadline\JWT();
$token = $jwt->getToken($payload);

echo $token // +YToyOntzOjM6ImFsZyI7czo2OiJzaGEyNTYiO3M6MzoidHlwIjtzOjM6IkpXVCI7fQ==.YToxOntzOjM6ImV4cCI7aToxNTg5NTQ1ODczO30=.72ee2c0d5b168ca5059765990fffb4f6b672c2f721c5233a179a7ffb8372bcb1

```

Generate refresh token

```
$payload = ['id' => 1];

$jwt = new \Undeadline\JWT();
$refresh_token = $jwt->refreshToken($payload);

echo $refresh_token // c51d702341c5d3de5ca0540648f47a02afc5e117887b59ccf31208bb319d6af8

```

Generate refresh token lifetime

```
$jwt = new \Undeadline\JWT();
$refresh_token_lifetime = $jwt->getRefreshTokenLifetime();

echo $refresh_token_lifetime // 1842927392 => timestamp

```

Token validation

```
$payload = ['id' => 1];

$jwt = new \Undeadline\JWT();
$token = $jwt->getToken($payload);

$valid = $jwt->validateToken($token);

echo $valid // true if valid or false if not valid

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Total

3

Last Release

1223d ago

Major Versions

v1.0.1 → v2.0.02023-01-10

PHP version history (2 changes)v1.0.0PHP &gt;=7.1

v2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/920551156b4f3b2b6429b2a7dc7600b99a91751bb45aaaa867daddb0b79876e4?d=identicon)[undeadline](/maintainers/undeadline)

---

Top Contributors

[![undeadline](https://avatars.githubusercontent.com/u/11588798?v=4)](https://github.com/undeadline "undeadline (9 commits)")

---

Tags

composerpackagelibrarytemplatestarter

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[buonzz/composer-library-template

Boilerplate package for creating other packages.

535.7k](/packages/buonzz-composer-library-template)

PHPackages © 2026

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