lukepolo/laravel-passport-one-time-token
Composer 安装命令:
composer require lukepolo/laravel-passport-one-time-token
包简介
Gives the ability to create one time tokens easily with Laravel Passport
README 文档
README
Quickly allows you to create one time personal access tokens, that are revoked after one use.
Laravel compatibility
| Laravel | Laravel One Time Token |
|---|---|
| 5.4+ | ^0.1.0 |
Installation
Install the package through Composer. Edit your project's composer.json file by adding:
{
"require": {
........,
"lukepolo/laravel-passport-one-time-token": "^0.0.3"
}
}
If using 5.4 you will need to include the service providers / facade in app/config/app.php:
LukePOLO\LaravelPassportOneTimeToken\ServiceProvider::class,
Copy over the configuration file by running the command:
php artisan vendor:publish --provider='LukePOLO\LaravelPassportOneTimeToken\ServiceProvider'
Requirements
Out of the box we provided some defaults to get you started.
- The user must be logged in
- Middleware
- The default middleware assumes you are consuming this with
auth:api. - You can change this in your config
- The default middleware assumes you are consuming this with
- Created at least one Personal Token client.
Usage
Make a post to
oauth/one-time/create
This will send back your token, which you can use to make another request. Once used it will be revoked.
License
MIT
统计信息
- 总下载量: 193
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-24