I’m new to Spring Security. In my application authentication is done through Ldap.After Ldap authentication I want to handle failure and success events on login. I want to track login count in database for locking functionality.
any body knows how to achieve this?
I’m new to Spring Security. In my application authentication is done through Ldap .After
Share
Authentication is done by LDAP but you want to lock the ldap user after he logged in.
If you use spring 2.5 you can make your custom implementation of a InitializingBean and check if principal is a LDAP user:
And next implement this custom handle on your loginFailureEventListener (map this listener in your xml)
binding in XML:
EDIT:
You can extend
AuthenticationProcessingFilterand override theonUnsuccessfulAuthenticationmethod:Binning in XML:
Now you can put this filter in your filterChainProxy
Look here for inspiration
http://www.harinair.com/2010/02/spring-acegi-security-account-lockout/