com.healthy.security.browser.session.HealthyExpiredSessionStrategy Maven / Gradle / Ivy
package com.healthy.security.browser.session;
import com.healthy.common.security.properties.SecurityProperties;
import org.springframework.security.web.session.SessionInformationExpiredEvent;
import org.springframework.security.web.session.SessionInformationExpiredStrategy;
import javax.servlet.ServletException;
import java.io.IOException;
/**
* 并发登录导致session失效时,默认的处理策略
*/
public class HealthyExpiredSessionStrategy extends AbstractSessionStrategy implements SessionInformationExpiredStrategy {
public HealthyExpiredSessionStrategy(SecurityProperties securityPropertie) {
super(securityPropertie);
}
@Override
public void onExpiredSessionDetected(SessionInformationExpiredEvent event) throws IOException, ServletException {
onSessionInvalid(event.getRequest(), event.getResponse());
}
@Override
protected boolean isConcurrency() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy