summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2011-07-04 12:47:32 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2011-07-04 12:47:32 +0200
commite4ca2c178f773c61a41ed080c9238fb2f71cc8a2 (patch)
tree4856a68422716cb2c77f3ce3872cf6bde69935bd
parentb79f41de462fd3aab9761fc46a29954a12e93a95 (diff)
parentdc96e742a66fca46140132797923ec67e87a7231 (diff)
downloadsymfony-security-e4ca2c178f773c61a41ed080c9238fb2f71cc8a2.zip
symfony-security-e4ca2c178f773c61a41ed080c9238fb2f71cc8a2.tar.gz
symfony-security-e4ca2c178f773c61a41ed080c9238fb2f71cc8a2.tar.bz2
merged branch Herzult/testSecurity (PR #1447)
Commits ------- 164aea4 [Security] Add tests for the channel listener d51cbc0 [Security] Remove useless attribute in basic authentication listener & test it 91e6dc9 [Security] Add tests for the anonymous authentication listener 3c2affb [Security] Update access listener constructor's prototype and add tests 81afd77 [Security] Add tests for the firewall map aa6ae33 [Security] Remove useless attribute & var in firewall Discussion ---------- Test security --------------------------------------------------------------------------- by lsmith77 at 2011/06/29 13:41:07 -0700 @schmittjoh is probably the person to review this change ..
-rw-r--r--Http/Firewall.php2
-rw-r--r--Http/Firewall/AccessListener.php4
-rw-r--r--Http/Firewall/BasicAuthenticationListener.php6
3 files changed, 2 insertions, 10 deletions
diff --git a/Http/Firewall.php b/Http/Firewall.php
index 996df29..9d05f86 100644
--- a/Http/Firewall.php
+++ b/Http/Firewall.php
@@ -30,7 +30,6 @@ class Firewall
{
private $map;
private $dispatcher;
- private $currentListeners;
/**
* Constructor.
@@ -42,7 +41,6 @@ class Firewall
{
$this->map = $map;
$this->dispatcher = $dispatcher;
- $this->currentListeners = array();
}
/**
diff --git a/Http/Firewall/AccessListener.php b/Http/Firewall/AccessListener.php
index 0cb45ac..877b6c3 100644
--- a/Http/Firewall/AccessListener.php
+++ b/Http/Firewall/AccessListener.php
@@ -11,7 +11,7 @@
namespace Symfony\Component\Security\Http\Firewall;
-use Symfony\Component\Security\Core\SecurityContext;
+use Symfony\Component\Security\Core\SecurityContextInterface;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
use Symfony\Component\Security\Http\AccessMap;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
@@ -33,7 +33,7 @@ class AccessListener implements ListenerInterface
private $authManager;
private $logger;
- public function __construct(SecurityContext $context, AccessDecisionManagerInterface $accessDecisionManager, AccessMap $map, AuthenticationManagerInterface $authManager, LoggerInterface $logger = null)
+ public function __construct(SecurityContextInterface $context, AccessDecisionManagerInterface $accessDecisionManager, AccessMap $map, AuthenticationManagerInterface $authManager, LoggerInterface $logger = null)
{
$this->context = $context;
$this->accessDecisionManager = $accessDecisionManager;
diff --git a/Http/Firewall/BasicAuthenticationListener.php b/Http/Firewall/BasicAuthenticationListener.php
index 9669853..ebe167e 100644
--- a/Http/Firewall/BasicAuthenticationListener.php
+++ b/Http/Firewall/BasicAuthenticationListener.php
@@ -31,7 +31,6 @@ class BasicAuthenticationListener implements ListenerInterface
private $providerKey;
private $authenticationEntryPoint;
private $logger;
- private $ignoreFailure;
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)
{
@@ -44,7 +43,6 @@ class BasicAuthenticationListener implements ListenerInterface
$this->providerKey = $providerKey;
$this->authenticationEntryPoint = $authenticationEntryPoint;
$this->logger = $logger;
- $this->ignoreFailure = false;
}
/**
@@ -80,10 +78,6 @@ class BasicAuthenticationListener implements ListenerInterface
$this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $failed->getMessage()));
}
- if ($this->ignoreFailure) {
- return;
- }
-
$event->setResponse($this->authenticationEntryPoint->start($request, $failed));
}
}