AuthenticationSubscriber
class AuthenticationSubscriber implements EventSubscriberInterface (View source)
Authentication subscriber.
Trigger authentication during the request.
Properties
| protected AuthenticationProviderInterface | $authenticationProvider | Authentication provider. |
|
| protected AuthenticationProviderFilterInterface|null | $filter | Authentication provider filter. |
|
| protected AuthenticationProviderChallengeInterface|null | $challengeProvider | Authentication challenge provider. |
|
| protected AccountProxyInterface | $accountProxy | Account proxy. |
Methods
Constructs an authentication subscriber.
Authenticates user on request.
Denies access if authentication provider is not allowed on this route.
Respond with a challenge on access denied exceptions if appropriate.
Detect disallowed authentication methods on access denied exceptions.
{@inheritdoc}
Details
__construct(AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $account_proxy)
Constructs an authentication subscriber.
onKernelRequestAuthenticate(GetResponseEvent $event)
Authenticates user on request.
onKernelRequestFilterProvider(GetResponseEvent $event)
Denies access if authentication provider is not allowed on this route.
onExceptionSendChallenge(GetResponseForExceptionEvent $event)
Respond with a challenge on access denied exceptions if appropriate.
On a 403 (access denied), if there are no credentials on the request, some authentication methods (e.g. basic auth) require that a challenge is sent to the client.
onExceptionAccessDenied(GetResponseForExceptionEvent $event)
Detect disallowed authentication methods on access denied exceptions.
static
getSubscribedEvents()
{@inheritdoc}