Commit 960ab44b authored by Fabien Potencier's avatar Fabien Potencier

renamed security.authentication* services to security.authentication_listener*

parent a9d57bfb
...@@ -121,13 +121,13 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -121,13 +121,13 @@ class SecurityServiceProvider implements ServiceProviderInterface
foreach (array('logout', 'pre_auth', 'form', 'http', 'remember_me', 'anonymous') as $type) { foreach (array('logout', 'pre_auth', 'form', 'http', 'remember_me', 'anonymous') as $type) {
$entryPoint = $type == 'http' ? 'http' : 'form'; $entryPoint = $type == 'http' ? 'http' : 'form';
$app['security.authentication.factory.'.$type] = $app->protect(function($name, $options) use ($type, $app, $entryPoint) { $app['security.authentication_listener.factory.'.$type] = $app->protect(function($name, $options) use ($type, $app, $entryPoint) {
if (!isset($app['security.entry_point.'.$name.'.'.$entryPoint])) { if (!isset($app['security.entry_point.'.$name.'.'.$entryPoint])) {
$app['security.entry_point.'.$name.'.'.$entryPoint] = $app['security.entry_point.'.$entryPoint.'._proto']($name); $app['security.entry_point.'.$name.'.'.$entryPoint] = $app['security.entry_point.'.$entryPoint.'._proto']($name);
} }
if (!isset($app['security.authentication.'.$name.'.'.$type])) { if (!isset($app['security.authentication_listener.'.$name.'.'.$type])) {
$app['security.authentication.'.$name.'.'.$type] = $app['security.authentication.'.$type.'._proto']($name, $options); $app['security.authentication_listener.'.$name.'.'.$type] = $app['security.authentication_listener.'.$type.'._proto']($name, $options);
} }
if (!isset($app['security.authentication_provider.'.$name])) { if (!isset($app['security.authentication_provider.'.$name])) {
...@@ -136,7 +136,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -136,7 +136,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
return array( return array(
'security.authentication_provider.'.$name, 'security.authentication_provider.'.$name,
'security.authentication.'.$name.'.'.$type, 'security.authentication_listener.'.$name.'.'.$type,
'security.entry_point.'.$name.'.'.$entryPoint, 'security.entry_point.'.$name.'.'.$entryPoint,
$type $type
); );
...@@ -183,11 +183,11 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -183,11 +183,11 @@ class SecurityServiceProvider implements ServiceProviderInterface
$options = array(); $options = array();
} }
if (!isset($app['security.authentication.factory.'.$type])) { if (!isset($app['security.authentication_listener.factory.'.$type])) {
throw new \LogicException(sprintf('The "%s" authentication entry is not registered.', $type)); throw new \LogicException(sprintf('The "%s" authentication entry is not registered.', $type));
} }
list($providerId, $listenerId, $entryPointId, $position) = $app['security.authentication.factory.'.$type]($name, $options); list($providerId, $listenerId, $entryPointId, $position) = $app['security.authentication_listener.factory.'.$type]($name, $options);
if (null !== $entryPointId) { if (null !== $entryPointId) {
$entryPoint = $entryPointId; $entryPoint = $entryPointId;
...@@ -206,7 +206,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -206,7 +206,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
$listeners[] = 'security.access_listener'; $listeners[] = 'security.access_listener';
if (isset($firewall['switch_user'])) { if (isset($firewall['switch_user'])) {
$app['security.switch_user.'.$name] = $app['security.authentication.switch_user._proto']($name, $firewall['switch_user']); $app['security.switch_user.'.$name] = $app['security.authentication_listener.switch_user._proto']($name, $firewall['switch_user']);
$listeners[] = 'security.switch_user.'.$name; $listeners[] = 'security.switch_user.'.$name;
} }
...@@ -327,7 +327,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -327,7 +327,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}); });
}); });
$app['security.authentication.form._proto'] = $app->protect(function ($providerKey, $options) use ($app, $that) { $app['security.authentication_listener.form._proto'] = $app->protect(function ($providerKey, $options) use ($app, $that) {
return $app->share(function () use ($app, $providerKey, $options, $that) { return $app->share(function () use ($app, $providerKey, $options, $that) {
$that->addFakeRoute(array('post', $tmp = isset($options['check_path']) ? $options['check_path'] : '/login_check', str_replace('/', '_', ltrim($tmp, '/')))); $that->addFakeRoute(array('post', $tmp = isset($options['check_path']) ? $options['check_path'] : '/login_check', str_replace('/', '_', ltrim($tmp, '/'))));
...@@ -347,7 +347,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -347,7 +347,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}); });
}); });
$app['security.authentication.http._proto'] = $app->protect(function ($providerKey, $options) use ($app) { $app['security.authentication_listener.http._proto'] = $app->protect(function ($providerKey, $options) use ($app) {
return $app->share(function () use ($app, $providerKey, $options) { return $app->share(function () use ($app, $providerKey, $options) {
return new BasicAuthenticationListener( return new BasicAuthenticationListener(
$app['security'], $app['security'],
...@@ -359,7 +359,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -359,7 +359,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}); });
}); });
$app['security.authentication.anonymous._proto'] = $app->protect(function ($providerKey, $options) use ($app) { $app['security.authentication_listener.anonymous._proto'] = $app->protect(function ($providerKey, $options) use ($app) {
return $app->share(function () use ($app, $providerKey, $options) { return $app->share(function () use ($app, $providerKey, $options) {
return new AnonymousAuthenticationListener( return new AnonymousAuthenticationListener(
$app['security'], $app['security'],
...@@ -369,7 +369,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -369,7 +369,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}); });
}); });
$app['security.authentication.logout._proto'] = $app->protect(function ($providerKey, $options) use ($app, $that) { $app['security.authentication_listener.logout._proto'] = $app->protect(function ($providerKey, $options) use ($app, $that) {
return $app->share(function () use ($app, $providerKey, $options, $that) { return $app->share(function () use ($app, $providerKey, $options, $that) {
$that->addFakeRoute(array('get', $tmp = isset($options['logout_path']) ? $options['logout_path'] : '/logout', str_replace('/', '_', ltrim($tmp, '/')))); $that->addFakeRoute(array('get', $tmp = isset($options['logout_path']) ? $options['logout_path'] : '/logout', str_replace('/', '_', ltrim($tmp, '/'))));
...@@ -387,7 +387,7 @@ class SecurityServiceProvider implements ServiceProviderInterface ...@@ -387,7 +387,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
}); });
}); });
$app['security.authentication.switch_user._proto'] = $app->protect(function ($name, $options) use ($app, $that) { $app['security.authentication_listener.switch_user._proto'] = $app->protect(function ($name, $options) use ($app, $that) {
return $app->share(function () use ($app, $name, $options, $that) { return $app->share(function () use ($app, $name, $options, $that) {
return new SwitchUserListener( return new SwitchUserListener(
$app['security'], $app['security'],
......
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