You can accomplish all this using Spring . and Spring Security
1) Locking the user account after several unsuccessful login attempts in a certain period of time.
You can use Spring Security and count the number of failed attempts and the bock user here - this article
General Problem # 3: How to disconnect a user after several failed logins?
The general requirement of the user is to disable / block the account after several unsuccessful login attempts. Acegi itself does not provide anything out of the box, however in your application you can implement and register org.springframework.context.ApplicationListener. Inside the application event listener, you can check an instance of a specific AuthenticationFailureEvent, and then call your application’s management interface to update user information.
For instance:
public void onApplicationEvent(ApplicationEvent event) {
2) The password is valid for N days.
You can schedule a task using Spring Quartz Support , which resets the password. You can also have an ExpiryDate field in the database and can fire a trigger every day @ 0000 hours and do things
3) Tracking password history for each user.
using the DB, you can use the password usage history, and you can use Spring-DAO to make it easy.
btw, if you find any framework specifically designed for this lee me know :)
source share