diff options
-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.'); } } |