diff --git a/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php b/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php index 18e46cf8e2..646eea9b59 100644 --- a/src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php +++ b/src/Symfony/Component/Security/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/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php b/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php index b694541bde..abbe985c9e 100644 --- a/src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php +++ b/src/Symfony/Component/Security/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.'); } }