laravel_cas_server is a Laravel package that implements the server part of CAS protocol v1/v2/v3 without the proxy ticket part.
Currently this package works for Laravel 5.1/5.2/5.3/5.4 .
- PHP >=5.5.9
composer require leo108/laravel_cas_server
- add
Leo108\CAS\CASServerServiceProvider::class
to theproviders
field inconfig/app.php
php artisan vendor:publish --provider="Leo108\CAS\CASServerServiceProvider"
- modify
config/cas.php
, fields in config file are all self-described php artisan migrate
- make your
App\User
implementLeo108\CAS\Contracts\Models\UserModel
- create a class implements
Leo108\CAS\Contracts\TicketLocker
- create a class implements
Leo108\CAS\Contracts\Interactions\UserLogin
- visit
http://your-domain/cas/login
to see the login page (assume that you didn't change therouter.prefix
value inconfig/cas.php
)
If you are looking for an out of box solution of CAS Server powered by PHP, you can check php_cas_server