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

ActiveLibrary

free2er/jwt
===========

JWT tools

1.0.0(6y ago)00[1 PRs](https://github.com/free2er/jwt/pulls)MITPHPPHP ^7.4

Since Mar 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/free2er/jwt)[ Packagist](https://packagist.org/packages/free2er/jwt)[ RSS](/packages/free2er-jwt/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (13)Versions (6)Used By (0)

jwt
===

[](#jwt)

JWT tools

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

[](#installation)

This component can be installed with the [Composer](https://getcomposer.org/) dependency manager.

1. [Install Composer](https://getcomposer.org/doc/00-intro.md)
2. Install the component as a dependency of your project

    ```
     composer require free2er/jwt

    ```

Usage
-----

[](#usage)

Create JWK

```
use Free2er\Jwt\KeyFactory;

$factory = new KeyFactory();
$factory->create('/path/to/private.key');
$factory->create('/path/to/public.key');
```

Create JWT

```
use Free2er\Jwt\TokenFactory;

$factory = new TokenFactory();
$factory->create(['aud' => 'client', 'sub' => 'user'], '/path/to/private.key');
```

Validate JWT

```
use Free2er\Jwt\TokenValidator;

$validator = new TokenValidator();
$validator->validate('some.jwt.token', '/path/to/public.key');
```

OpenSSL commands
----------------

[](#openssl-commands)

Generate RSA keys

```
openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key
```

Generate RSA keys with password

```
openssl genrsa -passout pass:_passphrase_ -out private.key 2048
openssl rsa -in private.key -passin pass:_passphrase_ -pubout -out public.key
```

Generate EC P-256 keys

```
openssl ecparam -name prime256v1 -genkey -noout -out private.key
openssl ec -in private.key -pubout -out public.key
```

Generate EC P-384 keys

```
openssl ecparam -name secp384r1 -genkey -noout -out private.key
openssl ec -in private.key -pubout -out public.key
```

Generate EC P-521 keys

```
openssl ecparam -name secp521r1 -genkey -noout -out private.key
openssl ec -in private.key -pubout -out public.key
```

Generate Ed25519 keys

```
openssl genpkey -algorithm Ed25519 -out private.key
openssl pkey -in private.key -pubout -out public.key
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

4

Last Release

2250d ago

Major Versions

0.0.3 → 1.0.02020-03-17

### Community

Maintainers

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

---

Top Contributors

[![free2er](https://avatars.githubusercontent.com/u/156442?v=4)](https://github.com/free2er "free2er (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spomky-labs/lexik-jose-bridge

Bridge to allow the use of web-token/jwt-framework with the Lexik JWT Authentication Bundle

35444.0k](/packages/spomky-labs-lexik-jose-bridge)[eveseat/eseye

A Standalone PHP ESI (EVE Swagger Interface) Client Library

5120.3k28](/packages/eveseat-eseye)[exinone/mixin-sdk-php

Mixin-Network SDK for PHP, modify from ExinOne/laravel-mixin-sdk

242.5k4](/packages/exinone-mixin-sdk-php)

PHPackages © 2026

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