8000 [Security] Configuring a user checker per firewall by linaori · Pull Request #14721 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Security] Configuring a user checker per firewall #14721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Updated docs to briefly explain the exception thrown
  • Loading branch information
Iltar van der Berg committed Oct 1, 2015
commit d2468f44abe5cd8e400cb5ec765f8f2af574ad9a
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
->booleanNode('security')->defaultTrue()->end()
->arrayNode('user_checkers')
->defaultValue(array('security.user_checker'))
->info('A list of user checkers reserved for this firewall.')
->info('A list of user checker service ids to use when authenticating users in this firewall.')
->prototype('scalar')->end()
->end()
->scalarNode('request_matcher')->end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@

namespace Symfony\Component\Security\Core\User;

use Symfony\Component\Security\Core\Exception\AccountStatusException;

/**
* UserCheckerInterface checks user account when authentication occurs.
* Implement to throw AccountStatusException during the authentication process.
*
* This should not be used to make authentication decisions.
* Can be used when you want to check the account status, e.g when the account is
* disabled or blocked. This should not be used to make authentication decisions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
Expand All @@ -24,13 +27,15 @@ interface UserCheckerInterface
* Checks the user account before authentication.
*
* @param UserInterface $user a UserInterface instance
* @throws AccountStatusException
*/
public function checkPreAuth(UserInterface $user);

/**
* Checks the user account after authentication.
*
* @param UserInterface $user a UserInterface instance
* @throws AccountStatusException
*/
public function checkPostAuth(UserInterface $user);
}
0