You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
javiereguiluz
changed the title
[Security][authenticator][new feature] Pass Passport to LoginFailureEvent
[Security] Pass Passport to LoginFailureEvent
Jul 18, 2020
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
) toonAuthenticationFailure
, as right now it won't be stored inAuthenticationException
.The text was updated successfully, but these errors were encountered: