Class MapUserSessionAdapter
- java.lang.Object
-
- org.keycloak.models.map.userSession.AbstractUserSessionModel
-
- org.keycloak.models.map.userSession.MapUserSessionAdapter
-
- All Implemented Interfaces:
UserSessionModel
public class MapUserSessionAdapter extends AbstractUserSessionModel
- 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
Constructors Constructor Description MapUserSessionAdapter(KeycloakSession session, RealmModel realm, MapUserSessionEntity entity)
-
Method Summary
-
-
-
Constructor Detail
-
MapUserSessionAdapter
public MapUserSessionAdapter(KeycloakSession session, RealmModel realm, MapUserSessionEntity entity)
-
-
Method Detail
-
getId
public String getId()
-
getRealm
public RealmModel getRealm()
-
getBrokerSessionId
public String 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
public String getBrokerUserId()
-
getUser
public UserModel getUser()
-
getLoginUsername
public String getLoginUsername()
-
getIpAddress
public String getIpAddress()
-
getAuthMethod
public String getAuthMethod()
-
isRememberMe
public boolean isRememberMe()
-
getStarted
public int getStarted()
-
getLastSessionRefresh
public int getLastSessionRefresh()
-
setLastSessionRefresh
public void setLastSessionRefresh(int seconds)
-
isOffline
public boolean isOffline()
-
getAuthenticatedClientSessions
public Map<String,AuthenticatedClientSessionModel> 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
public boolean matchingOfflineFlag(MapAuthenticatedClientSessionEntity clientSession)
-
getAuthenticatedClientSessionByClient
public AuthenticatedClientSessionModel getAuthenticatedClientSessionByClient(String clientUUID)
Description copied from interface:UserSessionModel
Returns a client session for the given client UUID.- Returns:
-
removeAuthenticatedClientSessions
public void removeAuthenticatedClientSessions(Collection<String> removedClientUKS)
Description copied from interface:UserSessionModel
Removes authenticated client sessions for all clients whose UUID is present inremovedClientUUIDS
parameter.
-
removeNote
public void removeNote(String name)
-
getState
public UserSessionModel.State getState()
-
setState
public void setState(UserSessionModel.State state)
-
restartSession
public void restartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId)
-
-