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
  • Constructor Details

  • Method Details

    • 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 respective AuthenticatedClientSessionModel 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 in removedClientUUIDS parameter.
    • getNote

      public String getNote(String name)
    • setNote

      public void setNote(String name, String value)
    • removeNote

      public void removeNote(String name)
    • getNotes

      public Map<String,String> getNotes()
    • 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)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object