This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
James Daniel wrote:I am using Spring Security 3.0.4 and would like to log when a user successfully logs in. What is the best way to do this?
Which UserDetailsService are you using. You can always customize it yourself. You can either implement UserDetailsService interface, it just has one method. Or you can extend the UserDetailsService you are using, have the first line of code call super.loadUserByUserName(userName) then the code after logs a message.
Or you can try using Spring AOP and define a pointcut expression that matches loadUserByUserName. and do an AfterSuccessful advice type.