@@ -114,24 +114,21 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
114
114
115
115
if (!$ user instanceof UserInterface) {
116
116
throw new \UnexpectedValueException (sprintf (
117
- 'The %s::getUser method must return a UserInterface. You returned %s. ' ,
117
+ 'The %s::getUser() method must return a UserInterface. You returned %s. ' ,
118
118
get_class ($ guardAuthenticator ),
119
119
is_object ($ user ) ? get_class ($ user ) : gettype ($ user )
120
120
));
121
121
}
122
122
123
- // check the preAuth UserChecker
124
123
$ this ->userChecker ->checkPreAuth ($ user );
125
- // check the credentials
126
124
$ guardAuthenticator ->checkCredentials ($ token ->getCredentials (), $ user );
127
- // check the postAuth UserChecker
128
125
$ this ->userChecker ->checkPostAuth ($ user );
129
126
130
127
// turn the UserInterface into a TokenInterface
131
128
$ authenticatedToken = $ guardAuthenticator ->createAuthenticatedToken ($ user , $ this ->providerKey );
132
129
if (!$ authenticatedToken instanceof TokenInterface) {
133
130
throw new \UnexpectedValueException (sprintf (
134
- 'The %s::createAuthenticatedToken method must return a TokenInterface. You returned %s. ' ,
131
+ 'The %s::createAuthenticatedToken() method must return a TokenInterface. You returned %s. ' ,
135
132
get_class ($ guardAuthenticator ),
136
133
is_object ($ authenticatedToken ) ? get_class ($ authenticatedToken ) : gettype ($ authenticatedToken )
137
134
));
0 commit comments