cas
cas copied to clipboard
how use CAS with spatie laravel-permission
Hi, I want to use CAS library and then use spatie laravel-permission for the permission of my laravel app.
Could you help me how can I integrate and use them?
Likely this would be integrated into an auth driver, middleware, and a model. Perhaps try stackoverflow?
Hi, I want to use CAS library and then use spatie laravel-permission for the permission of my laravel app.
Could you help me how can I integrate and use them?
I don't see how these two depend on each other. I personally use both packages in all my project. Here is my Authentication logic:
Authentication:
- I have internal users table with a username field that corresponds to the one returned by the cas service.
- Redirect to the CAS endpoint for authentication. Once authenticated, this simply returns a username.
- Find a user with the returned username. If found, Login the user manually using Laravel's
Auth::login($user)
feature
Authorization: Follow the normal procedure outlined in spatie/laravel-permission's documentation. There won't be any conflicts.