Announcement Announcement Module
Collapse
No announcement yet.
Store Last Login with Http-Basic authentication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Store Last Login with Http-Basic authentication

    Is there a way that I can implement some post authentication listener so that I can store the last login date when using http-basic? I am using Spring 3.1.0 and Spring Security 3.1.0.

    I have both Http-Basic and form-login implemented and both are working properly. I defined the authentication-success-handler-ref for form-login and implemented a SavedRequestAwareAuthenticationSuccessHandler. Can I do something similar with http-basic?

  • #2
    You can register a DefaultAuthenticationEventPublisher as the AuthenticationEventPublisher with the ProviderManager. Then you can capture the events using Spring's standard event model.

    Comment


    • #3
      That worked. I simply created the ApplicationEventListener and defined it in my applicationContext.xml and immediately started receiving Login events. I didn't need to register it with my authentication provider.

      Thanks for the help.

      Comment

      Working...
      X