要求PIN使用Symfony2登录
16lz
2021-01-22
I am trying to create a login system inside Symfony2 that requires both a Username/Password and a PIN. This means that when the user presses the login submit button Symfony2 should check against the username, password and the pin.
我正在尝试在Symfony2中创建一个需要用户名/密码和PIN的登录系统。这意味着当用户按下登录提交按钮时,Symfony2应该检查用户名,密码和引脚。
I don't really know where to start. I have a valid login system working with just a username/password using the UserInterface.
我真的不知道从哪里开始。我有一个有效的登录系统,使用UserInterface只使用用户名/密码。
Any ideas? Thanks.
有任何想法吗?谢谢。
1 个解决方案
#1
0
Follow this tutorial In the listener catch the error with a RedirectResponse to your login page and set a session variable with:
遵循本教程在侦听器中使用RedirectResponse捕获错误到您的登录页面并设置会话变量:
$session->set(SecurityContext::AUTHENTICATION_ERROR, array('message' => 'The details entered are invalid'));
更多相关文章
- php扫马、内网查mysql数据库账号密码(内网webshell渗透)
- 如何使用用户名作为子域名创建子域?
- jQuery PHP:检查用户名是否已经存在
- PHP万能密码登陆
- 从mysql中选择加密密码
- Zend数据库适配器-未捕获异常-堆栈跟踪显示用户名和密码
- Windows下 MySQL更新密码
- linux下mysql的root密码忘记,怎么改root密码
- Linux下修改MySQL初始密码、开启远程登录、授权远程登录用户