summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Flothmann <christian.flothmann@xabbuh.de>2016-03-23 18:13:33 +0100
committerChristian Flothmann <christian.flothmann@xabbuh.de>2016-03-23 18:13:33 +0100
commit3cd38061c2e46280d76d1707bf9689870525599b (patch)
treea01f061d23c2289d88a5f86c357f9684e54bfe4d
parent41b7118c83c443bcea329782c4222ff1a9f510a2 (diff)
downloadsymfony-security-3cd38061c2e46280d76d1707bf9689870525599b.zip
symfony-security-3cd38061c2e46280d76d1707bf9689870525599b.tar.gz
symfony-security-3cd38061c2e46280d76d1707bf9689870525599b.tar.bz2
use class constants instead of FQCN strings
-rw-r--r--Http/Firewall/ContextListener.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index 6a394c8..4d6f3f8 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -17,6 +17,8 @@ use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
+use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
+use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
@@ -60,7 +62,7 @@ class ContextListener implements ListenerInterface
$this->sessionKey = '_security_'.$contextKey;
$this->logger = $logger;
$this->dispatcher = $dispatcher;
- $this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver('Symfony\Component\Security\Core\Authentication\Token\AnonymousToken', 'Symfony\Component\Security\Core\Authentication\Token\RememberMeToken');
+ $this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class);
}
/**