diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php
index 15ae0aa586..c6837f3b9f 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php
@@ -11,6 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@@ -25,15 +26,15 @@ class FormLoginFactory implements SecurityFactoryInterface
{
$provider = 'security.authentication.provider.dao.'.$id;
$container
- ->register($provider, '%security.authentication.provider.dao.class%')
- ->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
- ->setPublic(false)
+ ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
+ ->setArgument(0, new Reference($userProvider))
+ ->setArgument(2, $id)
->addTag('security.authentication_provider')
;
// listener
$listenerId = 'security.authentication.listener.form.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.form'));
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.form'));
$listener->setArgument(3, $id);
// add remember-me tag
@@ -60,7 +61,7 @@ class FormLoginFactory implements SecurityFactoryInterface
'failure_forward' => false,
);
foreach (array_keys($options) as $key) {
- if (isset($config[$key])) {
+ if (array_key_exists($key, $config)) {
$options[$key] = $config[$key];
}
}
@@ -83,8 +84,12 @@ class FormLoginFactory implements SecurityFactoryInterface
}
// form entry point
- $entryPoint = $container->setDefinition($entryPointId = 'security.authentication.form_entry_point.'.$id, clone $container->getDefinition('security.authentication.form_entry_point'));
- $entryPoint->setArguments(array($options['login_path'], $options['use_forward']));
+ $entryPointId = 'security.authentication.form_entry_point.'.$id;
+ $container
+ ->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.form_entry_point'))
+ ->addArgument($options['login_path'])
+ ->addArgument($options['use_forward'])
+ ;
return array($provider, $listenerId, $entryPointId);
}
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php
index 57035ec974..3686a1e06f 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php
@@ -11,6 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@@ -25,15 +26,15 @@ class HttpBasicFactory implements SecurityFactoryInterface
{
$provider = 'security.authentication.provider.dao.'.$id;
$container
- ->register($provider, '%security.authentication.provider.dao.class%')
- ->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
- ->setPublic(false)
+ ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
+ ->setArgument(0, new Reference($userProvider))
+ ->setArgument(2, $id)
->addTag('security.authentication_provider')
;
// listener
$listenerId = 'security.authentication.listener.basic.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.basic'));
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.basic'));
$listener->setArgument(2, $id);
if (null === $defaultEntryPoint) {
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php
index 6f2363399f..d837032e41 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php
@@ -11,6 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@@ -25,15 +26,15 @@ class HttpDigestFactory implements SecurityFactoryInterface
{
$provider = 'security.authentication.provider.dao.'.$id;
$container
- ->register($provider, '%security.authentication.provider.dao.class%')
- ->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
- ->setPublic(false)
+ ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
+ ->setArgument(0, new Reference($userProvider))
+ ->setArgument(2, $id)
->addTag('security.authentication_provider')
;
// listener
$listenerId = 'security.authentication.listener.digest.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.digest'));
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.digest'));
$listener->setArgument(2, $id);
if (null === $defaultEntryPoint) {
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
index 8af6a3bb1a..2ea4e6962a 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
@@ -2,6 +2,8 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
+
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -19,11 +21,11 @@ class RememberMeFactory implements SecurityFactoryInterface
}
// authentication provider
- $authenticationProviderId = 'security.authentication.provider.rememberme.'.$id;
+ $authProviderId = 'security.authentication.provider.rememberme.'.$id;
$container
- ->register($authenticationProviderId, '%security.authentication.provider.rememberme.class%')
- ->setArguments(array(new Reference('security.account_checker'), $config['key'], $id))
- ->setPublic(false)
+ ->setDefinition($authProviderId, new DefinitionDecorator('security.authentication.provider.rememberme'))
+ ->addArgument(1, $config['key'])
+ ->addArgument(2, $id)
->addTag('security.authentication_provider')
;
@@ -46,10 +48,9 @@ class RememberMeFactory implements SecurityFactoryInterface
;
}
- $rememberMeServices = $container->setDefinition($rememberMeServicesId, clone $container->getDefinition($templateId));
- $arguments = $rememberMeServices->getArguments();
- $arguments[1] = $config['key'];
- $arguments[2] = $id;
+ $rememberMeServices = $container->setDefinition($rememberMeServicesId, new DefinitionDecorator($templateId));
+ $rememberMeServices->setArgument(1, $config['key']);
+ $rememberMeServices->setArgument(2, $id);
if (isset($config['token-provider'])) {
// FIXME: make the naming assumption more flexible
@@ -59,12 +60,22 @@ class RememberMeFactory implements SecurityFactoryInterface
}
// remember-me options
- foreach ($arguments[3] as $name => $option) {
+ $options = array(
+ 'name' => 'REMEMBERME',
+ 'lifetime' => 31536000,
+ 'path' => '/',
+ 'domain' => null,
+ 'secure' => false,
+ 'httponly' => true,
+ 'always_remember_me' => false,
+ 'remember_me_parameter' => '_remember_me',
+ );
+ foreach ($options as $name => $option) {
if (array_key_exists($name, $config)) {
- $arguments[3][$name] = $config[$name];
+ $options[$name] = $config[$name];
}
}
- $rememberMeServices->setArguments($arguments);
+ $rememberMeServices->setArgument(3, $options);
// attach to remember-me aware listeners
$userProviders = array();
@@ -92,10 +103,10 @@ class RememberMeFactory implements SecurityFactoryInterface
// remember-me listener
$listenerId = 'security.authentication.listener.rememberme.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.rememberme'));
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.rememberme'));
$listener->setArgument(1, new Reference($rememberMeServicesId));
- return array($authenticationProviderId, $listenerId, $defaultEntryPoint);
+ return array($authProviderId, $listenerId, $defaultEntryPoint);
}
public function getPosition()
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php
index 70432105c4..dbf0e35914 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/X509Factory.php
@@ -11,6 +11,8 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
+
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@@ -25,18 +27,16 @@ class X509Factory implements SecurityFactoryInterface
{
$provider = 'security.authentication.provider.pre_authenticated.'.$id;
$container
- ->register($provider, '%security.authentication.provider.pre_authenticated.class%')
- ->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id))
- ->setPublic(false)
+ ->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.pre_authenticated'))
+ ->setArgument(0, new Reference($userProvider))
+ ->addArgument($id)
->addTag('security.authentication_provider')
;
// listener
$listenerId = 'security.authentication.listener.x509.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.x509'));
- $arguments = $listener->getArguments();
- $arguments[2] = $id;
- $listener->setArguments($arguments);
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.x509'));
+ $listener->setArgument(2, $id);
return array($provider, $listenerId, $defaultEntryPoint);
}
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
index 039f171e12..f6fb282993 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
@@ -11,6 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\DependencyInjection;
+use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
@@ -32,6 +33,7 @@ class SecurityExtension extends Extension
{
protected $requestMatchers = array();
protected $contextListeners = array();
+ protected $listenerPositions = array('pre_auth', 'form', 'http', 'remember_me');
public function configLoad(array $configs, ContainerBuilder $container)
{
@@ -58,6 +60,8 @@ class SecurityExtension extends Extension
if (!$container->hasDefinition('security.context')) {
$loader = new XmlFileLoader($container, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
$loader->load('security.xml');
+ $loader->load('security_listeners.xml');
+ $loader->load('security_rememberme.xml');
$loader->load('templating_php.xml');
$loader->load('templating_twig.xml');
$loader->load('collectors.xml');
@@ -185,26 +189,18 @@ class SecurityExtension extends Extension
$arguments[1] = $userProviders;
$definition->setArguments($arguments);
- // load service templates
- $c = new ContainerBuilder($container->getParameterBag());
- $loader = new XmlFileLoader($c, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
- $loader->load('security_templates.xml');
-
- foreach ($this->normalizeConfig($config, 'template') as $template) {
- $loader->load($c->getParameterBag()->resolveValue($template));
- }
- $container->merge($c);
+ // create security listener factories
+ $factories = $this->createListenerFactories($container, $config);
// load firewall map
$mapDef = $container->getDefinition('security.firewall.map');
$map = array();
foreach ($firewalls as $firewall) {
- list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $firewall, $providerIds);
+ list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $firewall, $providerIds, $factories);
$contextId = 'security.firewall.map.context.'.count($map);
- $context = $container->setDefinition($contextId, clone $container->getDefinition('security.firewall.context'));
+ $context = $container->setDefinition($contextId, new DefinitionDecorator('security.firewall.context'));
$context
- ->setPublic(true)
->setArgument(0, $listeners)
->setArgument(1, $exceptionListener)
;
@@ -213,7 +209,7 @@ class SecurityExtension extends Extension
$mapDef->setArgument(1, $map);
}
- protected function createFirewall(ContainerBuilder $container, $firewall, $providerIds)
+ protected function createFirewall(ContainerBuilder $container, $firewall, $providerIds, array $factories)
{
// unique id for this firewall
$id = md5(serialize($firewall));
@@ -266,7 +262,7 @@ class SecurityExtension extends Extension
// Logout listener
if (array_key_exists('logout', $firewall)) {
$listenerId = 'security.logout_listener.'.$id;
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.logout_listener'));
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.logout_listener'));
$listeners[] = new Reference($listenerId);
@@ -274,15 +270,13 @@ class SecurityExtension extends Extension
$firewall['logout'] = array();
}
- $arguments = $listener->getArguments();
if (isset($firewall['logout']['path'])) {
- $arguments[1] = $firewall['logout']['path'];
+ $listener->setArgument(1, $firewall['logout']['path']);
}
if (isset($firewall['logout']['target'])) {
- $arguments[2] = $firewall['logout']['target'];
+ $listener->setArgument(2, $firewall['logout']['target']);
}
- $listener->setArguments($arguments);
// add session logout handler
$invalidateSession = true;
@@ -299,15 +293,15 @@ class SecurityExtension extends Extension
// add cookie logout handler
if (count($cookies = $this->normalizeConfig($firewall['logout'], 'cookie')) > 0) {
$cookieHandlerId = 'security.logout.handler.cookie_clearing.'.$id;
- $cookieHandler = $container->setDefinition($cookieHandlerId, clone $container->getDefinition('security.logout.handler.cookie_clearing'));
- $cookieHandler->setArguments(array($cookies));
+ $cookieHandler = $container->setDefinition($cookieHandlerId, new DefinitionDecorator('security.logout.handler.cookie_clearing'));
+ $cookieHandler->addArgument($cookies);
$listener->addMethodCall('addHandler', array(new Reference($cookieHandlerId)));
}
}
// Authentication listeners
- list($authListeners, $providers, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $defaultProvider);
+ list($authListeners, $providers, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $defaultProvider, $factories);
$listeners = array_merge($listeners, $authListeners);
@@ -343,36 +337,20 @@ class SecurityExtension extends Extension
}
$listenerId = 'security.context_listener.'.count($this->contextListeners);
- $listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.context_listener'));
- $arguments = $listener->getArguments();
- $arguments[2] = $contextKey;
- $listener->setArguments($arguments);
+ $listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.context_listener'));
+ $listener->setArgument(2, $contextKey);
return $this->contextListeners[$contextKey] = $listenerId;
}
- protected function createAuthenticationListeners($container, $id, $firewall, $defaultProvider)
+ protected function createAuthenticationListeners($container, $id, $firewall, $defaultProvider, array $factories)
{
$listeners = array();
$providers = array();
$hasListeners = false;
$defaultEntryPoint = null;
- $positions = array('pre_auth', 'form', 'http', 'remember_me');
-
- $tags = $container->findTaggedServiceIds('security.listener.factory');
- $factories = array();
- foreach ($positions as $position) {
- $factories[$position] = array();
- }
-
- foreach (array_keys($tags) as $tag) {
- $factory = $container->get($tag);
-
- $factories[$factory->getPosition()][] = $factory;
- }
-
- foreach ($positions as $position) {
+ foreach ($this->listenerPositions as $position) {
foreach ($factories[$position] as $factory) {
$key = $factory->getKey();
$keybis = str_replace('-', '_', $key);
@@ -427,6 +405,35 @@ class SecurityExtension extends Extension
return $providerIds;
}
+ protected function createListenerFactories(ContainerBuilder $container, $config)
+ {
+ // load service templates
+ $c = new ContainerBuilder();
+ $parameterBag = $container->getParameterBag();
+ $loader = new XmlFileLoader($c, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
+ $loader->load('security_factories.xml');
+
+ // load user-created listener factories
+ foreach ($this->normalizeConfig($config, 'factory', 'factories') as $factory) {
+ $loader->load($parameterBag->resolveValue($factory));
+ }
+
+ $tags = $c->findTaggedServiceIds('security.listener.factory');
+
+ $factories = array();
+ foreach ($this->listenerPositions as $position) {
+ $factories[$position] = array();
+ }
+
+ foreach (array_keys($tags) as $tag) {
+ $factory = $c->get($tag);
+
+ $factories[$factory->getPosition()][] = $factory;
+ }
+
+ return $factories;
+ }
+
protected function createEncoders($config, ContainerBuilder $container)
{
$encoders = $this->normalizeConfig($config, 'encoder');
@@ -623,19 +630,16 @@ class SecurityExtension extends Extension
}
$exceptionListenerId = 'security.exception_listener.'.$id;
- $listener = $container->setDefinition($exceptionListenerId, clone $container->getDefinition('security.exception_listener'));
- $arguments = $listener->getArguments();
- $arguments[2] = null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint);
+ $listener = $container->setDefinition($exceptionListenerId, new DefinitionDecorator('security.exception_listener'));
+ $listener->setArgument(2, null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint));
// access denied handler setup
if (isset($config['access-denied-handler'])) {
- $arguments[4] = new Reference($config['access-denied-handler']);
+ $listener->setArgument(4, new Reference($config['access-denied-handler']));
} else if (isset($config['access-denied-url'])) {
- $arguments[3] = $config['access-denied-url'];
+ $listener->setArgument(3, $config['access-denied-url']);
}
- $listener->setArguments($arguments);
-
return $exceptionListenerId;
}
@@ -644,17 +648,15 @@ class SecurityExtension extends Extension
$userProvider = isset($config['provider']) ? $this->getUserProviderId($config['provider']) : $defaultProvider;
$switchUserListenerId = 'security.authentication.switchuser_listener.'.$id;
- $listener = $container->setDefinition($switchUserListenerId, clone $container->getDefinition('security.authentication.switchuser_listener'));
- $arguments = $listener->getArguments();
- $arguments[1] = new Reference($userProvider);
- $listener->setArguments($arguments);
-
- if (isset($config['role'])) {
- $container->setParameter('security.authentication.switchuser.role', $config['role']);
- }
+ $listener = $container->setDefinition($switchUserListenerId, new DefinitionDecorator('security.authentication.switchuser_listener'));
+ $listener->setArgument(1, new Reference($userProvider));
if (isset($config['parameter'])) {
- $container->setParameter('security.authentication.switchuser.parameter', $config['parameter']);
+ $listener->setArgument(5, $config['parameter']);
+ }
+
+ if (isset($config['role'])) {
+ $listener->setArgument(6, $config['role']);
}
return $switchUserListenerId;
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
index cfaf242d4e..29b7d49bc3 100644
--- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
@@ -22,65 +22,11 @@
Symfony\Component\Security\Core\Authentication\Token\AnonymousToken
Symfony\Component\Security\Core\Authentication\Token\RememberMeToken
- Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider
- Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider
- Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider
-
Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager
- Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint
-
Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy
migrate
- Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint
- Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener
-
-
- Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint
- Symfony2
-
- Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint
- Symfony2
- SomethingUnique
-
- Symfony\Component\Security\Http\Firewall\X509AuthenticationListener
- SSL_CLIENT_S_DN_Email
- SSL_CLIENT_S_DN
-
- Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener
- Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener
- Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener
-
- Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider
- SomeRandomValue
-
- Symfony\Component\Security\Http\Firewall\RememberMeListener
- Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider
-
- Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices
- Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices
- SYMFONY_REMEMBERME
- 31536000
- /
-
- false
- true
- false
- _remember_me
-
- Symfony\Component\Security\Http\Firewall\ChannelListener
-
- Symfony\Component\Security\Http\Firewall\LogoutListener
- /logout
- /
- Symfony\Component\Security\Http\Logout\SessionLogoutHandler
- Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler
-
- Symfony\Component\Security\Http\Firewall\SwitchUserListener
- ROLE_ALLOWED_TO_SWITCH
- _switch_user
-
Symfony\Component\Security\Core\Authorization\AccessDecisionManager
affirmative
false
@@ -92,10 +38,6 @@
Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter
Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter
- Symfony\Component\Security\Http\Firewall\AccessListener
- Symfony\Component\Security\Http\AccessMap
- Symfony\Component\Security\Http\Firewall\ExceptionListener
- Symfony\Component\Security\Http\Firewall\ContextListener
Symfony\Component\Security\Http\Firewall
Symfony\Bundle\SecurityBundle\Security\FirewallMap
Symfony\Bundle\SecurityBundle\Security\FirewallContext
@@ -111,35 +53,11 @@
%security.context.always_authenticate%
-
- %security.role_hierarchy.roles%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %security.anonymous.key%
-
-
-
+
-
- %security.anonymous.key%
-
-
-
%security.authentication.trust_resolver.anonymous_class%
%security.authentication.trust_resolver.rememberme_class%
@@ -148,45 +66,45 @@
%security.authentication.session_strategy.strategy%
-
-
-
-
-
- %security.authentication.basic_entry_point.realm%
+
+
+
+
+
+
-
- %security.authentication.digest_entry_point.realm%
- %security.authentication.digest_entry_point.key%
-
-
-
-
-
-
-
+
%security.access.decision_manager.strategy%
%security.access.decision_manager.allow_if_all_abstain%
%security.access.decision_manager.allow_if_equal_granted_denied%
-
+
+ %security.role_hierarchy.roles%
+
+
+
+
+
+
+
+
@@ -198,11 +116,9 @@
-
-
-
-
-
-
+
+
+
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_factories.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_factories.xml
new file mode 100644
index 0000000000..6da661cfac
--- /dev/null
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_factories.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
new file mode 100644
index 0000000000..338ec93334
--- /dev/null
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint
+
+ Symfony\Component\Security\Http\Firewall\ChannelListener
+
+ Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint
+ Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener
+
+ Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener
+ Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint
+ Symfony2
+
+ Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener
+ Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint
+ Symfony2
+ SomethingUnique
+
+ Symfony\Component\Security\Http\Firewall\X509AuthenticationListener
+ SSL_CLIENT_S_DN_Email
+ SSL_CLIENT_S_DN
+
+ Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener
+
+ Symfony\Component\Security\Http\Firewall\SwitchUserListener
+ ROLE_ALLOWED_TO_SWITCH
+ _switch_user
+
+ Symfony\Component\Security\Http\Firewall\LogoutListener
+ /logout
+ /
+ Symfony\Component\Security\Http\Logout\SessionLogoutHandler
+ Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler
+
+ Symfony\Component\Security\Http\Firewall\AccessListener
+ Symfony\Component\Security\Http\AccessMap
+ Symfony\Component\Security\Http\Firewall\ExceptionListener
+ Symfony\Component\Security\Http\Firewall\ContextListener
+
+ Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider
+ Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider
+
+ Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider
+ SomeRandomValue
+
+
+
+
+
+ %security.anonymous.key%
+
+
+
+
+ %security.anonymous.key%
+
+
+
+
+
+
+ %security.authentication.basic_entry_point.realm%
+
+
+
+ %security.authentication.digest_entry_point.realm%
+ %security.authentication.digest_entry_point.key%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %security.logout.path%
+ %security.logout.target_path%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %security.authentication.x509.user%
+ %security.authentication.x509.credentials%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %security.access.denied_url%
+
+
+
+
+
+
+
+
+
+
+ %security.authentication.switchuser.parameter%
+ %security.authentication.switchuser.role%
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml
new file mode 100644
index 0000000000..2d3f8583f2
--- /dev/null
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_rememberme.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+ Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider
+
+ Symfony\Component\Security\Http\Firewall\RememberMeListener
+ Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider
+
+ Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices
+ Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_templates.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_templates.xml
deleted file mode 100644
index 712e9e379b..0000000000
--- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_templates.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %security.logout.path%
- %security.logout.target_path%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %security.authentication.x509.user%
- %security.authentication.x509.credentials%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %security.authentication.rememberme.services.options.name%
- %security.authentication.rememberme.services.options.lifetime%
- %security.authentication.rememberme.services.options.path%
- %security.authentication.rememberme.services.options.domain%
- %security.authentication.rememberme.services.options.secure%
- %security.authentication.rememberme.services.options.httponly%
- %security.authentication.rememberme.services.options.always_remember_me%
- %security.authentication.rememberme.services.options.remember_me_parameter%
-
-
-
-
-
-
-
-
-
- %security.authentication.rememberme.services.options.name%
- %security.authentication.rememberme.services.options.lifetime%
- %security.authentication.rememberme.services.options.path%
- %security.authentication.rememberme.services.options.domain%
- %security.authentication.rememberme.services.options.secure%
- %security.authentication.rememberme.services.options.httponly%
- %security.authentication.rememberme.services.options.always_remember_me%
- %security.authentication.rememberme.services.options.remember_me_parameter%
-
-
-
-
-
-
-
-
- %security.access.denied_url%
-
-
-
-
-
-
-
-
-
-
-
- %security.authentication.switchuser.parameter%
- %security.authentication.switchuser.role%
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-