-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Document Security Events #4373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It was introduced in fabpot/symfony#520 without any further comments. @schmittjoh can you maybe help us with this? |
@weaverryan when doing the authentication in the firewall, there is several ways it can be non-interactive:
|
and if you want to have a listener triggered for all authentication cases, it should listen to an authentication event: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/AuthenticationEvents.php |
@stof Ah, I didn't even know about the AuthenticationEvents, awesome! We have It seems to me that you'll want Thanks! |
For For |
What would be the best event to listen to in the case I want to show a message every time a user logs in (including remember me option enabled) and this user has some specific characteristics? I understand that |
I just realized that I checked that the remember me cookie triggers |
This PR was merged into the 2.3 branch. Discussion ---------- [WIP] 4373 - document security events This is documentation for #4373. This pull request has two parts: * The component/security/authentication additions * The new cookbook security cookbook page. The new cookbook page is designed to give an example of how to use authentication events in an application. I have given example code for two of the four classes needed to throttle failed login attempts. The other two classes are a doctrine entity, and a class containing throttle domain logic, both of which are outside the scope of this documentation. I would welcome any comments and suggestions. Thank you. Commits ------- 0dbabfe Security - Cookbook - removed bad example. 69c0089 Merge branch '4373_Document_Security_Events' of github.com:kevintweber/symfony-docs into 4373_Document_Security_Events a14bd07 Security - Authentication - removed inaccurate tip. f15bea4 Added new cookbook page to security index. 5bdfd71 Better formatting for authentication tip. 9b2e9d8 Better section titles for security events on authentication page. 286f00c Added security event descriptions to security component authentication page.
See the
SecurityEvents
class for these 2:security.interactive_login
security.switch_user
And AuthenticationEvents for these 2:
security.authentication.success
security.authentication.failure
We should at least have a mention of them somewhere and when you would use them. This relates partially to #802. I've also never been clear on
security.interactive_login
, it's name and PHPDoc suggests that there are other, non-interactive ways to login, and so that a listener to this would not cover all login cases. I'm not sure what that includes/doesn't include.The text was updated successfully, but these errors were encountered: