Class

Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener

abstract class AbstractAuthenticationListener implements ListenerInterface

The AbstractAuthenticationListener is the preferred base class for all browser-/HTTP-based authentication requests.

Subclasses likely have to implement the following: - an TokenInterface to hold authentication related data - an AuthenticationProvider to perform the actual authentication of the token, retrieve the UserInterface implementation from a database, and perform the specific account checks using the UserChecker

By default, this listener only is active for a specific path, e.g. /login_check. If you want to change this behavior, you can overwrite the requiresAuthentication() method.

Methods

__construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, array $options = array(), AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)

Constructor.

setRememberMeServices(RememberMeServicesInterface $rememberMeServices)

Sets the RememberMeServices implementation to use

handle(GetResponseEvent $event)

Handles form based authentication.

Details

at line 80
public __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, array $options = array(), AuthenticationSuccessHandlerInterface $successHandler = null, AuthenticationFailureHandlerInterface $failureHandler = null, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)

Constructor.

Parameters

SecurityContextInterface $securityContext A SecurityContext instance
AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance
SessionAuthenticationStrategyInterface $sessionStrategy
HttpUtils $httpUtils An HttpUtilsInterface instance
string $providerKey
array $options An array of options for the processing of a successful, or failed authentication attempt
AuthenticationSuccessHandlerInterface $successHandler
AuthenticationFailureHandlerInterface $failureHandler
LoggerInterface $logger A LoggerInterface instance
EventDispatcherInterface $dispatcher An EventDispatcherInterface instance

at line 112
public setRememberMeServices(RememberMeServicesInterface $rememberMeServices)

Sets the RememberMeServices implementation to use

Parameters

RememberMeServicesInterface $rememberMeServices

at line 122
final public handle(GetResponseEvent $event)

Handles form based authentication.

Parameters

GetResponseEvent $event A GetResponseEvent instance