juhedata / cas
Adds CAS support to Laravel 6.9、7.x、8.x
v1.0.5
2021-04-21 06:42 UTC
Requires
- php: >=7.2.0
- illuminate/support: ^6.9|^7.0|^8.0
- juhedata/laravel_cas_client: ^4.0
- laravel/sanctum: ^2.8
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
This package is auto-updated.
Last update: 2024-10-21 15:01:40 UTC
README
composer require juhedata/cas
php artisan juhecas:publish
内置默认路由
// cas客户端登录:重定向至服务端登录 Route::get('/api/cas/login/{mode?}', 'CasLoginController@casLogin')->name('casLogin'); // cas 登录回调:服务端登录成功后回调前端ST-校验地址 Route::get('/api/cas/oauth/ucenter', 'CasLoginController@oauthUCenter')->middleware('cas.auth'); // cas登出:客户端登出地址 Route::get('/api/cas/logout', 'CasLoginController@casLogout')->middleware('authCheck');
中间件
// cas.auth登录校验中间件 JuHeData\CasLogin\Http\Middleware\JuHeCasMiddleware // 登录状态校验中间件: JuHeData\CasLogin\Http\Middleware\AuthCheckMiddleware