Class RemoteInfinispanAuthenticationSessionProvider
java.lang.Object
org.keycloak.models.sessions.infinispan.remote.RemoteInfinispanAuthenticationSessionProvider
- All Implemented Interfaces:
Provider,AuthenticationSessionProvider
public class RemoteInfinispanAuthenticationSessionProvider
extends Object
implements AuthenticationSessionProvider
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteInfinispanAuthenticationSessionProvider(KeycloakSession session, int authSessionsLimit, AuthenticationSessionChangeLogTransaction transaction) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Creates and registers a new authentication session with random ID.createRootAuthenticationSession(RealmModel realm, String id) Creates a new root authentication session specified by the provided realm and id.getRootAuthenticationSession(RealmModel realm, String authenticationSessionId) Returns the root authentication session specified by the provided realm and id.voidonClientRemoved(RealmModel realm, ClientModel client) Removes all associated root authentication sessions to the given realm and client which was removed.voidonRealmRemoved(RealmModel realm) Removes all associated root authentication sessions to the given realm which was removed.voidRemove expired authentication sessions in all the realmsvoidremoveExpired(RealmModel realm) Removes all expired root authentication sessions for the given realm.voidremoveRootAuthenticationSession(RealmModel realm, RootAuthenticationSessionModel authenticationSession) Removes provided root authentication session.voidupdateNonlocalSessionAuthNotes(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.sessions.AuthenticationSessionProvider
migrate
-
Constructor Details
-
RemoteInfinispanAuthenticationSessionProvider
public RemoteInfinispanAuthenticationSessionProvider(KeycloakSession session, int authSessionsLimit, AuthenticationSessionChangeLogTransaction transaction)
-
-
Method Details
-
close
public void close() -
createRootAuthenticationSession
Description copied from interface:AuthenticationSessionProviderCreates and registers a new authentication session with random ID. Authentication session entity will be prefilled with current timestamp, the given realm and client.- Specified by:
createRootAuthenticationSessionin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.- Returns:
- Returns created
RootAuthenticationSessionModel. Never returnsnull.
-
createRootAuthenticationSession
Description copied from interface:AuthenticationSessionProviderCreates a new root authentication session specified by the provided realm and id.- Specified by:
createRootAuthenticationSessionin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.id-StringId of newly created root authentication session. Ifnulla random id will be generated.- Returns:
- Returns created
RootAuthenticationSessionModel. Never returnsnull.
-
getRootAuthenticationSession
public RootAuthenticationSessionModel getRootAuthenticationSession(RealmModel realm, String authenticationSessionId) Description copied from interface:AuthenticationSessionProviderReturns the root authentication session specified by the provided realm and id.- Specified by:
getRootAuthenticationSessionin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.authenticationSessionId-RootAuthenticationSessionModelIfnullthennullwill be returned.- Returns:
- Returns found
RootAuthenticationSessionModelornullif no root authentication session is found.
-
removeRootAuthenticationSession
public void removeRootAuthenticationSession(RealmModel realm, RootAuthenticationSessionModel authenticationSession) Description copied from interface:AuthenticationSessionProviderRemoves provided root authentication session.- Specified by:
removeRootAuthenticationSessionin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelAssociated realm to the given root authentication session.authenticationSession-RootAuthenticationSessionModelCan't benull.
-
removeAllExpired
public void removeAllExpired()Description copied from interface:AuthenticationSessionProviderRemove expired authentication sessions in all the realms- Specified by:
removeAllExpiredin interfaceAuthenticationSessionProvider
-
removeExpired
Description copied from interface:AuthenticationSessionProviderRemoves all expired root authentication sessions for the given realm.- Specified by:
removeExpiredin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.
-
onRealmRemoved
Description copied from interface:AuthenticationSessionProviderRemoves all associated root authentication sessions to the given realm which was removed.- Specified by:
onRealmRemovedin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.
-
onClientRemoved
Description copied from interface:AuthenticationSessionProviderRemoves all associated root authentication sessions to the given realm and client which was removed.- Specified by:
onClientRemovedin interfaceAuthenticationSessionProvider- Parameters:
realm-RealmModelCan't benull.client-ClientModelCan't benull.
-
updateNonlocalSessionAuthNotes
public void updateNonlocalSessionAuthNotes(AuthenticationSessionCompoundId compoundId, Map<String, String> authNotesFragment) Description copied from interface:AuthenticationSessionProviderRequests update of authNotes of a root authentication session that is not owned by this instance but might exist somewhere in the cluster.- Specified by:
updateNonlocalSessionAuthNotesin interfaceAuthenticationSessionProvider- Parameters:
compoundId-AuthenticationSessionCompoundIdThe method has no effect ifnull.authNotesFragment-Map<String, String>Map with authNote values. Auth note is removed if the corresponding value in the map isnull. Map itself can't benull.
-