且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Symfony2中收听“记住我"重新认证事件?

更新时间:2023-02-19 18:56:30

Symfony\Component\Security\Http\Firewall\RememberMeListener.php @line:77).

Create a Listener for the security.interactive_login event. That gets triggered on both simple and "remember me" logins (see Symfony\Component\Security\Http\Firewall\RememberMeListener.php @line:77).

在侦听器中,您可以通过检查cookie来将两者分开. 您可以在此处找到更多信息.

In the listener you can separate the two by checking the cookie. You can find more about the listener here.