Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit b8517a6

Browse files
Iltar van der Bergfabpot
authored andcommitted
[Security] Configuring a user checker per firewall
1 parent 6941fe9 commit b8517a6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Core/User/UserCheckerInterface.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111

1212
namespace Symfony\Component\Security\Core\User;
1313

14+
use Symfony\Component\Security\Core\Exception\AccountStatusException;
15+
1416
/**
15-
* UserCheckerInterface checks user account when authentication occurs.
17+
* Implement to throw AccountStatusException during the authentication process.
1618
*
17-
* This should not be used to make authentication decisions.
19+
* Can be used when you want to check the account status, e.g when the account is
20+
* disabled or blocked. This should not be used to make authentication decisions.
1821
*
1922
* @author Fabien Potencier <[email protected]>
2023
*/
@@ -24,13 +27,17 @@ interface UserCheckerInterface
2427
* Checks the user account before authentication.
2528
*
2629
* @param UserInterface $user a UserInterface instance
30+
*
31+
* @throws AccountStatusException
2732
*/
2833
public function checkPreAuth(UserInterface $user);
2934

3035
/**
3136
* Checks the user account after authentication.
3237
*
3338
* @param UserInterface $user a UserInterface instance
39+
*
40+
* @throws AccountStatusException
3441
*/
3542
public function checkPostAuth(UserInterface $user);
3643
}

0 commit comments

Comments
 (0)