Authentication and Blocking Login Attempts after 'n' tries |
[eluser]Glazz[/eluser]
Hey there, I've created a basic authentication library, based on ion auth, it is more cleaner ( at least for me ).. And i added a feature to block a user after 'n' failed logins for let's say 30 minutes. It is working fine, but i don't know if this is the best way to do this. I was using sessions to store the ammount of failed login attempts, but then i switched to database. Here are the code that i'm using: http://pastebin.com/AWN72s4q Here are the full code of the library: http://pastebin.com/GciLbcNn How it is working: When a user press the login button if the login fails it calls the loginAttempt() function If the user do this 3 times the next time he tries to login he gets blocked because the function isBlocked() is being called on the very top of the login() function. My question is, do you think this is "effective" ? Or do you suggest something else ? Thanks ! |
Messages In This Thread |
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 02:09 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 04:32 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 04:38 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 04:45 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 04:48 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-08-2012, 05:55 PM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-09-2012, 12:45 AM
Authentication and Blocking Login Attempts after 'n' tries - by El Forum - 05-10-2012, 05:41 PM
|