Search in sources :

Example 1 with InfinispanAuthenticationSessionProvider

use of org.keycloak.models.sessions.infinispan.InfinispanAuthenticationSessionProvider in project keycloak by keycloak.

the class AbstractAuthSessionClusterListener method eventReceived.

@Override
public void eventReceived(ClusterEvent event) {
    KeycloakModelUtils.runJobInTransaction(sessionFactory, (KeycloakSession session) -> {
        InfinispanAuthenticationSessionProvider provider = (InfinispanAuthenticationSessionProvider) session.getProvider(AuthenticationSessionProvider.class, InfinispanAuthenticationSessionProviderFactory.PROVIDER_ID);
        SE sessionEvent = (SE) event;
        if (!provider.getCache().getStatus().allowInvocations()) {
            log.debugf("Cache in state '%s' doesn't allow invocations", provider.getCache().getStatus());
            return;
        }
        log.debugf("Received authentication session event '%s'", sessionEvent.toString());
        eventReceived(session, provider, sessionEvent);
    });
}
Also used : KeycloakSession(org.keycloak.models.KeycloakSession) InfinispanAuthenticationSessionProvider(org.keycloak.models.sessions.infinispan.InfinispanAuthenticationSessionProvider) AuthenticationSessionProvider(org.keycloak.sessions.AuthenticationSessionProvider) InfinispanAuthenticationSessionProvider(org.keycloak.models.sessions.infinispan.InfinispanAuthenticationSessionProvider)

Aggregations

KeycloakSession (org.keycloak.models.KeycloakSession)1 InfinispanAuthenticationSessionProvider (org.keycloak.models.sessions.infinispan.InfinispanAuthenticationSessionProvider)1 AuthenticationSessionProvider (org.keycloak.sessions.AuthenticationSessionProvider)1