On Wed, Jul 25, 2012 at 7:14 AM, aliane abdelouahab
<alabde...@gmail.com> wrote:
how to force the user to stay 5 minutes after 3 failed attempts? or
ban him if the requests are from robots?
I think this is not Tornado specific.
You'll probably want to store something in your database to count the number of failed attempts, clear the count on successful login, save the last failed login time and disallow login if attempts == 3 and last_attempt_time > time.time() - 5*60.
Managing requests from robots might be a bit harder. I think you might mean "bots". "Robots" generally come from search engines and will not attempt to fill-in forms and login to your site. "bots", on the other hand, are usually malicious and will do everything they can to appear like a regular user.