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

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

lengbin/hyperf-jwt
==================

hyperf jwt

574PHP

Since Aug 19Pushed 5y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

 [ ![](https://camo.githubusercontent.com/c6b942122d0a55df522901b30c6f0b467688ed244a0225113157462fc2249d50/68747470733a2f2f6879706572662e6f73732d636e2d68616e677a686f752e616c6979756e63732e636f6d2f6879706572662e706e67) ](https://hyperf.io/)

Hyperf Jwt
==========

[](#hyperf-jwt)

If You Like This Please Give Me Star

Install
-------

[](#install)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require lengbin/hyperf-jwt

```

or add

```
"lengbin/hyperf-jwt": "*"

```

to the require section of your `composer.json` file.

Request [详情](https://github.com/ice-leng/jwt)
---------------------------------------------

[](#request-详情)

```
"lengbin/jwt": "dev-master"

```

Configs
-------

[](#configs)

```
    /config/autoload/jwt.php

    return [
        'alg' => 'HMACSHA256',
        'key' => 'ice',
        // jwt 过期时间
        'exp' => 2 * 3600,
        // 刷新token 过期时间
        'ttl' => 24 * 3600 * 30,
        // 是否 单点登录
        'sso' => false
    ];
```

Publish
-------

[](#publish)

```

php ./bin/hyperf.php vendor:publish lengbin/hyperf-jwt
```

Usage
-----

[](#usage)

```
