1. Go to this page and download the library: Download uicosp/jwt-cas-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
...
// 将中间件添加到路由中间件,按需调用
'auth.cas' => \Uicosp\JwtCasClient\Middleware\VerifyCasToken::class,
];
Route::get('/', function () {
return view('welcome')->middleware('auth.cas');
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.