In my java application, I am going to lock the account if someone does not enter the correct password 6 times. I am going to add a field in my local database that indicates if a user's account is locked or not. However, how can I unlock this account? For example, I may want to unlock their account after 15 minutes. What is the best way to go about unlocking a user's account?
Asked
Active
Viewed 776 times
2 Answers
2
I would only store the date and time that indicates when the user account is going to be unblocked.
So when that date/time is "larger" than the current time, the user is able to access the account.
Whenever the date/time is "smaller" than the current time, the user isn't able too.

CPUFry
- 566
- 4
- 18
0
Store a "high water mark" time for it to unlock. Each time the user violates the # of failed tries etc refresh it.

TheFiddlerWins
- 860
- 5
- 19