PHPackages                             veseluy-rodjer/json-web-token - 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. veseluy-rodjer/json-web-token

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

veseluy-rodjer/json-web-token
=============================

Work with json web tokens

01.1kPHP

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/veseluy-rodjer/json-web-token)[ Packagist](https://packagist.org/packages/veseluy-rodjer/json-web-token)[ RSS](/packages/veseluy-rodjer-json-web-token/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Examples:

namespace App\\Http\\Controllers\\Users;

use VeseluyRodjer\\JsonWebToken\\Services\\JsonWebTokenService;

class CustomerController extends Controller { public function \_\_construct( private JsonWebTokenService $jsonWebTokenService ) {}

```
public function usingPackage(): JsonResponse
{
    $token = $this->jsonWebTokenService->createToken([
        'payload' => [
            'user_email' => request()->email,
            'role_name' => request()->role_name
        ],
        'secret' => config('jwt.secret'),
    ]);

    $dataFromToken = $this->jsonWebTokenService->getDataFromToken($request->token);
}

```

}

namespace App\\Http\\Requests\\User;

use VeseluyRodjer\\JsonWebToken\\Services\\JsonWebTokenService;

class AdminRequest extends FormRequest { public function \_\_construct( private JsonWebTokenService $jsonWebTokenService ) {}

```
public function rules()
{
    return [
        'token' => [
            function ($attribute, $value, $fail) {
                if (! $this->jsonWebTokenService->checkToken($value, config('jwt.secret'))) {
                    $fail('The '.$attribute.' is invalid.');
                }
            },
        ],
    ];
}

```

}

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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/2bd4841f07e2bb2c052be7b2b7edcf77a85811187657dfc0251372d4d1805f30?d=identicon)[veseluy-rodjer](/maintainers/veseluy-rodjer)

---

Top Contributors

[![veseluy-rodjer](https://avatars.githubusercontent.com/u/23226544?v=4)](https://github.com/veseluy-rodjer "veseluy-rodjer (8 commits)")

### Embed Badge

![Health badge](/badges/veseluy-rodjer-json-web-token/health.svg)

```
[![Health](https://phpackages.com/badges/veseluy-rodjer-json-web-token/health.svg)](https://phpackages.com/packages/veseluy-rodjer-json-web-token)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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