public class UserSessionAdapter extends Object implements UserSessionModel
UserSessionModel.SearchableFields, UserSessionModel.SessionPersistenceState, UserSessionModel.StateCORRESPONDING_SESSION_ID| Constructor and Description |
|---|
UserSessionAdapter(KeycloakSession session,
InfinispanUserSessionProvider provider,
InfinispanChangelogBasedTransaction<String,UserSessionEntity> userSessionUpdateTx,
InfinispanChangelogBasedTransaction<UUID,AuthenticatedClientSessionEntity> clientSessionUpdateTx,
RealmModel realm,
UserSessionEntity entity,
boolean offline) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
AuthenticatedClientSessionModel |
getAuthenticatedClientSessionByClient(String clientUUID)
Returns a client session for the given client UUID.
|
Map<String,AuthenticatedClientSessionModel> |
getAuthenticatedClientSessions()
Returns map where key is ID of the client (its UUID) and value is ID respective
AuthenticatedClientSessionModel object. |
String |
getAuthMethod() |
String |
getBrokerSessionId()
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
|
String |
getBrokerUserId() |
String |
getId() |
String |
getIpAddress() |
int |
getLastSessionRefresh() |
String |
getLoginUsername() |
String |
getNote(String name) |
Map<String,String> |
getNotes() |
UserSessionModel.SessionPersistenceState |
getPersistenceState() |
RealmModel |
getRealm() |
int |
getStarted() |
UserSessionModel.State |
getState() |
UserModel |
getUser() |
int |
hashCode() |
boolean |
isOffline() |
boolean |
isRememberMe() |
void |
removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS)
Removes authenticated client sessions for all clients whose UUID is present in
removedClientUUIDS 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 lastSessionRefresh) |
void |
setNote(String name,
String value) |
void |
setPersistenceState(UserSessionModel.SessionPersistenceState persistenceState) |
void |
setState(UserSessionModel.State state) |
public UserSessionAdapter(KeycloakSession session, InfinispanUserSessionProvider provider, InfinispanChangelogBasedTransaction<String,UserSessionEntity> userSessionUpdateTx, InfinispanChangelogBasedTransaction<UUID,AuthenticatedClientSessionEntity> clientSessionUpdateTx, RealmModel realm, UserSessionEntity entity, boolean offline)
public Map<String,AuthenticatedClientSessionModel> getAuthenticatedClientSessions()
UserSessionModelAuthenticatedClientSessionModel object.getAuthenticatedClientSessions in interface UserSessionModelpublic AuthenticatedClientSessionModel getAuthenticatedClientSessionByClient(String clientUUID)
UserSessionModelgetAuthenticatedClientSessionByClient in interface UserSessionModelpublic void removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS)
UserSessionModelremovedClientUUIDS parameter.removeAuthenticatedClientSessions in interface UserSessionModelpublic String getId()
getId in interface UserSessionModelpublic RealmModel getRealm()
getRealm in interface UserSessionModelpublic String getBrokerSessionId()
UserSessionModelgetBrokerSessionId in interface UserSessionModelpublic String getBrokerUserId()
getBrokerUserId in interface UserSessionModelpublic UserModel getUser()
getUser in interface UserSessionModelpublic String getLoginUsername()
getLoginUsername in interface UserSessionModelpublic String getIpAddress()
getIpAddress in interface UserSessionModelpublic String getAuthMethod()
getAuthMethod in interface UserSessionModelpublic boolean isRememberMe()
isRememberMe in interface UserSessionModelpublic int getStarted()
getStarted in interface UserSessionModelpublic int getLastSessionRefresh()
getLastSessionRefresh in interface UserSessionModelpublic void setLastSessionRefresh(int lastSessionRefresh)
setLastSessionRefresh in interface UserSessionModelpublic boolean isOffline()
isOffline in interface UserSessionModelpublic String getNote(String name)
getNote in interface UserSessionModelpublic void setNote(String name, String value)
setNote in interface UserSessionModelpublic void removeNote(String name)
removeNote in interface UserSessionModelpublic Map<String,String> getNotes()
getNotes in interface UserSessionModelpublic UserSessionModel.State getState()
getState in interface UserSessionModelpublic void setState(UserSessionModel.State state)
setState in interface UserSessionModelpublic UserSessionModel.SessionPersistenceState getPersistenceState()
public void setPersistenceState(UserSessionModel.SessionPersistenceState persistenceState)
public void restartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId)
restartSession in interface UserSessionModelCopyright © 2021 JBoss by Red Hat. All rights reserved.