Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 974acb9

Browse filesBrowse files
committed
[Security] added userChecker to SimpleAuthenticationProvider
apply userChecker after authToken is authenticated
1 parent 63d9dce commit 974acb9
Copy full SHA for 974acb9

File tree

1 file changed

+6
-2
lines changed
Filter options

1 file changed

+6
-2
lines changed

‎src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ public function __construct(SimpleAuthenticatorInterface $simpleAuthenticator, U
3939
public function authenticate(TokenInterface $token)
4040
{
4141
$authToken = $this->simpleAuthenticator->authenticateToken($token, $this->userProvider, $this->providerKey);
42-
$this->userChecker->checkPreAuth($authToken->getUser());
43-
$this->userChecker->checkPostAuth($authToken->getUser());
4442

4543
if ($authToken instanceof TokenInterface) {
44+
$this->userChecker->checkPreAuth($authToken->getUser());
45+
$this->userChecker->checkPostAuth($authToken->getUser());
46+
4647
return $authToken;
4748
}
4849

50+
$this->userChecker->checkPreAuth($authToken->getUser());
51+
$this->userChecker->checkPostAuth($authToken->getUser());
52+
4953
throw new AuthenticationException('Simple authenticator failed to return an authenticated token.');
5054
}
5155

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.