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

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

laravel-shine/jwt
=================

Simple JSON Web Token for PHP

1.0.1(3y ago)0365MITPHPPHP ^7.0 || ^8.0

Since Dec 17Pushed 3y agoCompare

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

READMEChangelogDependencies (2)Versions (3)Used By (0)

Simple-PHP-JWT
==============

[](#simple-php-jwt)

Simple JSON Web Token for PHP

Requirements
------------

[](#requirements)

- PHP &gt; 7.0
- OpenSSL

Capabilities
------------

[](#capabilities)

FunctionAlgorithm✅ Sign✅ HS256✅ Verify✅ HS384❎ `iss` check✅ HS512❎ `sub` check✅ RS256❎ `aud` check✅ RS384❎ `exp` check✅ RS512❎ `nbf` check❎ `iat` check❎ `jti` checkBasic Usage
-----------

[](#basic-usage)

### encode(array payload, string $key, string $algorithm)

[](#encodearray-payload-string-key-string-algorithm)

```
try {
    $token = JWT::encode(['sub' => '1234567890', 'name' => 'John Smith'], $key256bit, 'HS256');
} catch (\Exception $e) {
    // encode error
}
```

### decode(string $token, string $key)

[](#decodestring-token-string-key)

```
try {
    $payload = JWT::decode($token, $key256bit);
    // $payload->sub == '1234567890'
} catch (\Exception $e) {
    // $e->getCode()
}
```

Exceptions
----------

[](#exceptions)

### decode()

[](#decode)

CodeReason1Invalid token format2Invalid header encoding3Invalid token header4Algorithm not supported5Invalid payload encoding6Invalid signature

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

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

Total

2

Last Release

1140d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.0.1PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8828a24dcecbfc8ca96856764fd1c456ce602d61dcdc687f571e0df7a2422636?d=identicon)[albertdevtw](/maintainers/albertdevtw)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)[better-futures-studio/filament-local-logins

This is my package filament-local-logins

1334.6k](/packages/better-futures-studio-filament-local-logins)

PHPackages © 2026

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