@@ -274,16 +274,17 @@ in) is correct, you can use::
274
274
Authentication Events
275
275
---------------------
276
276
277
- The security component provides 4 related authentication events:
278
-
279
- =============================== ================================================ ==============================================================================
280
- Name Event Constant Argument Passed to the Listener
281
- =============================== ================================================ ==============================================================================
282
- security.authentication.success ``AuthenticationEvents::AUTHENTICATION_SUCCESS `` :class: `Symfony\\ Component\\ Security\\ Core\\ Event\\ AuthenticationEvent `
283
- security.authentication.failure ``AuthenticationEvents::AUTHENTICATION_FAILURE `` :class: `Symfony\\ Component\\ Security\\ Core\\ Event\\ AuthenticationFailureEvent `
284
- security.interactive_login ``SecurityEvents::INTERACTIVE_LOGIN `` :class: `Symfony\\ Component\\ Security\\ Http\\ Event\\ InteractiveLoginEvent `
285
- security.switch_user ``SecurityEvents::SWITCH_USER `` :class: `Symfony\\ Component\\ Security\\ Http\\ Event\\ SwitchUserEvent `
286
- =============================== ================================================ ==============================================================================
277
+ The security component provides 5 related authentication events:
278
+
279
+ ========================================= ========================================================== ==============================================================================
280
+ Name Event Constant Argument Passed to the Listener
281
+ ========================================= ========================================================== ==============================================================================
282
+ security.authentication.success_sensitive ``AuthenticationEvents::AUTHENTICATION_SUCCESS_SENSITIVE `` :class: `Symfony\\ Component\\ Security\\ Core\\ Event\\ AuthenticationSensitiveEvent `
283
+ security.authentication.success ``AuthenticationEvents::AUTHENTICATION_SUCCESS `` :class: `Symfony\\ Component\\ Security\\ Core\\ Event\\ AuthenticationSuccessEvent `
284
+ security.authentication.failure ``AuthenticationEvents::AUTHENTICATION_FAILURE `` :class: `Symfony\\ Component\\ Security\\ Core\\ Event\\ AuthenticationFailureEvent `
285
+ security.interactive_login ``SecurityEvents::INTERACTIVE_LOGIN `` :class: `Symfony\\ Component\\ Security\\ Http\\ Event\\ InteractiveLoginEvent `
286
+ security.switch_user ``SecurityEvents::SWITCH_USER `` :class: `Symfony\\ Component\\ Security\\ Http\\ Event\\ SwitchUserEvent `
287
+ ========================================= ========================================================== ==============================================================================
287
288
288
289
Authentication Success and Failure Events
289
290
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -298,6 +299,18 @@ a ``security.authentication.failure`` event is dispatched. You could listen on
298
299
the ``security.authentication.failure `` event, for example, in order to log
299
300
failed login attempts.
300
301
302
+ Authentication Sensitive Event
303
+ ------------------------------
304
+
305
+ When a user is successfully authenticated, the security component will also
306
+ dispatch a ``security.authentication.success_sensitive `` just before erasing
307
+ credentials and dispatching the regular success event. The event object will
308
+ contain the token used to authenticate, allowing you to act upon its sensitive
309
+ information.
310
+
311
+ A common use for this would be to check whether a user's password needs
312
+ rehashing to stay up to date with current encryption standards.
313
+
301
314
Security Events
302
315
~~~~~~~~~~~~~~~
303
316
0 commit comments