diff options
-rw-r--r-- | Acl/composer.json | 6 | ||||
-rw-r--r-- | Core/composer.json | 5 | ||||
-rw-r--r-- | Http/Tests/Firewall/LogoutListenerTest.php | 30 | ||||
-rw-r--r-- | Http/composer.json | 5 | ||||
-rw-r--r-- | composer.json | 15 |
5 files changed, 29 insertions, 32 deletions
diff --git a/Acl/composer.json b/Acl/composer.json index 3d05989..0e68d9e 100644 --- a/Acl/composer.json +++ b/Acl/composer.json @@ -25,9 +25,9 @@ "psr/log": "~1.0" }, "suggest": { - "symfony/class-loader": "", - "symfony/finder": "", - "doctrine/dbal": "to use the built-in ACL implementation" + "symfony/class-loader": "For using the ACL generateSql script", + "symfony/finder": "For using the ACL generateSql script", + "doctrine/dbal": "For using the built-in ACL implementation" }, "autoload": { "psr-0": { "Symfony\\Component\\Security\\Acl\\": "" } diff --git a/Core/composer.json b/Core/composer.json index 4e7ff3a..7520be4 100644 --- a/Core/composer.json +++ b/Core/composer.json @@ -28,8 +28,9 @@ "suggest": { "symfony/event-dispatcher": "", "symfony/http-foundation": "", - "symfony/validator": "", - "ircmaxell/password-compat": "" + "symfony/validator": "For using the user password constraint", + "symfony/expression-language": "For using the expression voter", + "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" }, "autoload": { "psr-0": { "Symfony\\Component\\Security\\Core\\": "" } diff --git a/Http/Tests/Firewall/LogoutListenerTest.php b/Http/Tests/Firewall/LogoutListenerTest.php index 719b684..c279523 100644 --- a/Http/Tests/Firewall/LogoutListenerTest.php +++ b/Http/Tests/Firewall/LogoutListenerTest.php @@ -37,22 +37,21 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase public function testHandleMatchedPathWithSuccessHandlerAndCsrfValidation() { $successHandler = $this->getSuccessHandler(); - $csrfProvider = $this->getCsrfProvider(); + $tokenManager = $this->getTokenManager(); - list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $csrfProvider); + list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $tokenManager); list($event, $request) = $this->getGetResponseEvent(); - $request->query->set('_csrf_token', $csrfToken = 'token'); + $request->query->set('_csrf_token', 'token'); $httpUtils->expects($this->once()) ->method('checkRequestPath') ->with($request, $options['logout_path']) ->will($this->returnValue(true)); - $csrfProvider->expects($this->once()) - ->method('isCsrfTokenValid') - ->with('logout', $csrfToken) + $tokenManager->expects($this->once()) + ->method('isTokenValid') ->will($this->returnValue(true)); $successHandler->expects($this->once()) @@ -151,30 +150,29 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase */ public function testCsrfValidationFails() { - $csrfProvider = $this->getCsrfProvider(); + $tokenManager = $this->getTokenManager(); - list($listener, $context, $httpUtils, $options) = $this->getListener(null, $csrfProvider); + list($listener, $context, $httpUtils, $options) = $this->getListener(null, $tokenManager); list($event, $request) = $this->getGetResponseEvent(); - $request->query->set('_csrf_token', $csrfToken = 'token'); + $request->query->set('_csrf_token', 'token'); $httpUtils->expects($this->once()) ->method('checkRequestPath') ->with($request, $options['logout_path']) ->will($this->returnValue(true)); - $csrfProvider->expects($this->once()) - ->method('isCsrfTokenValid') - ->with('logout', $csrfToken) + $tokenManager->expects($this->once()) + ->method('isTokenValid') ->will($this->returnValue(false)); $listener->handle($event); } - private function getCsrfProvider() + private function getTokenManager() { - return $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface'); + return $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface'); } private function getContext() @@ -209,7 +207,7 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase ->getMock(); } - private function getListener($successHandler = null, $csrfProvider = null) + private function getListener($successHandler = null, $tokenManager = null) { $listener = new LogoutListener( $context = $this->getContext(), @@ -221,7 +219,7 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase 'logout_path' => '/logout', 'target_url' => '/', ), - $csrfProvider + $tokenManager ); return array($listener, $context, $httpUtils, $options); diff --git a/Http/composer.json b/Http/composer.json index 4dfd985..716c443 100644 --- a/Http/composer.json +++ b/Http/composer.json @@ -23,14 +23,13 @@ "symfony/http-kernel": "~2.4" }, "require-dev": { - "symfony/form": "~2.0", "symfony/routing": "~2.2", "symfony/security-csrf": "~2.4", "psr/log": "~1.0" }, "suggest": { - "symfony/security-csrf": "", - "symfony/routing": "" + "symfony/security-csrf": "For using tokens to protect authentication/logout attempts", + "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs" }, "autoload": { "psr-0": { "Symfony\\Component\\Security\\Http\\": "" } diff --git a/composer.json b/composer.json index 6be3886..18c69ba 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,6 @@ "symfony/security-http": "self.version" }, "require-dev": { - "symfony/form": "~2.0", "symfony/routing": "~2.2", "symfony/validator": "~2.2", "doctrine/common": "~2.2", @@ -38,13 +37,13 @@ "symfony/expression-language": "~2.4" }, "suggest": { - "symfony/class-loader": "", - "symfony/finder": "", - "symfony/form": "", - "symfony/validator": "", - "symfony/routing": "", - "doctrine/dbal": "to use the built-in ACL implementation", - "ircmaxell/password-compat": "" + "symfony/class-loader": "For using the ACL generateSql script", + "symfony/finder": "For using the ACL generateSql script", + "symfony/validator": "For using the user password constraint", + "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs", + "doctrine/dbal": "For using the built-in ACL implementation", + "symfony/expression-language": "For using the expression voter", + "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" }, "autoload": { "psr-0": { "Symfony\\Component\\Security\\": "" } |