public class UserSessionAdapter extends Object implements UserSessionModel
UserSessionModel.SearchableFields, UserSessionModel.SessionPersistenceState, UserSessionModel.State
CORRESPONDING_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()
UserSessionModel
AuthenticatedClientSessionModel
object.getAuthenticatedClientSessions
in interface UserSessionModel
public AuthenticatedClientSessionModel getAuthenticatedClientSessionByClient(String clientUUID)
UserSessionModel
getAuthenticatedClientSessionByClient
in interface UserSessionModel
public void removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS)
UserSessionModel
removedClientUUIDS
parameter.removeAuthenticatedClientSessions
in interface UserSessionModel
public String getId()
getId
in interface UserSessionModel
public RealmModel getRealm()
getRealm
in interface UserSessionModel
public String getBrokerSessionId()
UserSessionModel
getBrokerSessionId
in interface UserSessionModel
public String getBrokerUserId()
getBrokerUserId
in interface UserSessionModel
public UserModel getUser()
getUser
in interface UserSessionModel
public String getLoginUsername()
getLoginUsername
in interface UserSessionModel
public String getIpAddress()
getIpAddress
in interface UserSessionModel
public String getAuthMethod()
getAuthMethod
in interface UserSessionModel
public boolean isRememberMe()
isRememberMe
in interface UserSessionModel
public int getStarted()
getStarted
in interface UserSessionModel
public int getLastSessionRefresh()
getLastSessionRefresh
in interface UserSessionModel
public void setLastSessionRefresh(int lastSessionRefresh)
setLastSessionRefresh
in interface UserSessionModel
public boolean isOffline()
isOffline
in interface UserSessionModel
public String getNote(String name)
getNote
in interface UserSessionModel
public void setNote(String name, String value)
setNote
in interface UserSessionModel
public void removeNote(String name)
removeNote
in interface UserSessionModel
public Map<String,String> getNotes()
getNotes
in interface UserSessionModel
public UserSessionModel.State getState()
getState
in interface UserSessionModel
public void setState(UserSessionModel.State state)
setState
in interface UserSessionModel
public 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 UserSessionModel
Copyright © 2021 JBoss by Red Hat. All rights reserved.