com.iovation.launchkey.sdk.example.springmvc.EventHandler.SessionFixationPreventionEventHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-examples-spring-mvc Show documentation
Show all versions of sdk-examples-spring-mvc Show documentation
Example application for using the LaunchKey SDK in a Spring MVC application
package com.iovation.launchkey.sdk.example.springmvc.EventHandler;
import com.iovation.launchkey.sdk.example.springmvc.AuthManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.security.web.authentication.session.SessionFixationProtectionEvent;
import org.springframework.stereotype.Component;
@Component
public class SessionFixationPreventionEventHandler implements ApplicationListener {
private final AuthManager authManager;
@Autowired
public SessionFixationPreventionEventHandler(AuthManager authManager) {
this.authManager = authManager;
}
@Override public void onApplicationEvent(SessionFixationProtectionEvent event) {
authManager.transitionSession(event.getOldSessionId(), event.getNewSessionId());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy