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

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

will/jwt-sign
=============

sign base on jwt

v0.1(9y ago)116MITPHPPHP &gt;=5.5.9

Since May 13Pushed 9y ago1 watchersCompare

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

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

JWT-SIGN
========

[](#jwt-sign)

jwt-sign是解决服务器调用的签名问题。签名(client)和验签(server)(通过携带头信息：authorization:bearer {jwt-token})

安装
--

[](#安装)

详细部署说明
------

[](#详细部署说明)

**1. composer install**

切换到PHPWebIM项目目录，执行指令composer install

```
composer require will/jwt-sign
```

**2. 修改配置**

- 配置`Config/sign.php`中的服务器API\_KEY,API\_SECRET信息。可通过修改.env文件来进行修改

```
return array(
    'SIGN_API_KEY' => env("SIGN_API_KEY", 'ad01682126d627f08c9c8dbb9c273f1d'), //api-key
    'SIGN_API_SECRET' => env("SIGN_API_SECRET", 'a4915ac4bb1fc1fdba4f836a3b9ce307'), //api-secret
);
```

3、Cert是证书文件,请保持文件名不变

```
cd vendor/will/jwt-sign/src/Will/Cert  #切换到对应的目录直接生成,或者生成以后拷贝
openssl genrsa -out prvtkey.pem 1024 #生成私钥
openssl rsa -in prvtkey.pem -out pubkey.key -pubout #导出公钥
```

4、使用方法,请使用命名空间。为了描述方便,实例写路径形式

```
$sign = \Will\Sign\Sign::sign();//生成签名
var_dump($sign);
$_SERVER['HTTP_AUTHORIZATION'] = "bearer " . $sign;//通过头信息提交 authorization:bearer {jwt-token}
$ret = \Will\Sign\Sign::verify();//验证签名
var_dump($ret);//验证结果
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3288d ago

### Community

Maintainers

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

---

Tags

jwtsign

### Embed Badge

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

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

###  Alternatives

[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[kleegroup/franceconnect-bundle

Symfony 4, 5 &amp; 6 OpenID security extension FranceConnect

136.2k](/packages/kleegroup-franceconnect-bundle)

PHPackages © 2026

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