Listener optimize

This commit is contained in:
MaxKey
2022-04-27 10:03:35 +08:00
parent 773334ad47
commit 470d93d7cb
13 changed files with 233 additions and 194 deletions

View File

@@ -30,10 +30,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
@WebListener
public class SessionListenerAdapter implements HttpSessionListener {
private static final Logger _logger = LoggerFactory.getLogger(SessionListenerAdapter.class);
public class HttpSessionListenerAdapter implements HttpSessionListener {
private static final Logger _logger = LoggerFactory.getLogger(HttpSessionListenerAdapter.class);
public SessionListenerAdapter() {
public HttpSessionListenerAdapter() {
super();
_logger.debug("SessionListenerAdapter inited . ");
}

View File

@@ -30,7 +30,7 @@ import org.maxkey.authn.provider.TrustedAuthenticationProvider;
import org.maxkey.authn.realm.AbstractAuthenticationRealm;
import org.maxkey.authn.session.SessionManager;
import org.maxkey.authn.session.SessionManagerFactory;
import org.maxkey.authn.web.SessionListenerAdapter;
import org.maxkey.authn.web.HttpSessionListenerAdapter;
import org.maxkey.configuration.ApplicationConfig;
import org.maxkey.configuration.AuthJwkConfig;
import org.maxkey.constants.ConstsPersistence;
@@ -195,9 +195,9 @@ public class AuthenticationAutoConfiguration implements InitializingBean {
return sessionManager;
}
@Bean(name = "sessionListenerAdapter")
public SessionListenerAdapter sessionListenerAdapter() {
return new SessionListenerAdapter();
@Bean(name = "httpSessionListenerAdapter")
public HttpSessionListenerAdapter httpSessionListenerAdapter() {
return new HttpSessionListenerAdapter();
}
@Override