public class InfinispanAuthenticationSessionProvider extends Object implements AuthenticationSessionProvider
| Modifier and Type | Field and Description |
|---|---|
protected SessionEventsSenderTransaction |
clusterEventsSenderTx |
protected InfinispanKeycloakTransaction |
tx |
| Constructor and Description |
|---|
InfinispanAuthenticationSessionProvider(KeycloakSession session,
InfinispanKeyGenerator keyGenerator,
org.infinispan.Cache<String,RootAuthenticationSessionEntity> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RootAuthenticationSessionModel |
createRootAuthenticationSession(RealmModel realm)
Creates and registers a new authentication session with random ID.
|
RootAuthenticationSessionModel |
createRootAuthenticationSession(RealmModel realm,
String id)
Creates a new root authentication session specified by the provided realm and id.
|
protected String |
generateTabId() |
org.infinispan.Cache<String,RootAuthenticationSessionEntity> |
getCache() |
RootAuthenticationSessionModel |
getRootAuthenticationSession(RealmModel realm,
String authenticationSessionId)
Returns the root authentication session specified by the provided realm and id.
|
void |
onClientRemoved(RealmModel realm,
ClientModel client)
Removes all associated root authentication sessions to the given realm and client which was removed.
|
protected void |
onClientRemovedEvent(String realmId,
String clientUuid) |
void |
onRealmRemoved(RealmModel realm)
Removes all associated root authentication sessions to the given realm which was removed.
|
protected void |
onRealmRemovedEvent(String realmId) |
void |
removeExpired(RealmModel realm)
Removes all expired root authentication sessions for the given realm.
|
void |
removeRootAuthenticationSession(RealmModel realm,
RootAuthenticationSessionModel authenticationSession)
Removes provided root authentication session.
|
void |
updateNonlocalSessionAuthNotes(AuthenticationSessionCompoundId compoundId,
Map<String,String> authNotesFragment)
Requests update of authNotes of a root authentication session that is not owned
by this instance but might exist somewhere in the cluster.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateRootAuthenticationSessionprotected final InfinispanKeycloakTransaction tx
protected final SessionEventsSenderTransaction clusterEventsSenderTx
public InfinispanAuthenticationSessionProvider(KeycloakSession session, InfinispanKeyGenerator keyGenerator, org.infinispan.Cache<String,RootAuthenticationSessionEntity> cache)
public RootAuthenticationSessionModel createRootAuthenticationSession(RealmModel realm)
AuthenticationSessionProvidercreateRootAuthenticationSession in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.RootAuthenticationSessionModel. Never returns null.public RootAuthenticationSessionModel createRootAuthenticationSession(RealmModel realm, String id)
AuthenticationSessionProvidercreateRootAuthenticationSession in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.id - String Id of newly created root authentication session. If null a random id will be generated.RootAuthenticationSessionModel. Never returns null.public void removeExpired(RealmModel realm)
AuthenticationSessionProviderremoveExpired in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.public void onRealmRemoved(RealmModel realm)
AuthenticationSessionProvideronRealmRemoved in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.protected void onRealmRemovedEvent(String realmId)
public void onClientRemoved(RealmModel realm, ClientModel client)
AuthenticationSessionProvideronClientRemoved in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.client - ClientModel Can't be null.public void updateNonlocalSessionAuthNotes(AuthenticationSessionCompoundId compoundId, Map<String,String> authNotesFragment)
AuthenticationSessionProviderupdateNonlocalSessionAuthNotes in interface AuthenticationSessionProvidercompoundId - AuthenticationSessionCompoundId The method has no effect if null.authNotesFragment - Map<String, String> Map with authNote values.
Auth note is removed if the corresponding value in the map is null. Map itself can't be null.public RootAuthenticationSessionModel getRootAuthenticationSession(RealmModel realm, String authenticationSessionId)
AuthenticationSessionProvidergetRootAuthenticationSession in interface AuthenticationSessionProviderrealm - RealmModel Can't be null.authenticationSessionId - RootAuthenticationSessionModel If null then null will be returned.RootAuthenticationSessionModel or null if no root authentication session is found.public void removeRootAuthenticationSession(RealmModel realm, RootAuthenticationSessionModel authenticationSession)
AuthenticationSessionProviderremoveRootAuthenticationSession in interface AuthenticationSessionProviderrealm - RealmModel Associated realm to the given root authentication session.authenticationSession - RootAuthenticationSessionModel Can't be null.public org.infinispan.Cache<String,RootAuthenticationSessionEntity> getCache()
protected String generateTabId()
Copyright © 2021 JBoss by Red Hat. All rights reserved.