melmarkian/laravel-cas
Composer 安装命令:
composer require melmarkian/laravel-cas
包简介
A bundle for Laravel, providing authentication against a Central Authentication Service (CAS) server.
README 文档
README
A CAS bundle for Laravel.
Installation
composer require ecphp/laravel-cas
config/app.php
'providers' => [ EcPhp\LaravelCas\Providers\AppServiceProvider::class, ],
config/auth.php
'guards' => [ 'laravel-cas' => [ 'driver' => 'laravel-cas', 'provider' => 'laravel-cas', ], ], 'providers' => [ 'laravel-cas' => [ 'driver' => 'laravel-cas', ], ],
app/Http/Kernel.php
protected $middlewareGroups = [ 'web' => [ \EcPhp\LaravelCas\Middleware\CasAuthenticator::class ], ... ];
app/Providers/AppServiceProvider.php
<?php declare(strict_types=1); use Illuminate\Contracts\Foundation\Application; use Psr\Http\Client\ClientInterface; use GuzzleHttp\Client; use loophp\psr17\Psr17Interface; use Nyholm\Psr7\Factory\Psr17Factory; use loophp\psr17\Psr17; public function register(): void { $this->app->bind( ClientInterface::class, function(Application $app): ClientInterface { //or whatever client you want return new Client(); } ); $this->app->bind( Psr17Interface::class, function(Application $app): Psr17Interface { $psr17Factory = new Psr17Factory(); //or whatever psr17 you want return new Psr17( $psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory ); } ); }
php artisan vendor:publish --tag=laravel-cas
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2025-09-05