AbstractPreAuthenticatedListener

abstract class AbstractPreAuthenticatedListener implements ListenerInterface

AbstractPreAuthenticatedListener is the base class for all listener that authenticates users based on a pre-authenticated request (like a certificate for instance).

Properties

protected $logger

Methods

__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
handle(GetResponseEvent $event)

Handles pre-authentication.

setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy)

Call this method if your authentication token is stored to a session.

array getPreAuthenticatedData(Request $request)

Gets the user and credentials from the Request.

Details

__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)

Parameters

TokenStorageInterface $tokenStorage
AuthenticationManagerInterface $authenticationManager
string $providerKey
LoggerInterface $logger
EventDispatcherInterface $dispatcher

final handle(GetResponseEvent $event)

Handles pre-authentication.

Parameters

GetResponseEvent $event

setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy)

Call this method if your authentication token is stored to a session.

Parameters

SessionAuthenticationStrategyInterface $sessionStrategy

abstract protected array getPreAuthenticatedData(Request $request)

Gets the user and credentials from the Request.

Parameters

Request $request

Return Value

array An array composed of the user and the credentials