diff options
author | Ryan Weaver <ryan@thatsquality.com> | 2015-09-20 19:51:09 -0400 |
---|---|---|
committer | Ryan Weaver <ryan@thatsquality.com> | 2015-09-20 19:51:09 -0400 |
commit | 9143527a73e82b6335761a1dda73eb2c2d240269 (patch) | |
tree | cfd8a9c6c5732da83dbd7f66f7564fdfe82697a4 | |
parent | 40181238b9145f8c917981351c97997942e0517b (diff) | |
download | symfony-security-9143527a73e82b6335761a1dda73eb2c2d240269.zip symfony-security-9143527a73e82b6335761a1dda73eb2c2d240269.tar.gz symfony-security-9143527a73e82b6335761a1dda73eb2c2d240269.tar.bz2 |
Tweaks thanks to Wouter
-rw-r--r-- | Guard/Provider/GuardAuthenticationProvider.php | 7 | ||||
-rw-r--r-- | Guard/Token/PreAuthenticationGuardToken.php | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Guard/Provider/GuardAuthenticationProvider.php b/Guard/Provider/GuardAuthenticationProvider.php index 18e46cf..646eea9 100644 --- a/Guard/Provider/GuardAuthenticationProvider.php +++ b/Guard/Provider/GuardAuthenticationProvider.php @@ -114,24 +114,21 @@ class GuardAuthenticationProvider implements AuthenticationProviderInterface if (!$user instanceof UserInterface) { throw new \UnexpectedValueException(sprintf( - 'The %s::getUser method must return a UserInterface. You returned %s.', + 'The %s::getUser() method must return a UserInterface. You returned %s.', get_class($guardAuthenticator), is_object($user) ? get_class($user) : gettype($user) )); } - // check the preAuth UserChecker $this->userChecker->checkPreAuth($user); - // check the credentials $guardAuthenticator->checkCredentials($token->getCredentials(), $user); - // check the postAuth UserChecker $this->userChecker->checkPostAuth($user); // turn the UserInterface into a TokenInterface $authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey); if (!$authenticatedToken instanceof TokenInterface) { throw new \UnexpectedValueException(sprintf( - 'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s.', + 'The %s::createAuthenticatedToken() method must return a TokenInterface. You returned %s.', get_class($guardAuthenticator), is_object($authenticatedToken) ? get_class($authenticatedToken) : gettype($authenticatedToken) )); diff --git a/Guard/Token/PreAuthenticationGuardToken.php b/Guard/Token/PreAuthenticationGuardToken.php index b694541..abbe985 100644 --- a/Guard/Token/PreAuthenticationGuardToken.php +++ b/Guard/Token/PreAuthenticationGuardToken.php @@ -60,6 +60,6 @@ class PreAuthenticationGuardToken extends AbstractToken implements GuardTokenInt public function setAuthenticated($authenticated) { - throw new \LogicException('The PreAuthenticationGuardToken is *always* not authenticated.'); + throw new \LogicException('The PreAuthenticationGuardToken is *never* authenticated.'); } } |