class SimpleFormAuthenticationListener extends AbstractAuthenticationListener

deprecated since Symfony 4.2, use Guard instead.

Properties

protected $options from AbstractAuthenticationListener
protected $logger from AbstractAuthenticationListener
protected $authenticationManager from AbstractAuthenticationListener
protected $providerKey from AbstractAuthenticationListener
protected $httpUtils from AbstractAuthenticationListener

Methods

__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null)

No description

setRememberMeServices(RememberMeServicesInterface $rememberMeServices)

Sets the RememberMeServices implementation to use.

handle(GetResponseEvent $event)

Handles form based authentication.

bool
requiresAuthentication(Request $request)

Whether this request requires authentication.

attemptAuthentication(Request $request)

Performs authentication.

Details

__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null, CsrfTokenManagerInterface $csrfTokenManager = null, SimpleFormAuthenticatorInterface $simpleAuthenticator = null)

Parameters

TokenStorageInterface $tokenStorage
AuthenticationManagerInterface $authenticationManager
SessionAuthenticationStrategyInterface $sessionStrategy
HttpUtils $httpUtils
string $providerKey
AuthenticationSuccessHandlerInterface $successHandler
AuthenticationFailureHandlerInterface $failureHandler
array $options
LoggerInterface $logger
EventDispatcherInterface $dispatcher
CsrfTokenManagerInterface $csrfTokenManager
SimpleFormAuthenticatorInterface $simpleAuthenticator

Exceptions

InvalidArgumentException In case no simple authenticator is provided

setRememberMeServices(RememberMeServicesInterface $rememberMeServices)

Sets the RememberMeServices implementation to use.

Parameters

RememberMeServicesInterface $rememberMeServices

final handle(GetResponseEvent $event)

Handles form based authentication.

protected bool requiresAuthentication(Request $request)

Whether this request requires authentication.

The default implementation only processes requests to a specific path, but a subclass could change this to only authenticate requests where a certain parameters is present.

Parameters

Request $request

Return Value

bool

protected TokenInterface|Response|null attemptAuthentication(Request $request)

Performs authentication.

Parameters

Request $request

Return Value

TokenInterface|Response|null The authenticated token, null if full authentication is not possible, or a Response

Exceptions

AuthenticationException if the authentication fails