public abstract class MapRootAuthenticationSessionAdapter<K> extends AbstractRootAuthenticationSessionModel<MapRootAuthenticationSessionEntity<K>>
RootAuthenticationSessionModel.SearchableFields
entity, realm, session
Constructor and Description |
---|
MapRootAuthenticationSessionAdapter(KeycloakSession session,
RealmModel realm,
MapRootAuthenticationSessionEntity<K> entity) |
Modifier and Type | Method and Description |
---|---|
AuthenticationSessionModel |
createAuthenticationSession(ClientModel client)
Create a new authentication session and returns it.
|
AuthenticationSessionModel |
getAuthenticationSession(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.
|
RealmModel |
getRealm()
Returns realm associated to the root authentication session.
|
int |
getTimestamp()
Returns timestamp when the root authentication session was created or updated.
|
void |
removeAuthenticationSessionByTabId(String tabId)
Removes the authentication session specified by tab id from the root authentication session.
|
void |
restartSession(RealmModel realm)
Will completely restart whole state of authentication session.
|
void |
setTimestamp(int timestamp)
Sets a timestamp when the root authentication session was created or updated.
|
void |
setUpdated(boolean updated) |
equals, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getId
public MapRootAuthenticationSessionAdapter(KeycloakSession session, RealmModel realm, MapRootAuthenticationSessionEntity<K> entity)
public RealmModel getRealm()
RootAuthenticationSessionModel
RealmModel
public int getTimestamp()
RootAuthenticationSessionModel
int
public void setTimestamp(int timestamp)
RootAuthenticationSessionModel
timestamp
- int
public Map<String,AuthenticationSessionModel> getAuthenticationSessions()
RootAuthenticationSessionModel
Map<String, AuthenticationSessionModel>
authentication sessions or empty map if no
authentication sessions are present. Never return null.public AuthenticationSessionModel getAuthenticationSession(ClientModel client, String tabId)
RootAuthenticationSessionModel
client
- ClientModel
If null
is provided the method will return null
.tabId
- String
If null
is provided the method will return null
.AuthenticationSessionModel
or null
in no authentication session is found.public AuthenticationSessionModel createAuthenticationSession(ClientModel client)
RootAuthenticationSessionModel
client
- ClientModel
Can't be null
.AuthenticationSessionModel
non-null fresh authentication session. Never returns null
.public void removeAuthenticationSessionByTabId(String tabId)
RootAuthenticationSessionModel
tabId
- String
Can't be null
.public void restartSession(RealmModel realm)
RootAuthenticationSessionModel
realm
- RealmModel
Associated realm to the root authentication session.public void setUpdated(boolean updated)
Copyright © 2021 JBoss by Red Hat. All rights reserved.