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

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

msheng/yii2-jwt
===============

Trait for easier JWT integration

1.0.1(9y ago)76.0k1MITPHP

Since Nov 9Pushed 9y ago2 watchersCompare

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

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

Fork from

yii2-jwt
========

[](#yii2-jwt)

JWT implementation for Yii2 Authorization process

For details see [JWT official website](https://jwt.io/introduction/).

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

[](#installation)

To install (only master is available now) run:

```
    composer require "msheng/yii2-jwt:~1.0.0"

```

Or add this line to *require* section of composer.json:

```
    "msheng/yii2-jwt": "~1.0.0"

```

Usage
-----

[](#usage)

There is only one trait - *UserTrait* - which gives you 5 methods for authorization and JWT-management in User model

### project

[](#project)

Your project need to be an [yii2-app-advanced](https://github.com/yiisoft/yii2-app-advanced) , and here is the [guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md)

Set up:

### In common/config/params.php

[](#in-commonconfigparamsphp)

```
