summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/SimplePreAuthenticationListener.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Http/Firewall/SimplePreAuthenticationListener.php b/Http/Firewall/SimplePreAuthenticationListener.php
index 258ca96..a6f4f77 100644
--- a/Http/Firewall/SimplePreAuthenticationListener.php
+++ b/Http/Firewall/SimplePreAuthenticationListener.php
@@ -76,6 +76,12 @@ class SimplePreAuthenticationListener implements ListenerInterface
try {
$token = $this->simpleAuthenticator->createToken($request, $this->providerKey);
+
+ // allow null to be returned to skip authentication
+ if (null === $token) {
+ return;
+ }
+
$token = $this->authenticationManager->authenticate($token);
$this->securityContext->setToken($token);
} catch (AuthenticationException $e) {