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

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

mslwk/jwt
=========

JSON Web Token handling library

1.0.2(7y ago)013MITPHPPHP ^7.0.0

Since Jul 24Pushed 7y ago1 watchersCompare

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

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

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/37fc30c746ba7946b32f0348a1379bc20b0510f2d295a746513e5ce8c434e285/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f6a77742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/jwt/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/76048a65ba61e3cf0ef6a4fce7dc1605e1fd6485d92a4ac72b0206de203a402e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f6a77742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/jwt/?branch=master)[![Build Status](https://camo.githubusercontent.com/8bc17d7b9d072520f7fec6c8f36b339793732417038d507f488bfd8efa56d6fd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f6a77742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/jwt/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/0b7b9ea8c5954e4c6a45766219bff1cff8c0620f86d9151cc9ef451a0e9c60ea/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f6a77742f762f737461626c65)](https://packagist.org/packages/mslwk/jwt)[![License](https://camo.githubusercontent.com/df65e3b6307b08daac59d84d934c31717ef78162cc5b4e654e85352a0a7713b2/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f6a77742f6c6963656e7365)](https://packagist.org/packages/mslwk/jwt)[![Total Downloads](https://camo.githubusercontent.com/d478b50727f550859fe09aa95ddb4997b969f0ab72b03fded39ae9fca758d3da/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f6a77742f646f776e6c6f616473)](https://packagist.org/packages/mslwk/jwt)

JSON Web Token encoder/decoder
==============================

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

The library provides dead easy way of creating and verifing JSON Web Tokens.

### Installation

[](#installation)

Use composer to include the library in your project.

```
composer require mslwk/jwt

```

### Usage

[](#usage)

#### Generating a token

[](#generating-a-token)

Include the Generator class:

[![Alt text](docs/include_generator.png?raw=true "Include the generator")](docs/include_generator.png?raw=true)

Generate a token:

[![Alt text](docs/use_generator.png?raw=true "Generate a token")](docs/use_generator.png?raw=true)

#### Verifing a token

[](#verifing-a-token)

Include the Generator class:

[![Alt text](docs/include_verifier.png?raw=true "Include the verifier")](docs/include_verifier.png?raw=true)

Generate a token:

[![Alt text](docs/use_verifier.png?raw=true "Verify the token")](docs/use_verifier.png?raw=true)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

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

Total

3

Last Release

2916d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dd1db0bcc71b12f314bdce40703dc572ce6d093a2ff56845f19ddd816283436?d=identicon)[mslwk](/maintainers/mslwk)

---

Top Contributors

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

---

Tags

jwtphpjwt

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[firebase/php-jwt

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.

9.8k445.7M2.1k](/packages/firebase-php-jwt)[lcobucci/jwt

A simple library to work with JSON Web Token and JSON Web Signature

7.5k316.6M892](/packages/lcobucci-jwt)[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[web-token/jwt-framework

JSON Object Signing and Encryption library for PHP and Symfony Bundle.

94518.9M76](/packages/web-token-jwt-framework)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M52](/packages/php-open-source-saver-jwt-auth)

PHPackages © 2026

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