Commit ef2c77de authored by Fabien Potencier's avatar Fabien Potencier

fixed CS

parent 20201963
...@@ -424,9 +424,10 @@ switch back to their primary account: ...@@ -424,9 +424,10 @@ switch back to their primary account:
Sharing security context between multiple firewalls Sharing security context between multiple firewalls
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
By default, all the firewalls have a different **security context**. By default, all the firewalls have a different **security context**. In case you
In case you need to share the same security context between multiple firewalls need to share the same security context between multiple firewalls you can set
you can set the ``context`` setting for each firewall you want the context to be shared with. the ``context`` setting for each firewall you want the context to be shared
with.
$app['security.firewalls'] = array( $app['security.firewalls'] = array(
'login' => array( 'login' => array(
...@@ -445,10 +446,12 @@ you can set the ``context`` setting for each firewall you want the context to be ...@@ -445,10 +446,12 @@ you can set the ``context`` setting for each firewall you want the context to be
), ),
); );
Above configuration ensures that you have the same security context ``admin_security`` Above configuration ensures that you have the same security context
inside both , ``login`` and ``admin`` firewalls. This might be useful for instance ``admin_security`` inside both, ``login`` and ``admin`` firewalls. This might be
to redirect already logged in users to the secured area of your website when they visit the login form, useful for instance to redirect already logged in users to the secured area of
as you have the possibility to check if the user has been granted the ``ROLE_ADMIN`` role inside the ``login`` firewall. your website when they visit the login form, as you have the possibility to
check if the user has been granted the ``ROLE_ADMIN`` role inside the ``login``
firewall.
Defining a Role Hierarchy Defining a Role Hierarchy
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -623,10 +626,10 @@ Defining a custom Authentication Provider ...@@ -623,10 +626,10 @@ Defining a custom Authentication Provider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Symfony Security component provides a lot of ready-to-use authentication The Symfony Security component provides a lot of ready-to-use authentication
providers (form, HTTP, X509, remember me, ...), but you can add new ones providers (form, HTTP, X509, remember me, ...), but you can add new ones easily.
easily. To register a new authentication provider, create a service named To register a new authentication provider, create a service named
``security.authentication_listener.factory.XXX`` where ``XXX`` is the name you want to ``security.authentication_listener.factory.XXX`` where ``XXX`` is the name you
use in your configuration:: want to use in your configuration::
$app['security.authentication_listener.factory.wsse'] = $app->protect(function ($name, $options) use ($app) { $app['security.authentication_listener.factory.wsse'] = $app->protect(function ($name, $options) use ($app) {
// define the authentication provider object // define the authentication provider object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment