Skip to content

Commit 7a123d1

Browse files
committed
Merge branch '2.3' into 2.4
* 2.3: [Security] fixed pre/post authentication checks Updated lithuanian validator translation: changed vartotojas to naudotojas as it is more proper term. Fixed CSS [HttpFoundation] Throw proper exception when invalid data is passed to JsonResponse class addressed == -> === suggestion Fixed #9020 - Added support for collections in service#parameters fixes PSR-0 issues in tests adjusted behavior to always copy override on url files Skips test that need full lib-intl. Conflicts: src/Symfony/Component/Security/Acl/Tests/Permission/MaskBuilderTest.php src/Symfony/Component/Security/Core/Tests/Authentication/Token/RememerMeTokenTest.php src/Symfony/Component/Security/Core/Tests/User/AccountCheckerTest.php src/Symfony/Component/Security/Core/Tests/User/InMemoryProviderTest.php src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememberMeTokenTest.php src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememerMeTokenTest.php src/Symfony/Component/Security/Tests/Core/User/AccountCheckerTest.php src/Symfony/Component/Security/Tests/Core/User/InMemoryProviderTest.php src/Symfony/Component/Security/Tests/Core/User/InMemoryUserProviderTest.php src/Symfony/Component/Security/Tests/Core/User/UserCheckerTest.php
2 parents c0fe460 + ef0cdb3 commit 7a123d1

File tree

4 files changed

+16
-269
lines changed

4 files changed

+16
-269
lines changed

Tests/Authentication/Token/RememerMeTokenTest.php

Lines changed: 0 additions & 83 deletions
This file was deleted.

Tests/User/AccountCheckerTest.php

Lines changed: 0 additions & 108 deletions
This file was deleted.

Tests/User/InMemoryProviderTest.php

Lines changed: 0 additions & 62 deletions
This file was deleted.

User/UserChecker.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,6 @@ public function checkPreAuth(UserInterface $user)
3232
return;
3333
}
3434

35-
if (!$user->isCredentialsNonExpired()) {
36-
$ex = new CredentialsExpiredException('User credentials have expired.');
37-
$ex->setUser($user);
38-
throw $ex;
39-
}
40-
}
41-
42-
/**
43-
* {@inheritdoc}
44-
*/
45-
public function checkPostAuth(UserInterface $user)
46-
{
47-
if (!$user instanceof AdvancedUserInterface) {
48-
return;
49-
}
50-
5135
if (!$user->isAccountNonLocked()) {
5236
$ex = new LockedException('User account is locked.');
5337
$ex->setUser($user);
@@ -66,4 +50,20 @@ public function checkPostAuth(UserInterface $user)
6650
throw $ex;
6751
}
6852
}
53+
54+
/**
55+
* {@inheritdoc}
56+
*/
57+
public function checkPostAuth(UserInterface $user)
58+
{
59+
if (!$user instanceof AdvancedUserInterface) {
60+
return;
61+
}
62+
63+
if (!$user->isCredentialsNonExpired()) {
64+
$ex = new CredentialsExpiredException('User credentials have expired.');
65+
$ex->setUser($user);
66+
throw $ex;
67+
}
68+
}
6969
}

0 commit comments

Comments
 (0)