Download the PHP package j-oppenhuis/laravel-saml2 without Composer
On this page you can find all versions of the php package j-oppenhuis/laravel-saml2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download j-oppenhuis/laravel-saml2
More information about j-oppenhuis/laravel-saml2
Files in j-oppenhuis/laravel-saml2
Package laravel-saml2
Short Description SAML support to make a laravel application to both a SAML IDP and a SAML SP.
License MIT
Informations about the package laravel-saml2
Laravel + SAML2 Goodness
This repo was originally a fork of kingstarter/laravel-saml. It has since grown from that, and is now gives any laravel application the following abilities: 1 - Become a IDP 2 - Generate certs for signing messages, signing assertions and encrypting attributes. These certs use data inputed from the config file 3 - Configure attributes to be sent (From Config File) 4 - Configure for each SP if the message and/or assertion should be signed 5 - Provides the ability on the logout page to logout from any of the service provides via iframe
This package makes it so easy to maintain and a IDP. Docs need a little work, if you are willing to help let me know.
Installation
Basic package installation
Using :
Laravel 5.4
Add the service provider to
Laravel 5.5+
This package supports Laravel's Package Auto Discovery and should be automatically loaded when required using composer. If the package is not auto discovered run
Configuration
There is one configuration file to publish and the config/filesystem.php file that needs to be extended. The command
will publish the config/saml.php file.
FileSystem configuration
Within following entry needs to be added:
Fill out the config file
WIP
Generating metadata and certificates
Once the config is filled out correcly, run the command below to generate the metadata and the cert. Please note, if no certs are located the system will generate them. If you would like to overide the certs, please use the --cert
flag
SAML SP entries
Within the saml.php config file the SAML Service Provider array needs to be filled.
Using the SAML package
To use the SAML package, some files need to be modified. Within your login view, probably add a SAMLRequest field beneath the CSRF field (this is actually a good place for it):
The SAMLRequest field will be filled automatically when a SAMLRequest is sent by a http request and therefore initiate a SAML authentication attempt. To initiate the SAML auth, the login and redirect functions need to be modified. Within change to
To allow later direct redirection when somebody is already logged in, we need to add also some lines to :
bindings:HTTP-POST
If you're using HTTP post bindings then you'll need to allow saml to get the login request via post.
in web.php add the new route
You'll also need to add a csrf exemption to
class VerifyCsrfToken extends Middleware { /**
- The URIs that should be excluded from CSRF verification.
- @var array */ protected $except = [ 'login/saml', 'logout/saml' ]; }
Debugging Connection
You can enable logging with the config/saml.php setting debug_saml_request
Make sure that the environmental logging variable is set to debug within your file. It will log to
All versions of laravel-saml2 with dependencies
illuminate/support Version ^5.2|^6.0|^7.0|^8.0
lightsaml/lightsaml Version ^2.1