All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.shawven.security.browser.session.BrowserExpiredSessionStrategy Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version

package com.github.shawven.security.browser.session;

import com.github.shawven.security.browser.config.BrowserConfiguration;
import org.springframework.security.web.session.SessionInformationExpiredEvent;
import org.springframework.security.web.session.SessionInformationExpiredStrategy;

import javax.servlet.ServletException;
import java.io.IOException;

/**
 * 并发登录导致session失效时,默认的处理策略
 *
 * @author Shoven
 * @since 2019-05-08 21:54
 */
public class BrowserExpiredSessionStrategy extends AbstractSessionStrategy implements SessionInformationExpiredStrategy {

	public BrowserExpiredSessionStrategy(BrowserConfiguration securityPropertie) {
		super(securityPropertie);
	}

	@Override
	public void onExpiredSessionDetected(SessionInformationExpiredEvent event) throws IOException, ServletException {
		onSessionInvalid(event.getRequest(), event.getResponse());
	}

	@Override
	protected boolean isConcurrency() {
		return true;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy