zbanx / laravel-cas-client
Zbanx CAS Client
v0.3.2
2022-04-18 12:10 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: ^7.3
- laravel/framework: ^6.2|^7|^8
- zbanx/laravel-kit: ^0.1
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Zbanx CAS Client
快速开始
- 使用 composer 安装
composer require zbanx/laravel-cas-client
- 发布配置文件
php artisan vendor:publish --provider="Zbanx\CasClient\CasClientServiceProvider"
- 用户模型添加
\Zbanx\CasClient\Traits\CasUser
特性
class User extends Authenticatable implements JWTSubject
{
use Notifiable;
use SoftDeletes;
use CasUser;
// ...
}
- 为需要管理权限的接口增加
cas.permission
中间件
Route::post('/download', 'ProjectAnalysisController@download')->name('download')->middleware('cas.permission');
接口路由
Method | Uri | Desc |
---|---|---|
GET | /cas/routes | 获取权限路由 |
POST | /cas/login | 登录接口 |
POST | /cas/refresh | 刷新token接口 |
POST | /cas/logout | 退出登录接口 |