GuardAuthenticationListener
extends AbstractListener
in package
implements
ListenerInterface
Uses
LegacyListenerTrait
Authentication listener for the "guard" system.
Tags
Interfaces, Classes, Traits and Enums
- ListenerInterface
- Interface that must be implemented by firewall listeners.
Table of Contents
- $authenticationManager : mixed
- $guardAuthenticators : mixed
- $guardHandler : mixed
- $hideUserNotFoundExceptions : mixed
- $logger : mixed
- $providerKey : mixed
- $rememberMeServices : mixed
- __construct() : mixed
- __invoke() : mixed
- authenticate() : mixed
- Iterates over each authenticator to see if each wants to authenticate the request.
- setRememberMeServices() : mixed
- Should be called if this listener will support remember me.
- supports() : bool|null
- Tells whether the authenticate() method should be called or not depending on the incoming request.
- executeGuardAuthenticator() : mixed
- triggerRememberMe() : mixed
- Checks to see if remember me is supported in the authenticator and on the firewall. If it is, the RememberMeServicesInterface is notified.
Properties
$authenticationManager
private
mixed
$authenticationManager
$guardAuthenticators
private
mixed
$guardAuthenticators
$guardHandler
private
mixed
$guardHandler
$hideUserNotFoundExceptions
private
mixed
$hideUserNotFoundExceptions
$logger
private
mixed
$logger
$providerKey
private
mixed
$providerKey
$rememberMeServices
private
mixed
$rememberMeServices
Methods
__construct()
public
__construct(GuardAuthenticatorHandler $guardHandler, AuthenticationManagerInterface $authenticationManager, string $providerKey, iteratable<string|int, mixed>|array<string|int, AuthenticatorInterface> $guardAuthenticators[, LoggerInterface $logger = null ][, bool $hideUserNotFoundExceptions = true ]) : mixed
Parameters
- $guardHandler : GuardAuthenticatorHandler
- $authenticationManager : AuthenticationManagerInterface
- $providerKey : string
-
The provider (i.e. firewall) key
- $guardAuthenticators : iteratable<string|int, mixed>|array<string|int, AuthenticatorInterface>
-
The authenticators, with keys that match what's passed to GuardAuthenticationProvider
- $logger : LoggerInterface = null
- $hideUserNotFoundExceptions : bool = true
Return values
mixed —__invoke()
public
final __invoke(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent
Return values
mixed —authenticate()
Iterates over each authenticator to see if each wants to authenticate the request.
public
authenticate(RequestEvent $event) : mixed
Parameters
- $event : RequestEvent
Return values
mixed —setRememberMeServices()
Should be called if this listener will support remember me.
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
supports(Request $request) : bool|null
Parameters
- $request : Request
Return values
bool|null —executeGuardAuthenticator()
private
executeGuardAuthenticator(string $uniqueGuardKey, AuthenticatorInterface $guardAuthenticator, RequestEvent $event) : mixed
Parameters
- $uniqueGuardKey : string
- $guardAuthenticator : AuthenticatorInterface
- $event : RequestEvent
Return values
mixed —triggerRememberMe()
Checks to see if remember me is supported in the authenticator and on the firewall. If it is, the RememberMeServicesInterface is notified.
private
triggerRememberMe(AuthenticatorInterface $guardAuthenticator, Request $request, TokenInterface $token[, Response $response = null ]) : mixed
Parameters
- $guardAuthenticator : AuthenticatorInterface
- $request : Request
- $token : TokenInterface
- $response : Response = null