Commit 1a55ff82 authored by neeg's avatar neeg Committed by Fabien Potencier

Support optional session invalidation on logout

parent fcefc535
......@@ -510,7 +510,10 @@ class SecurityServiceProvider implements ServiceProviderInterface
isset($options['with_csrf']) && $options['with_csrf'] && isset($app['form.csrf_provider']) ? $app['form.csrf_provider'] : null
);
$listener->addHandler(new SessionLogoutHandler());
$invalidateSession = isset($options['invalidate_session']) ? $options['invalidate_session'] : true;
if (true === $invalidateSession) {
$listener->addHandler(new SessionLogoutHandler());
}
return $listener;
});
......
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