Class MapUserSessionAdapter
java.lang.Object
org.keycloak.models.map.userSession.AbstractUserSessionModel
org.keycloak.models.map.userSession.MapUserSessionAdapter
- All Implemented Interfaces:
UserSessionModel
- Author:
- Martin Kanis
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserSessionModel
UserSessionModel.SearchableFields, UserSessionModel.SessionPersistenceState, UserSessionModel.State -
Field Summary
Fields inherited from class org.keycloak.models.map.userSession.AbstractUserSessionModel
entity, realm, sessionFields inherited from interface org.keycloak.models.UserSessionModel
CORRESPONDING_SESSION_ID -
Constructor Summary
ConstructorsConstructorDescriptionMapUserSessionAdapter(KeycloakSession session, RealmModel realm, UserModel userModel, MapUserSessionEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleangetAuthenticatedClientSessionByClient(String clientUUID) Returns a client session for the given client UUID.Returns map where key is ID of the client (its UUID) and value is ID respectiveAuthenticatedClientSessionModelobject.If created via a broker external login, this is an identifier that can be used to match external broker backchannel logout requests to a UserSessiongetId()intgetNotes()getRealm()intgetState()getUser()inthashCode()booleanbooleanbooleanmatchingOfflineFlag(MapAuthenticatedClientSessionEntity clientSession) voidremoveAuthenticatedClientSessions(Collection<String> removedClientUKS) Removes authenticated client sessions for all clients whose UUID is present inremovedClientUUIDSparameter.voidremoveNote(String name) voidrestartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId) voidsetLastSessionRefresh(int seconds) voidvoidsetState(UserSessionModel.State state) toString()
-
Constructor Details
-
MapUserSessionAdapter
public MapUserSessionAdapter(KeycloakSession session, RealmModel realm, UserModel userModel, MapUserSessionEntity entity)
-
-
Method Details
-
getId
-
getRealm
-
getBrokerSessionId
Description copied from interface:UserSessionModelIf created via a broker external login, this is an identifier that can be used to match external broker backchannel logout requests to a UserSession- Returns:
-
getBrokerUserId
-
getUser
-
getLoginUsername
-
getIpAddress
-
getAuthMethod
-
isRememberMe
public boolean isRememberMe() -
getStarted
public int getStarted() -
getLastSessionRefresh
public int getLastSessionRefresh() -
setLastSessionRefresh
public void setLastSessionRefresh(int seconds) -
isOffline
public boolean isOffline() -
getAuthenticatedClientSessions
Description copied from interface:UserSessionModelReturns map where key is ID of the client (its UUID) and value is ID respectiveAuthenticatedClientSessionModelobject.- Returns:
-
filterAndRemoveExpiredClientSessions
public boolean filterAndRemoveExpiredClientSessions(MapAuthenticatedClientSessionEntity clientSession) -
filterAndRemoveClientSessionWithoutClient
public boolean filterAndRemoveClientSessionWithoutClient(MapAuthenticatedClientSessionEntity clientSession) -
matchingOfflineFlag
-
getAuthenticatedClientSessionByClient
Description copied from interface:UserSessionModelReturns a client session for the given client UUID.- Returns:
-
removeAuthenticatedClientSessions
Description copied from interface:UserSessionModelRemoves authenticated client sessions for all clients whose UUID is present inremovedClientUUIDSparameter. -
getNote
-
setNote
-
removeNote
-
getNotes
-
getState
-
setState
-
restartSession
-
toString
-
equals
-
hashCode
public int hashCode()
-