Search in sources :

Example 1 with LogoutNotificationReceiver

use of org.wildfly.extension.undertow.security.LogoutNotificationReceiver in project wildfly by wildfly.

the class UndertowDeploymentInfoService method handleAuthManagerLogout.

private void handleAuthManagerLogout(DeploymentInfo deploymentInfo, JBossWebMetaData mergedMetaData) {
    if (securityDomain == null) {
        return;
    }
    AuthenticationManager manager = securityDomainContextValue.getValue().getAuthenticationManager();
    deploymentInfo.addNotificationReceiver(new LogoutNotificationReceiver(manager, securityDomain));
    if (mergedMetaData.isFlushOnSessionInvalidation()) {
        LogoutSessionListener listener = new LogoutSessionListener(manager);
        deploymentInfo.addListener(Servlets.listener(LogoutSessionListener.class, new ImmediateInstanceFactory<EventListener>(listener)));
    }
}
Also used : JBossCachedAuthenticationManager(org.jboss.security.authentication.JBossCachedAuthenticationManager) AuthenticationManager(org.jboss.security.AuthenticationManager) LogoutNotificationReceiver(org.wildfly.extension.undertow.security.LogoutNotificationReceiver) ImmediateInstanceFactory(io.undertow.servlet.util.ImmediateInstanceFactory)

Aggregations

ImmediateInstanceFactory (io.undertow.servlet.util.ImmediateInstanceFactory)1 AuthenticationManager (org.jboss.security.AuthenticationManager)1 JBossCachedAuthenticationManager (org.jboss.security.authentication.JBossCachedAuthenticationManager)1 LogoutNotificationReceiver (org.wildfly.extension.undertow.security.LogoutNotificationReceiver)1