-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Description
With the new authenticator-based Security component (5.1+)
When Credentials verification fails, a LoginFailureEvent event is raised.
Currently, its arguments are:
AuthenticationException $exception AuthenticatorInterface $authenticator Request $request ?Response $response string $firewallName
It would be useful to also pass it the Passport whose verification failed.
Typical use case: when a User try to log in with an invalid API key, I would like to store which API key was used. In some scenario, building the Passport from the Request is complex, so having to re-parse the Request is not great.
Extra suggestion; also sending the passport (or null) to onAuthenticationFailure, as right now it won't be stored in AuthenticationException.