Package org.keycloak.sessions
Interface RootAuthenticationSessionModel
- 
- All Known Implementing Classes:
- AbstractRootAuthenticationSessionModel,- MapRootAuthenticationSessionAdapter,- RootAuthenticationSessionAdapter
 
 public interface RootAuthenticationSessionModelRepresents usually one browser session with potentially many browser tabs. Every browser tab is represented byAuthenticationSessionModelof different client.- Author:
- Marek Posolda
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classRootAuthenticationSessionModel.SearchableFields
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthenticationSessionModelcreateAuthenticationSession(ClientModel client)Create a new authentication session and returns it.AuthenticationSessionModelgetAuthenticationSession(ClientModel client, String tabId)Returns an authentication session for the particular client and tab or null if it doesn't yet exists.Map<String,AuthenticationSessionModel>getAuthenticationSessions()Returns authentication sessions for the root authentication session.StringgetId()Returns id of the root authentication session.RealmModelgetRealm()Returns realm associated to the root authentication session.intgetTimestamp()Returns timestamp when the root authentication session was created or updated.voidremoveAuthenticationSessionByTabId(String tabId)Removes the authentication session specified by tab id from the root authentication session.voidrestartSession(RealmModel realm)Will completely restart whole state of authentication session.voidsetTimestamp(int timestamp)Sets a timestamp when the root authentication session was created or updated.
 
- 
- 
- 
Method Detail- 
getIdString getId() Returns id of the root authentication session.- Returns:
- String
 
 - 
getRealmRealmModel getRealm() Returns realm associated to the root authentication session.- Returns:
- RealmModel
 
 - 
getTimestampint getTimestamp() Returns timestamp when the root authentication session was created or updated.- Returns:
- int
 
 - 
setTimestampvoid setTimestamp(int timestamp) Sets a timestamp when the root authentication session was created or updated. It also updates the expiration time for the root authentication session entity.- Parameters:
- timestamp-- int
 
 - 
getAuthenticationSessionsMap<String,AuthenticationSessionModel> getAuthenticationSessions() Returns authentication sessions for the root authentication session. Key is tabId, Value is AuthenticationSessionModel.- Returns:
- Map<String, AuthenticationSessionModel>authentication sessions or empty map if no authentication sessions are present. Never return null.
 
 - 
getAuthenticationSessionAuthenticationSessionModel getAuthenticationSession(ClientModel client, String tabId) Returns an authentication session for the particular client and tab or null if it doesn't yet exists.- Parameters:
- client-- ClientModelIf- nullis provided the method will return- null.
- tabId-- StringIf- nullis provided the method will return- null.
- Returns:
- AuthenticationSessionModelor- nullin no authentication session is found.
 
 - 
createAuthenticationSessionAuthenticationSessionModel createAuthenticationSession(ClientModel client) Create a new authentication session and returns it.- Parameters:
- client-- ClientModelCan't be- null.
- Returns:
- AuthenticationSessionModelnon-null fresh authentication session. Never returns- null.
 
 - 
removeAuthenticationSessionByTabIdvoid removeAuthenticationSessionByTabId(String tabId) Removes the authentication session specified by tab id from the root authentication session. If there's no child authentication session left in the root authentication session, it's removed as well.- Parameters:
- tabId-- StringCan't be- null.
 
 - 
restartSessionvoid restartSession(RealmModel realm) Will completely restart whole state of authentication session. It will just keep same ID. It will setup it with provided realm.- Parameters:
- realm-- RealmModelAssociated realm to the root authentication session.
 
 
- 
 
-