aplr/laravel-bouncer
Composer 安装命令:
composer require aplr/laravel-bouncer
包简介
Rigorously restricts access to your apis.
README 文档
README
Introduction
The bouncer package enables you to restrict access to your apis using application keys.
Installation
Require the aplr/laravel-bouncer package in your composer.json and update your dependencies:
$ composer require aplr/laravel-bouncer
Usage
In order to check if requests to your api include a valid key, you can use the Bounce-middleware:
protected $middlewareGroups = [ 'web' => [ // ... ], 'api' => [ // ... \Aplr\Bouncer\Bounce::class, ], ];
To generate a new key, simply use the following method:
use Aplr\Bodybuilder\Facades\Bouncer; $key = Bouncer::createKey('My App');
You can manually check if a given key is valid by using the following method:
$valid = Bouncer::check('ZKEpwUSii5yvWt1xgLwHd8yguQGBZtrSi39hXFFd');
统计信息
- 总下载量: 141
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-04-18