class BasicAuthenticationListener implements ListenerInterface

BasicAuthenticationListener implements Basic HTTP authentication.

Traits

LegacyListenerTrait deprecated

Methods

handle(GetResponseEvent $event) deprecated

No description

__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)

No description

getResponse()

No description

setResponse(Response $response)

No description

hasResponse()

No description

__invoke(RequestEvent $event)

Handles basic authentication.

setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy)

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

Details

in LegacyListenerTrait at line 27
handle(GetResponseEvent $event) deprecated

deprecated since Symfony 4.3, use __invoke() instead

Parameters

GetResponseEvent $event

at line 44
__construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, string $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)

Parameters

TokenStorageInterface $tokenStorage
AuthenticationManagerInterface $authenticationManager
string $providerKey
AuthenticationEntryPointInterface $authenticationEntryPoint
LoggerInterface $logger

in LegacyListenerTrait at line 41
getResponse()

in LegacyListenerTrait at line 46
setResponse(Response $response)

Parameters

Response $response

in LegacyListenerTrait at line 51
hasResponse()

at line 61
__invoke(RequestEvent $event)

Handles basic authentication.

Parameters

RequestEvent $event

at line 108
setSessionAuthenticationStrategy(SessionAuthenticationStrategyInterface $sessionStrategy)

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

Parameters

SessionAuthenticationStrategyInterface $sessionStrategy