Hi Andreas > I'm using Acegi Security 0.5 with a Hibernate based > AuthenticationDao implementation. I'd like to save "date of > last login" and "nr. of logins" > in a user's profile. > > Where do I best plug in to catch this information? In the > AuthenticationDao when preparing the User object I don't know > yet if this is going to be a successful login..
A project I'm presently working on will require a way of tracking unsuccessful logins and their source, so I'll be adding some changes to the project to produce events soon. I am planning on using Spring's ApplicationEvent and ApplicationListener, with ProviderManager producing authentication success/fail events (messages will contain the AuthenticationException or Authentication objects as applicable). This would also support your requirement. I'll move this discussion to acegisecurity-developer so we can get agreement as to this approach, and make the changes in CVS. If you need an immediate solution, I'd simply subclass DaoAuthenticationProvider and override the authenticate(Authentication) method. Just delegate to the super, and then handle the outcome in your subclass (by calling your Hibernate DAO etc). Best regards Ben ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ Acegisecurity-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer