summaryrefslogtreecommitdiffstats
path: root/Guard/Provider/GuardAuthenticationProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'Guard/Provider/GuardAuthenticationProvider.php')
-rw-r--r--Guard/Provider/GuardAuthenticationProvider.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Guard/Provider/GuardAuthenticationProvider.php b/Guard/Provider/GuardAuthenticationProvider.php
index 646eea9..2a58085 100644
--- a/Guard/Provider/GuardAuthenticationProvider.php
+++ b/Guard/Provider/GuardAuthenticationProvider.php
@@ -21,6 +21,7 @@ use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
+use Symfony\Component\Security\Core\Exception\AuthenticationExpiredException;
/**
* Responsible for accepting the PreAuthenticationGuardToken and calling
@@ -81,8 +82,8 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface
return $token;
}
- // cause the logout - the token is not authenticated
- return new AnonymousToken($this->providerKey, 'anon.');
+ // this AccountStatusException causes the user to be logged out
+ throw new AuthenticationExpiredException();
}
// find the *one* GuardAuthenticator that this token originated from