Package Data | |
---|---|
Maintainer Username: | DaveMC08 |
Maintainer Contact: | davemc08@gmail.com (David Cox Jr.) |
Package Create Date: | 2015-03-04 |
Package Last Update: | 2019-08-09 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:14:41 |
Package Statistics | |
---|---|
Total Downloads: | 1,537 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 6 |
Total Watchers: | 3 |
Total Forks: | 6 |
Total Open Issues: | 5 |
Welcome to the even Simpler simplesamlphp integration for Laravel 5.
This library enables simple interaction between your Laravel application and using authentication from an IDP.
Feel free to bring up shortcomings in issues/PR so I can improve this and make it better for everyone.
Add the package to your composer.json:
composer require ragingdave/simplersaml:dev-master
Add the service provider in config/app.php
:
RagingDave\SimplerSaml\SimplerSamlServiceProvider::class,
(OPTIONALLY) Publish the config to make changes:
php artisan vendor:publish --provider="RagingDave/SimplerSaml/SimplerSamlServiceProvider" --tag="config"
This is pretty customizable from the start so if there is something missing chances are, I missed it, and you can help improve the package by telling me about it and I'll see what I can do (OR better yet submit a PR).
Saml User Model (simplersaml.model)
Routing (simplersaml.enableRoutes, simplersaml.routePrefix)
SP and IDP (simplersaml.sp, simplersaml.idp)
Redirects (simplersaml.loginRedirect, simplersaml.logoutRedirect)
So for this you can use the built-in middleware and augment them to add the saml isAuthenticated check, or use the SamlAuthenticate, and SamlRedirectIfAuthenticated included in this package. Anything more advanced like combining laravel session checking and saml session checking can be done by you by adding to the built-in Authenticate and RedirectIfAuthenticated.
There are a few events that are fired from this package to hook into the login and logout functions of the saml flow.
RagingDave\SimplerSaml\Events\SamlLogin
RagingDave\SimplerSaml\Events\SamlLogout
These can be listened for and acted upon to enable creating/logging in the saml user into a local laravel session to use
Auth::user(), Auth::check(), etc.
throughout the application. The problem here is that if the saml session times out, the laravel session could still be valid. The middleware in this package takes care of this so take a look in `` for an example.