How can I implement phpCAS in laravel 5.*

751 Views Asked by At

I'm almost new to Laravel. I need to use phpCAS in my project in Laravel 5 but I don't know how to do it. I've have seen the documentation in Github about subfission. It explains how to install it but I don't know how to use it in my project. Can someone show me an example of its usage? Thanks

1

There are 1 best solutions below

0
Ashton Wiersdorf On

Laravel has a notion of a "user" already. If you call phpCAS's forceAuthentication() method, I think you can then send a client to the CAS login page. Once the client has authenticated, you should be able to retrieve the username or something via the $_SESSION variable. Once you have that, you could look up the corresponding User model and manually authenticate them.

Try looking at Laravel's documentation on authentication.