8000 Tweaks thanks to Wouter · symfony/symfony@396a162 · GitHub
[go: up one dir, main page]

Skip to content

Commit 396a162

Browse files
committed
Tweaks thanks to Wouter
1 parent c9d9430 commit 396a162

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Symfony/Component/Security/Guard/Provider/GuardAuthenticationProvider.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,21 @@ private function authenticateViaGuard(GuardAuthenticatorInterface $guardAuthenti
114114

115115
if (!$user instanceof UserInterface) {
116116
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.',
118118
get_class($guardAuthenticator),
119119
is_object($user) ? get_class($user) : gettype($user)
120120
));
121121
}
122122

123-
// check the preAuth UserChecker
124123
$this->userChecker->checkPreAuth($user);
125-
// check the credentials
126124
$guardAuthenticator->checkCredentials($token->getCredentials(), $user);
127-
// check the postAuth UserChecker
128125
$this->userChecker->checkPostAuth($user);
129126

130127
// turn the UserInterface into a TokenInterface
131128
$authenticatedToken = $guardAuthenticator->createAuthenticatedToken($user, $this->providerKey);
132129
if (!$authenticatedToken instanceof TokenInterface) {
133130
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.',
135132
get_class($guardAuthenticator),
136133
is_object($authenticatedToken) ? get_class($authenticatedToken) : gettype($authenticatedToken)
137134
));

src/Symfony/Component/Security/Guard/Token/PreAuthenticationGuardToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ public function getCredentials()
6060

6161
public function setAuthenticated($authenticated)
6262
{
63-
throw new \LogicException('The PreAuthenticationGuardToken is *always* not authenticated.');
63+
throw new \LogicException('The PreAuthenticationGuardToken is *never* authenticated.');
6464
}
6565
}

0 commit comments

Comments
 (0)
0