Commit 922fdadf authored by Fabien Potencier's avatar Fabien Potencier

Revert "feature #1200 Allowing the use of both objects and arrays for the register() (mivanov93)"

This reverts commit 59575186, reversing
changes made to 19de0cd2.
parent 59575186
...@@ -22,7 +22,7 @@ Changelog ...@@ -22,7 +22,7 @@ Changelog
1.3.1 (2015-XX-XX) 1.3.1 (2015-XX-XX)
------------------ ------------------
* fixed session logout handler when a firewall is stateless * n/a
1.3.0 (2015-06-05) 1.3.0 (2015-06-05)
------------------ ------------------
......
...@@ -293,7 +293,7 @@ pattern:: ...@@ -293,7 +293,7 @@ pattern::
'secured' => array( 'secured' => array(
'pattern' => '^/admin/', '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' => '/admin/logout', 'invalidate_session' => true), 'logout' => array('logout_path' => '/admin/logout'),
// ... // ...
), ),
......
...@@ -121,11 +121,11 @@ class Application extends Container implements HttpKernelInterface, TerminableIn ...@@ -121,11 +121,11 @@ class Application extends Container implements HttpKernelInterface, TerminableIn
* Registers a service provider. * Registers a service provider.
* *
* @param ServiceProviderInterface $provider A ServiceProviderInterface instance * @param ServiceProviderInterface $provider A ServiceProviderInterface instance
* @param array|Traversable $values An array or a Traversable of values that customizes the provider * @param array $values An array of values that customizes the provider
* *
* @return Application * @return Application
*/ */
public function register(ServiceProviderInterface $provider, $values = array()) public function register(ServiceProviderInterface $provider, array $values = array())
{ {
$this->providers[] = $provider; $this->providers[] = $provider;
......
...@@ -233,8 +233,6 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -233,8 +233,6 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
throw new \LogicException(sprintf('The "%s" authentication entry is not registered.', $type)); throw new \LogicException(sprintf('The "%s" authentication entry is not registered.', $type));
} }
$options['stateless'] = $stateless;
list($providerId, $listenerId, $entryPointId, $position) = $app['security.authentication_listener.factory.'.$type]($name, $options); list($providerId, $listenerId, $entryPointId, $position) = $app['security.authentication_listener.factory.'.$type]($name, $options);
if (null !== $entryPointId) { if (null !== $entryPointId) {
...@@ -506,10 +504,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -506,10 +504,7 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
isset($options['with_csrf']) && $options['with_csrf'] && isset($app['form.csrf_provider']) ? $app['form.csrf_provider'] : null isset($options['with_csrf']) && $options['with_csrf'] && isset($app['form.csrf_provider']) ? $app['form.csrf_provider'] : null
); );
$invalidateSession = isset($options['invalidate_session']) ? $options['invalidate_session'] : true; $listener->addHandler(new SessionLogoutHandler());
if (true === $invalidateSession && false === $options['stateless']) {
$listener->addHandler(new SessionLogoutHandler());
}
return $listener; 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