Download the PHP package sgomez/ssp-guard-bundle without Composer
On this page you can find all versions of the php package sgomez/ssp-guard-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sgomez/ssp-guard-bundle
More information about sgomez/ssp-guard-bundle
Files in sgomez/ssp-guard-bundle
Package ssp-guard-bundle
Short Description SimpleSAMLphp Integration for Symfony
License MIT
Informations about the package ssp-guard-bundle
SimpleSAMLphp Integration for Symfony: SSPGuardBundle
This bundle helps you to use your SimpleSAMLphp installation with Symfony. This bundle uses Guard Component to authenticate users.
This package is based on these two bundles:
Installation
Step 1: Download the Bundle
Install the library via Composer by running the following command:
Step 2: Enable the Bundle
Next, enable the bundle in your app/AppKernel.php
file:
Step 3: Load the routes of the Bundle
Load the routes of the bundle by adding this configuration at the very beginning of the app/config/routing.yml
file:
Step 4: Configure the bundle
You need to configure the path where SimpleSAMLphp is installed and the authsources you want to use.
This is a sample configuration that you need in the app/config/config.yml
file:
Where in this example admin
and symfony
are names defined in your SSP's
authsources.php
.
Step 5: Create Guard Authentication classes
In order to authenticate you need to create a Guard authenticator for each authsource you use.
A SSPGuardAuthenticator
base class exists to do it easy:
And create the service definition, e.g.:
or in app/config/services.yml
:
Step 6: Create a custom User Provider
If you use FOSUserBundle you can use it or you can create your own custom User Provider.
Your user provider will be passed to SSPGuardAuthenticator::getUser
method and it's used to search users.
Step 7: Configure the Security
You need to configure the app/config/security.yml
to use the Guard Authenticators:
Step 8: The routes
To init the login proccess you need to put a link to ssp_guard_connect
. There are two twig functions to help
you with this: ssp_auth_sources
and spp_auth_source
. This could be an example of a login template:
All versions of ssp-guard-bundle with dependencies
symfony/config Version ~2.8|~3.0|^4.0
symfony/framework-bundle Version ~2.8|~3.0|^4.0
symfony/routing Version ~2.8|~3.0|^4.0
symfony/security-guard Version ~2.8|~3.0|^4.0
twig/twig Version ~1.14,>=1.14.2|~2.0