@@ -52,7 +52,7 @@ public function __construct(array $guardAuthenticators, UserProviderInterface $u
52
52
public function authenticate (TokenInterface $ token )
53
53
{
54
54
if (!$ this ->supports ($ token )) {
55
- throw new \InvalidArgumentException ('GuardAuthenticationProvider only supports NonAuthenticatedGuardToken ' );
55
+ throw new \InvalidArgumentException ('GuardAuthenticationProvider only supports GuardTokenInterface. ' );
56
56
}
57
57
58
58
if (!$ token instanceof PreAuthenticationGuardToken) {
@@ -87,7 +87,7 @@ public function authenticate(TokenInterface $token)
87
87
}
88
88
89
89
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. ' ,
91
91
$ token ->getGuardProviderKey ()
92
92
));
93
93
}
@@ -99,7 +99,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
99
99
100
100
if (!$ user instanceof UserInterface) {
101
101
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. ' ,
103
103
get_class ($ guardAuthenticator ),
104
104
is_object ($ user ) ? get_class ($ user ) : gettype ($ user )
105
105
));
@@ -113,7 +113,7 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
113
113
$ authenticatedToken = $ guardAuthenticator ->createAuthenticatedToken ($ user , $ this ->providerKey );
114
114
if (!$ authenticatedToken instanceof TokenInterface) {
115
115
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. ' ,
117
117
get_class ($ guardAuthenticator ),
118
118
is_object ($ authenticatedToken ) ? get_class ($ authenticatedToken ) : gettype ($ authenticatedToken )
119
119
));
0 commit comments