Package org.keycloak.models.session
Class PersistentUserSessionAdapter
java.lang.Object
org.keycloak.models.session.PersistentUserSessionAdapter
- All Implemented Interfaces:
OfflineUserSessionModel,UserSessionModel
- Author:
- Marek Posolda
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from interface org.keycloak.models.UserSessionModel
UserSessionModel.SessionPersistenceState, UserSessionModel.State -
Field Summary
Fields inherited from interface org.keycloak.models.UserSessionModel
CORRESPONDING_SESSION_ID -
Constructor Summary
ConstructorsConstructorDescriptionPersistentUserSessionAdapter(KeycloakSession session, PersistentUserSessionModel model, RealmModel realm, String userId, Map<String, AuthenticatedClientSessionModel> clientSessions) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()intgetNotes()getRealm()intgetState()getUser()inthashCode()booleanbooleanvoidremoveAuthenticatedClientSessions(Collection<String> removedClientUUIDS) voidremoveNote(String name) voidrestartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId) voidsetAuthMethod(String authMethod) voidsetBrokerSessionId(String brokerSessionId) voidsetBrokerUserId(String brokerUserId) voidsetIpAddress(String ipAddress) voidsetLastSessionRefresh(int seconds) voidsetLoginUsername(String loginUsername) voidvoidsetRealm(RealmModel realm) voidsetRememberMe(boolean rememberMe) voidsetStarted(int started) voidsetState(UserSessionModel.State state) voidtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.models.UserSessionModel
getAuthenticatedClientSessionByClient, getPersistenceState
-
Constructor Details
-
PersistentUserSessionAdapter
-
PersistentUserSessionAdapter
public PersistentUserSessionAdapter(KeycloakSession session, PersistentUserSessionModel model, RealmModel realm, String userId, Map<String, AuthenticatedClientSessionModel> clientSessions)
-
-
Method Details
-
getUpdatedModel
-
getId
- Specified by:
getIdin interfaceUserSessionModel
-
getBrokerSessionId
- Specified by:
getBrokerSessionIdin interfaceUserSessionModel
-
getBrokerUserId
- Specified by:
getBrokerUserIdin interfaceUserSessionModel
-
getUser
- Specified by:
getUserin interfaceUserSessionModel
-
getUserId
- Specified by:
getUserIdin interfaceOfflineUserSessionModel
-
getRealm
- Specified by:
getRealmin interfaceUserSessionModel
-
getLoginUsername
- Specified by:
getLoginUsernamein interfaceUserSessionModel
-
getIpAddress
- Specified by:
getIpAddressin interfaceUserSessionModel
-
getAuthMethod
- Specified by:
getAuthMethodin interfaceUserSessionModel
-
isRememberMe
public boolean isRememberMe()- Specified by:
isRememberMein interfaceUserSessionModel
-
getStarted
public int getStarted()- Specified by:
getStartedin interfaceUserSessionModel
-
getLastSessionRefresh
public int getLastSessionRefresh()- Specified by:
getLastSessionRefreshin interfaceUserSessionModel
-
setLastSessionRefresh
public void setLastSessionRefresh(int seconds) - Specified by:
setLastSessionRefreshin interfaceUserSessionModel
-
isOffline
public boolean isOffline()- Specified by:
isOfflinein interfaceUserSessionModel
-
getAuthenticatedClientSessions
- Specified by:
getAuthenticatedClientSessionsin interfaceUserSessionModel
-
removeAuthenticatedClientSessions
- Specified by:
removeAuthenticatedClientSessionsin interfaceUserSessionModel
-
getNote
- Specified by:
getNotein interfaceUserSessionModel
-
setNote
- Specified by:
setNotein interfaceUserSessionModel
-
removeNote
- Specified by:
removeNotein interfaceUserSessionModel
-
getNotes
- Specified by:
getNotesin interfaceUserSessionModel
-
getState
- Specified by:
getStatein interfaceUserSessionModel
-
setState
- Specified by:
setStatein interfaceUserSessionModel
-
restartSession
public void restartSession(RealmModel realm, UserModel user, String loginUsername, String ipAddress, String authMethod, boolean rememberMe, String brokerSessionId, String brokerUserId) - Specified by:
restartSessionin interfaceUserSessionModel
-
setLoginUsername
- Specified by:
setLoginUsernamein interfaceOfflineUserSessionModel
-
equals
-
hashCode
public int hashCode() -
toString
-
setRealm
-
setUser
-
setIpAddress
-
setAuthMethod
-
setRememberMe
public void setRememberMe(boolean rememberMe) -
setStarted
public void setStarted(int started) -
setBrokerSessionId
-
setBrokerUserId
-