Commit ce4b4854 authored by Fabien Potencier's avatar Fabien Potencier

merged branch greygore/logout-docs (PR #514)

This PR was merged into the master branch.

Commits
-------

5e83c757 Update logout_path with pattern info per #423

Discussion
----------

Update logout_path with pattern info per #423

Because logout_path must exist inside the existing pattern, the example
in the docs would not work by default.
parents dbd9d71d 5e83c757
...@@ -239,12 +239,13 @@ Adding a Logout ...@@ -239,12 +239,13 @@ Adding a Logout
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
When using a form for authentication, you can let users log out if you add the When using a form for authentication, you can let users log out if you add the
``logout`` setting:: ``logout`` setting, where ``logout_path`` matches the existing regex pattern``::
$app['security.firewalls'] = array( $app['security.firewalls'] = array(
'secured' => array( 'secured' => array(
'pattern' => '^/admin/',
'form' => array('login_path' => '/login', 'check_path' => '/admin/login_check'), 'form' => array('login_path' => '/login', 'check_path' => '/admin/login_check'),
'logout' => array('logout_path' => '/logout'), 'logout' => array('logout_path' => '/admin/logout'),
// ... // ...
), ),
......
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