summaryrefslogtreecommitdiffstats
path: root/Http/Logout
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-11-26 19:00:33 +0100
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-11-28 10:23:07 +0100
commit205bbab85c4c56c1f72eda003bc752575d9e5df7 (patch)
treedec7b21f00e6d8b2e7587a242a8ca88fc8cc2d31 /Http/Logout
parent7fb58694400f63e4f01e0bb9750c04d071524619 (diff)
downloadsymfony-security-205bbab85c4c56c1f72eda003bc752575d9e5df7.zip
symfony-security-205bbab85c4c56c1f72eda003bc752575d9e5df7.tar.gz
symfony-security-205bbab85c4c56c1f72eda003bc752575d9e5df7.tar.bz2
[Form] Drop remaing CsrfProviderAdapter/Interface mentions
Diffstat (limited to 'Http/Logout')
-rw-r--r--Http/Logout/LogoutUrlGenerator.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/Http/Logout/LogoutUrlGenerator.php b/Http/Logout/LogoutUrlGenerator.php
index ff7ea5b..991b1fc 100644
--- a/Http/Logout/LogoutUrlGenerator.php
+++ b/Http/Logout/LogoutUrlGenerator.php
@@ -11,8 +11,6 @@
namespace Symfony\Component\Security\Http\Logout;
-use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter;
-use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@@ -47,14 +45,8 @@ class LogoutUrlGenerator
* @param string $csrfParameter The CSRF token parameter name
* @param CsrfTokenManagerInterface $csrfTokenManager A CsrfTokenManagerInterface instance
*/
- public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager = null)
+ public function registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null)
{
- if ($csrfTokenManager instanceof CsrfProviderInterface) {
- $csrfTokenManager = new CsrfProviderAdapter($csrfTokenManager);
- } elseif (null !== $csrfTokenManager && !$csrfTokenManager instanceof CsrfTokenManagerInterface) {
- throw new \InvalidArgumentException('The CSRF token manager should be an instance of CsrfProviderInterface or CsrfTokenManagerInterface.');
- }
-
$this->listeners[$key] = array($logoutPath, $csrfTokenId, $csrfParameter, $csrfTokenManager);
}