Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damirka/yii2-jwt
JWT implementation for Yii2 Authorization process
https://github.com/damirka/yii2-jwt
json-web-token jwt php yii2 yii2-extension yii2-framework yii2-jwt yii2-user
Last synced: about 1 month ago
JSON representation
JWT implementation for Yii2 Authorization process
- Host: GitHub
- URL: https://github.com/damirka/yii2-jwt
- Owner: damirka
- License: mit
- Created: 2015-11-03T15:44:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-16T08:31:48.000Z (over 8 years ago)
- Last Synced: 2024-10-30T01:51:51.184Z (about 2 months ago)
- Topics: json-web-token, jwt, php, yii2, yii2-extension, yii2-framework, yii2-jwt, yii2-user
- Language: PHP
- Size: 16.6 KB
- Stars: 66
- Watchers: 4
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yii2-jwt
JWT implementation for Yii2 Authorization process
For details see [JWT official website](https://jwt.io/introduction/).
## Installation
To install (only master is available now) run:
```
composer require "damirka/yii2-jwt:v0.2.1"
```
Or add this line to *require* section of composer.json:
```
"damirka/yii2-jwt": "v0.2.1"
```## Usage
There is only one trait - *UserTrait* - which gives you 5 methods for
authorization and JWT-management in User modelSet up:
In controller:
```PHP
[
'class' => HttpBearerAuth::className()
]
]);
}
}
```In User model:
```PHP