@@ -52,7 +52,7 @@ public function __construct(array $guardAuthenticators, UserProviderInterface $u
5252 public function authenticate (TokenInterface $ token )
5353 {
5454 if (!$ this ->supports ($ token )) {
55- throw new \InvalidArgumentException ('GuardAuthenticationProvider only supports NonAuthenticatedGuardToken ' );
55+ throw new \InvalidArgumentException ('GuardAuthenticationProvider only supports GuardTokenInterface. ' );
5656 }
5757
5858 if (!$ token instanceof PreAuthenticationGuardToken) {
@@ -87,7 +87,7 @@ public function authenticate(TokenInterface $token)
8787 }
8888
8989 throw new \LogicException (sprintf (
90- 'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators!? ' ,
90+ 'The correct GuardAuthenticator could not be found for unique key "%s". The listener and provider should be passed the same list of authenticators. ' ,
9191 $ token ->getGuardProviderKey ()
9292 ));
9393 }
@@ -99,7 +99,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
9999
100100 if (!$ user instanceof UserInterface) {
101101 throw new \UnexpectedValueException (sprintf (
102- 'The %s::authenticate method must return a UserInterface. You returned %s ' ,
102+ 'The %s::authenticate method must return a UserInterface. You returned %s. ' ,
103103 get_class ($ guardAuthenticator ),
104104 is_object ($ user ) ? get_class ($ user ) : gettype ($ user )
105105 ));
@@ -113,7 +113,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
113113 $ authenticatedToken = $ guardAuthenticator ->createAuthenticatedToken ($ user , $ this ->providerKey );
114114 if (!$ authenticatedToken instanceof TokenInterface) {
115115 throw new \UnexpectedValueException (sprintf (
116- 'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s ' ,
116+ 'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s. ' ,
117117 get_class ($ guardAuthenticator ),
118118 is_object ($ authenticatedToken ) ? get_class ($ authenticatedToken ) : gettype ($ authenticatedToken )
119119 ));
0 commit comments