SimpleFormAuthenticationListener
extends AbstractAuthenticationListener
in package
The AbstractAuthenticationListener is the preferred base class for all browser-/HTTP-based authentication requests.
Tags
Table of Contents
- $authenticationManager : mixed
- $httpUtils : mixed
- $logger : mixed
- $options : mixed
- $providerKey : mixed
- $csrfTokenManager : mixed
- $dispatcher : mixed
- $failureHandler : mixed
- $rememberMeServices : mixed
- $sessionStrategy : mixed
- $simpleAuthenticator : mixed
- $successHandler : mixed
- $tokenStorage : mixed
- __construct() : mixed
- __invoke() : mixed
- authenticate() : mixed
- Does whatever is required to authenticate the request, typically calling $event->setResponse() internally.
- setRememberMeServices() : mixed
- Sets the RememberMeServices implementation to use.
- supports() : bool|null
- Tells whether the authenticate() method should be called or not depending on the incoming request.
- attemptAuthentication() : TokenInterface|Response|null
- Performs authentication.
- requiresAuthentication() : bool
- Whether this request requires authentication.
- onFailure() : Response
- onSuccess() : Response
Properties
$authenticationManager
protected
mixed
$authenticationManager
$httpUtils
protected
mixed
$httpUtils
$logger
protected
mixed
$logger
$options
protected
mixed
$options
$providerKey
protected
mixed
$providerKey
$csrfTokenManager
private
mixed
$csrfTokenManager
$dispatcher
private
mixed
$dispatcher
$failureHandler
private
mixed
$failureHandler
$rememberMeServices
private
mixed
$rememberMeServices
$sessionStrategy
private
mixed
$sessionStrategy
$simpleAuthenticator
private
mixed
$simpleAuthenticator
$successHandler
private
mixed
$successHandler
$tokenStorage
private
mixed
$tokenStorage
Methods
__construct()
public
__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, string $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler[, array<string|int, mixed> $options = [] ][, LoggerInterface $logger = null ][, EventDispatcherInterface $dispatcher = null ][, CsrfTokenManagerInterface $csrfTokenManager = null ][, SimpleFormAuthenticatorInterface $simpleAuthenticator = null ]) : mixed
Parameters
- $tokenStorage : TokenStorageInterface
- $authenticationManager : AuthenticationManagerInterface
- $sessionStrategy : SessionAuthenticationStrategyInterface
- $httpUtils : HttpUtils
- $providerKey : string
- $successHandler : AuthenticationSuccessHandlerInterface
- $failureHandler : AuthenticationFailureHandlerInterface
- $options : array<string|int, mixed> = []
- $logger : LoggerInterface = null
- $dispatcher : EventDispatcherInterface = null
- $csrfTokenManager : CsrfTokenManagerInterface = null
- $simpleAuthenticator : SimpleFormAuthenticatorInterface = null
Tags
Return values
mixed —__invoke()
public
final __invoke(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent
Return values
mixed —authenticate()
Does whatever is required to authenticate the request, typically calling $event->setResponse() internally.
public
abstract authenticate(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent
Return values
mixed —setRememberMeServices()
Sets the RememberMeServices implementation to use.
public
setRememberMeServices(RememberMeServicesInterface $rememberMeServices) : mixed
Parameters
- $rememberMeServices : RememberMeServicesInterface
Return values
mixed —supports()
Tells whether the authenticate() method should be called or not depending on the incoming request.
public
abstract supports(Request $request) : bool|null
Returning null means authenticate() can be called lazily when accessing the token storage.
Parameters
- $request : Request
Return values
bool|null —attemptAuthentication()
Performs authentication.
protected
attemptAuthentication(Request $request) : TokenInterface|Response|null
Parameters
- $request : Request
Return values
TokenInterface|Response|null —The authenticated token, null if full authentication is not possible, or a Response
requiresAuthentication()
Whether this request requires authentication.
protected
requiresAuthentication(Request $request) : bool
Parameters
- $request : Request
Return values
bool —onFailure()
private
onFailure(Request $request, AuthenticationException $failed) : Response
Parameters
- $request : Request
- $failed : AuthenticationException
Return values
Response —onSuccess()
private
onSuccess(Request $request, TokenInterface $token) : Response
Parameters
- $request : Request
- $token : TokenInterface