我使用FOSRestBundle
中的Symfony 4
,并希望以此来保护我的登录表单。
我想在登录表单上设置有限的连接尝试次数(最多5分钟,共15分钟,然后30分钟,然后1小时)
我已搜索并且找到了此链接
https://blog.netinfluence.ch/2019/04/18/limiter-le-nombre-de-tentatives-de-connexions-sous-symfony/
但是在此链接中,只有在使用symfony Guard来实现登录系统时才实现。谢谢您的帮助!
使用ip创建新实体,failedCount和lastModified(作为时间)。每当有人输入错误的凭据时,将其插入或更新为具有增加的failCount的新表。添加逻辑取决于ip,failedCount和lastModified。
OR
使用Google验证码:P