public class PersistentUserSessionAdapter extends Object implements OfflineUserSessionModel
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PersistentUserSessionAdapter.PersistentUserSessionData |
UserSessionModel.SessionPersistenceState, UserSessionModel.State| Constructor and Description |
|---|
PersistentUserSessionAdapter(KeycloakSession session,
PersistentUserSessionModel model,
RealmModel realm,
String userId,
Map<String,AuthenticatedClientSessionModel> clientSessions) |
PersistentUserSessionAdapter(UserSessionModel other) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
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() |
RealmModel |
getRealm() |
int |
getStarted() |
UserSessionModel.State |
getState() |
PersistentUserSessionModel |
getUpdatedModel() |
UserModel |
getUser() |
String |
getUserId() |
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 seconds) |
void |
setNote(String name,
String value) |
void |
setState(UserSessionModel.State state) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAuthenticatedClientSessionByClientpublic PersistentUserSessionAdapter(UserSessionModel other)
public PersistentUserSessionAdapter(KeycloakSession session, PersistentUserSessionModel model, RealmModel realm, String userId, Map<String,AuthenticatedClientSessionModel> clientSessions)
public PersistentUserSessionModel getUpdatedModel()
public String getId()
getId in interface UserSessionModelpublic String getBrokerSessionId()
UserSessionModelgetBrokerSessionId in interface UserSessionModelpublic String getBrokerUserId()
getBrokerUserId in interface UserSessionModelpublic UserModel getUser()
getUser in interface UserSessionModelpublic String getUserId()
getUserId in interface OfflineUserSessionModelpublic RealmModel getRealm()
getRealm 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 seconds)
setLastSessionRefresh in interface UserSessionModelpublic boolean isOffline()
isOffline in interface UserSessionModelpublic Map<String,AuthenticatedClientSessionModel> getAuthenticatedClientSessions()
UserSessionModelAuthenticatedClientSessionModel object.getAuthenticatedClientSessions in interface UserSessionModelpublic void removeAuthenticatedClientSessions(Collection<String> removedClientUUIDS)
UserSessionModelremovedClientUUIDS parameter.removeAuthenticatedClientSessions 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 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.