use of org.keycloak.models.sessions.infinispan.entities.RootAuthenticationSessionEntity in project keycloak by keycloak.
the class InfinispanAuthenticationSessionProvider method createRootAuthenticationSession.
@Override
public RootAuthenticationSessionModel createRootAuthenticationSession(RealmModel realm, String id) {
RootAuthenticationSessionEntity entity = new RootAuthenticationSessionEntity();
entity.setId(id);
entity.setRealmId(realm.getId());
entity.setTimestamp(Time.currentTime());
int expirationSeconds = RealmInfoUtil.getDettachedClientSessionLifespan(realm);
tx.put(cache, id, entity, expirationSeconds, TimeUnit.SECONDS);
return wrap(realm, entity);
}
use of org.keycloak.models.sessions.infinispan.entities.RootAuthenticationSessionEntity in project keycloak by keycloak.
the class InfinispanAuthenticationSessionProviderFactory method updateAuthNotes.
private void updateAuthNotes(ClusterEvent clEvent) {
if (!(clEvent instanceof AuthenticationSessionAuthNoteUpdateEvent)) {
return;
}
AuthenticationSessionAuthNoteUpdateEvent event = (AuthenticationSessionAuthNoteUpdateEvent) clEvent;
RootAuthenticationSessionEntity authSession = this.authSessionsCache.get(event.getAuthSessionId());
updateAuthSession(authSession, event.getTabId(), event.getAuthNotesFragment());
}
Aggregations