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

ActiveLibrary

octoth0rpe/jwt-middleware
=========================

08PHP

Since Sep 12Pushed 7y agoCompare

[ Source](https://github.com/octoth0rpe/jwt-middleware)[ Packagist](https://packagist.org/packages/octoth0rpe/jwt-middleware)[ RSS](/packages/octoth0rpe-jwt-middleware/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

jwt-middleware
==============

[](#jwt-middleware)

A PSR-15 middleware that handles json web tokens by decoding them (using firebase/php-jwt) and writing the decoded token to a PSR-11 container.

Here's an example of how you can use this using Container and Route from theleague:

```
# Setup the DI container w/ autowiring
$container = new League\Container\Container;
$container->delegate(new League\Container\ReflectionContainer());

# Setup the router and wiring strategy
$strategy = (new League\Route\Strategy\ApplicationStrategy)->setContainer($container);
$router   = (new League\Route\Router)->setStrategy($strategy);

# Setup middleware that will populate the UserToken key in the container with
# claims from valid JWTs. This will issue a refreshed JWT with every request
$router->middleware(new Middleware(
    $container,
    [ 'id' => 0 ],
    'mysecretjwtkey'
));

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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