Class AuthenticatedClientSessionUpdater
java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
 
org.keycloak.models.sessions.infinispan.changes.remote.updater.client.AuthenticatedClientSessionUpdater
- All Implemented Interfaces:
 BiFunction<ClientSessionKey,,RemoteAuthenticatedClientSessionEntity, RemoteAuthenticatedClientSessionEntity> AuthenticatedClientSessionModel,Updater<ClientSessionKey,,RemoteAuthenticatedClientSessionEntity> CommonClientSessionModel
public class AuthenticatedClientSessionUpdater
extends BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
implements AuthenticatedClientSessionModel 
An 
Updater implementation that keeps track of AuthenticatedClientSessionModel changes.- 
Nested Class Summary
Nested classes/interfaces inherited from class org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater
BaseUpdater.UpdaterStateNested classes/interfaces inherited from interface org.keycloak.sessions.CommonClientSessionModel
CommonClientSessionModel.Action, CommonClientSessionModel.ExecutionStatus - 
Field Summary
Fields inherited from interface org.keycloak.models.AuthenticatedClientSessionModel
REFRESH_TOKEN_LAST_REFRESH_PREFIX, REFRESH_TOKEN_PREFIX, REFRESH_TOKEN_USE_PREFIX, STARTED_AT_NOTE, USER_SESSION_REMEMBER_ME_NOTE, USER_SESSION_STARTED_AT_NOTEFields inherited from interface org.keycloak.models.sessions.infinispan.changes.remote.updater.Updater
NO_VERSION - 
Method Summary
Modifier and TypeMethodDescriptionapply(ClientSessionKey uuid, RemoteAuthenticatedClientSessionEntity entity) Computes the expiration data for Infinispan cache.voidDetaches the client session from its user session.getId()getNotes()getRealm()intintintvoidinitialize(UserSessionModel userSession, ClientModel client, ClientSessionChangeLogTransaction clientTransaction) Initializes this class with references to other models classes.booleanbooleanprotected booleanbooleanstatic UpdaterFactory<ClientSessionKey,RemoteAuthenticatedClientSessionEntity, AuthenticatedClientSessionUpdater> static UpdaterFactory<ClientSessionKey,RemoteAuthenticatedClientSessionEntity, AuthenticatedClientSessionUpdater> voidremoveNote(String name) voidvoidvoidvoidsetProtocol(String method) voidsetRedirectUri(String uri) voidsetTimestamp(int timestamp) Set the timestamp for the client session.Methods inherited from class org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater
equals, getKey, getValue, getVersionRead, hashCode, isCreated, isDeleted, isReadOnly, markDeleted, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.models.AuthenticatedClientSessionModel
getCurrentRefreshToken, getCurrentRefreshTokenUseCount, getRefreshToken, getRefreshTokenLastRefresh, getRefreshTokenUseCount, setCurrentRefreshToken, setCurrentRefreshTokenUseCount, setRefreshToken, setRefreshTokenLastRefresh, setRefreshTokenUseCountMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface org.keycloak.models.sessions.infinispan.changes.remote.updater.Updater
hasVersion 
- 
Method Details
- 
onlineFactory
public static UpdaterFactory<ClientSessionKey,RemoteAuthenticatedClientSessionEntity, onlineFactory()AuthenticatedClientSessionUpdater> - Returns:
 - The 
UpdaterFactoryimplementation to create online session instances ofAuthenticatedClientSessionUpdater. 
 - 
offlineFactory
public static UpdaterFactory<ClientSessionKey,RemoteAuthenticatedClientSessionEntity, offlineFactory()AuthenticatedClientSessionUpdater> - Returns:
 - The 
UpdaterFactoryimplementation to create offline session instances ofAuthenticatedClientSessionUpdater. 
 - 
apply
public RemoteAuthenticatedClientSessionEntity apply(ClientSessionKey uuid, RemoteAuthenticatedClientSessionEntity entity) - Specified by:
 applyin interfaceBiFunction<ClientSessionKey,RemoteAuthenticatedClientSessionEntity, RemoteAuthenticatedClientSessionEntity> 
 - 
computeExpiration
Description copied from interface:UpdaterComputes the expiration data for Infinispan cache.- Specified by:
 computeExpirationin interfaceUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> - Returns:
 - The 
Expirationdata. 
 - 
getId
- Specified by:
 getIdin interfaceAuthenticatedClientSessionModel
 - 
getStarted
public int getStarted()- Specified by:
 getStartedin interfaceAuthenticatedClientSessionModel
 - 
getUserSessionStarted
public int getUserSessionStarted()- Specified by:
 getUserSessionStartedin interfaceAuthenticatedClientSessionModel
 - 
isUserSessionRememberMe
public boolean isUserSessionRememberMe()- Specified by:
 isUserSessionRememberMein interfaceAuthenticatedClientSessionModel
 - 
getTimestamp
public int getTimestamp()- Specified by:
 getTimestampin interfaceAuthenticatedClientSessionModel
 - 
setTimestamp
public void setTimestamp(int timestamp) Description copied from interface:AuthenticatedClientSessionModelSet the timestamp for the client session. If the timestamp is smaller or equal than the current timestamp, the operation is ignored.- Specified by:
 setTimestampin interfaceAuthenticatedClientSessionModel
 - 
detachFromUserSession
public void detachFromUserSession()Description copied from interface:AuthenticatedClientSessionModelDetaches the client session from its user session.- Specified by:
 detachFromUserSessionin interfaceAuthenticatedClientSessionModel
 - 
getUserSession
- Specified by:
 getUserSessionin interfaceAuthenticatedClientSessionModel
 - 
getNote
- Specified by:
 getNotein interfaceAuthenticatedClientSessionModel
 - 
setNote
- Specified by:
 setNotein interfaceAuthenticatedClientSessionModel
 - 
removeNote
- Specified by:
 removeNotein interfaceAuthenticatedClientSessionModel
 - 
getNotes
- Specified by:
 getNotesin interfaceAuthenticatedClientSessionModel
 - 
getRedirectUri
- Specified by:
 getRedirectUriin interfaceCommonClientSessionModel
 - 
setRedirectUri
- Specified by:
 setRedirectUriin interfaceCommonClientSessionModel
 - 
getRealm
- Specified by:
 getRealmin interfaceCommonClientSessionModel
 - 
getClient
- Specified by:
 getClientin interfaceCommonClientSessionModel
 - 
getAction
- Specified by:
 getActionin interfaceCommonClientSessionModel
 - 
setAction
- Specified by:
 setActionin interfaceCommonClientSessionModel
 - 
getProtocol
- Specified by:
 getProtocolin interfaceCommonClientSessionModel
 - 
setProtocol
- Specified by:
 setProtocolin interfaceCommonClientSessionModel
 - 
restartClientSession
public void restartClientSession()- Specified by:
 restartClientSessionin interfaceAuthenticatedClientSessionModel
 - 
isTransient
public boolean isTransient()- Specified by:
 isTransientin interfaceUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> - Overrides:
 isTransientin classBaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> - Returns:
 trueif the entity is transient and shouldn't be stored in the Infinispan cache.
 - 
isUnchanged
protected boolean isUnchanged()- Specified by:
 isUnchangedin classBaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> - Returns:
 trueif the entity was changed after being created/read.
 - 
initialize
public void initialize(UserSessionModel userSession, ClientModel client, ClientSessionChangeLogTransaction clientTransaction) Initializes this class with references to other models classes.- Parameters:
 userSession- TheUserSessionModelassociated with this client session.client- TheClientModelassociated with this client session.clientTransaction- TheClientSessionChangeLogTransactionto perform the changes in this class into theRemoteCache.
 - 
isInitialized
public boolean isInitialized()- Returns:
 trueif it is already initialized.
 
 -