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, session
Fields inherited from interface org.keycloak.models.UserSessionModel
CORRESPONDING_SESSION_ID
-
Constructor Summary
ConstructorDescriptionMapUserSessionAdapter
(KeycloakSession session, RealmModel realm, UserModel userModel, MapUserSessionEntity entity) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
getAuthenticatedClientSessionByClient
(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 respectiveAuthenticatedClientSessionModel
object.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()
int
getNotes()
getRealm()
int
getState()
getUser()
int
hashCode()
boolean
boolean
boolean
matchingOfflineFlag
(MapAuthenticatedClientSessionEntity clientSession) void
removeAuthenticatedClientSessions
(Collection<String> removedClientUKS) Removes authenticated client sessions for all clients whose UUID is present inremovedClientUUIDS
parameter.void
removeNote
(String name) void
restartSession
(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId) void
setLastSessionRefresh
(int seconds) void
void
setState
(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:UserSessionModel
If 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:UserSessionModel
Returns map where key is ID of the client (its UUID) and value is ID respectiveAuthenticatedClientSessionModel
object.- Returns:
-
filterAndRemoveExpiredClientSessions
public boolean filterAndRemoveExpiredClientSessions(MapAuthenticatedClientSessionEntity clientSession) -
filterAndRemoveClientSessionWithoutClient
public boolean filterAndRemoveClientSessionWithoutClient(MapAuthenticatedClientSessionEntity clientSession) -
matchingOfflineFlag
-
getAuthenticatedClientSessionByClient
Description copied from interface:UserSessionModel
Returns a client session for the given client UUID.- Returns:
-
removeAuthenticatedClientSessions
Description copied from interface:UserSessionModel
Removes authenticated client sessions for all clients whose UUID is present inremovedClientUUIDS
parameter. -
getNote
-
setNote
-
removeNote
-
getNotes
-
getState
-
setState
-
restartSession
-
toString
-
equals
-
hashCode
public int hashCode()
-