在用户三次错误尝试后显示验证码 [英] Show captcha after three wrong attempts by the user

查看:160
本文介绍了在用户三次错误尝试后显示验证码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,如果N次尝试失败,我需要在某些地方引入验证码。这些地方可以注册,登录,添加到心​​愿单,订阅等。这也是为了确保任何人都不能尝试拒绝服务攻击和暴力攻击。 Spring Security中是否有这样的机制?

I am working on a application where at some places I need to introduce captcha if N number of attempts failed. These places can be signup, login, add to wishlist, subscribe etc. It is also to ensure that denial of service attack and brute force attack cannot be attempted by anyone. Is there a mechanism for this in Spring Security?

推荐答案

Spring Security中没有任何内容直接存在,但应该很容易存储用户会话中的登录计数,并检查JSP中的计数以呈现CAPTCHA是必要的。

There is nothing in Spring Security directly, but it should be easy to store the login count in the users session and check that count in your JSP to render a CAPTCHA is neccessary.

这篇关于在用户三次错误尝试后显示验证码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆