Class PostAuthenticationSessionLocaleHandler

java.lang.Object
de.codecamp.messages.spring.vaadin.security.PostAuthenticationSessionLocaleHandler

public class PostAuthenticationSessionLocaleHandler extends Object
Listens to AuthenticationSuccessEvent and InteractiveAuthenticationSuccessEvent and tries to update the session locale and time zone based on the Authentication.getPrincipal() / UserDetails (if they implement HasLocaleAndTimeZone) or a provided LocaleAndTimeZoneExtractor.
  • Constructor Details

    • PostAuthenticationSessionLocaleHandler

      public PostAuthenticationSessionLocaleHandler()
  • Method Details

    • setLocaleAndTimeZoneExtractor

      public void setLocaleAndTimeZoneExtractor(LocaleAndTimeZoneExtractor localeAndTimeZoneExtractor)
    • onAuthenticationSuccess

      @EventListener({org.springframework.security.authentication.event.AuthenticationSuccessEvent.class,org.springframework.security.authentication.event.InteractiveAuthenticationSuccessEvent.class}) public void onAuthenticationSuccess(org.springframework.security.authentication.event.AbstractAuthenticationEvent event)