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

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

worldxyj/jwt
============

一个简单的JWT库

v1.0.2(2y ago)08MITPHPPHP ^7.1

Since Jul 26Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (0)

jwt
===

[](#jwt)

A simple library of JWT

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

[](#installation)

To install jwt run the command:

```
composer require worldxyj/jwt

```

Quick start
-----------

[](#quick-start)

```
use Worldxyj\Jwt;

$jwt = new Jwt('your own secret');

$payload = [
    'name' => 'worldxyj/jwt',
    'des' => '一个简单的JWT库'
];

$tokenDefault = $jwt->getToken($payload);// 默认过期时间1天

$tokenExp = $jwt->getTokenWithExp($payload, 3600 * 24);// 自定义过期时间

$res = $jwt->verifyToken($tokenDefault);// 验证token

if($res['errcode'] == 0){
    $payload = $res['data'];
    echo '验证通过';
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

1021d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84472937f8c7d86c99773b605bc0c3521a366fadb62124dca0a1e10201443e55?d=identicon)[worldxyj](/maintainers/worldxyj)

---

Top Contributors

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

### Embed Badge

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

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

###  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)
