Class RootAuthenticationSessionAdapter
- java.lang.Object
- 
- org.keycloak.models.sessions.infinispan.RootAuthenticationSessionAdapter
 
- 
- All Implemented Interfaces:
- RootAuthenticationSessionModel
 
 public class RootAuthenticationSessionAdapter extends Object implements RootAuthenticationSessionModel - Author:
- Marek Posolda
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.sessions.RootAuthenticationSessionModelRootAuthenticationSessionModel.SearchableFields
 
- 
 - 
Constructor SummaryConstructors Constructor Description RootAuthenticationSessionAdapter(KeycloakSession session, InfinispanAuthenticationSessionProvider provider, org.infinispan.Cache<String,RootAuthenticationSessionEntity> cache, RealmModel realm, RootAuthenticationSessionEntity entity, int authSessionsLimt)
 - 
Method SummaryAll Methods Instance Methods Concrete 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.
 
- 
- 
- 
Constructor Detail- 
RootAuthenticationSessionAdapterpublic RootAuthenticationSessionAdapter(KeycloakSession session, InfinispanAuthenticationSessionProvider provider, org.infinispan.Cache<String,RootAuthenticationSessionEntity> cache, RealmModel realm, RootAuthenticationSessionEntity entity, int authSessionsLimt) 
 
- 
 - 
Method Detail- 
getIdpublic String getId() Description copied from interface:RootAuthenticationSessionModelReturns id of the root authentication session.- Specified by:
- getIdin interface- RootAuthenticationSessionModel
- Returns:
- String
 
 - 
getRealmpublic RealmModel getRealm() Description copied from interface:RootAuthenticationSessionModelReturns realm associated to the root authentication session.- Specified by:
- getRealmin interface- RootAuthenticationSessionModel
- Returns:
- RealmModel
 
 - 
getTimestamppublic int getTimestamp() Description copied from interface:RootAuthenticationSessionModelReturns timestamp when the root authentication session was created or updated.- Specified by:
- getTimestampin interface- RootAuthenticationSessionModel
- Returns:
- int
 
 - 
setTimestamppublic void setTimestamp(int timestamp) Description copied from interface:RootAuthenticationSessionModelSets a timestamp when the root authentication session was created or updated. It also updates the expiration time for the root authentication session entity.- Specified by:
- setTimestampin interface- RootAuthenticationSessionModel
- Parameters:
- timestamp-- int
 
 - 
getAuthenticationSessionspublic Map<String,AuthenticationSessionModel> getAuthenticationSessions() Description copied from interface:RootAuthenticationSessionModelReturns authentication sessions for the root authentication session. Key is tabId, Value is AuthenticationSessionModel.- Specified by:
- getAuthenticationSessionsin interface- RootAuthenticationSessionModel
- Returns:
- Map<String, AuthenticationSessionModel>authentication sessions or empty map if no authentication sessions are present. Never return null.
 
 - 
getAuthenticationSessionpublic AuthenticationSessionModel getAuthenticationSession(ClientModel client, String tabId) Description copied from interface:RootAuthenticationSessionModelReturns an authentication session for the particular client and tab or null if it doesn't yet exists.- Specified by:
- getAuthenticationSessionin interface- RootAuthenticationSessionModel
- 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.
 
 - 
createAuthenticationSessionpublic AuthenticationSessionModel createAuthenticationSession(ClientModel client) Description copied from interface:RootAuthenticationSessionModelCreate a new authentication session and returns it.- Specified by:
- createAuthenticationSessionin interface- RootAuthenticationSessionModel
- Parameters:
- client-- ClientModelCan't be- null.
- Returns:
- AuthenticationSessionModelnon-null fresh authentication session. Never returns- null.
 
 - 
removeAuthenticationSessionByTabIdpublic void removeAuthenticationSessionByTabId(String tabId) Description copied from interface:RootAuthenticationSessionModelRemoves 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.- Specified by:
- removeAuthenticationSessionByTabIdin interface- RootAuthenticationSessionModel
- Parameters:
- tabId-- StringCan't be- null.
 
 - 
restartSessionpublic void restartSession(RealmModel realm) Description copied from interface:RootAuthenticationSessionModelWill completely restart whole state of authentication session. It will just keep same ID. It will setup it with provided realm.- Specified by:
- restartSessionin interface- RootAuthenticationSessionModel
- Parameters:
- realm-- RealmModelAssociated realm to the root authentication session.
 
 
- 
 
-