public class DisabledUserSessionPersisterProvider extends Object implements UserSessionPersisterProviderFactory, UserSessionPersisterProvider
| Constructor and Description |
|---|
DisabledUserSessionPersisterProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This is called when the server shuts down.
|
UserSessionPersisterProvider |
create(KeycloakSession session) |
void |
createClientSession(AuthenticatedClientSessionModel clientSession,
boolean offline) |
void |
createUserSession(UserSessionModel userSession,
boolean offline) |
String |
getId() |
int |
getUserSessionsCount(boolean offline)
Retrieves the count of user sessions for all realms.
|
int |
getUserSessionsCount(RealmModel realm,
ClientModel clientModel,
boolean offline)
Retrieves the count of user client-sessions for the given client
|
Map<String,Long> |
getUserSessionsCountsByClients(RealmModel realm,
boolean offline)
Returns a
Map containing the number of user-sessions aggregated by client id for the given realm. |
void |
init(Config.Scope config)
Only called once when the factory is first created.
|
UserSessionModel |
loadUserSession(RealmModel realm,
String userSessionId,
boolean offline)
Loads the user session with the given userSessionId.
|
Stream<UserSessionModel> |
loadUserSessionsStream(Integer firstResult,
Integer maxResults,
boolean offline,
String lastUserSessionId)
Called during startup.
|
Stream<UserSessionModel> |
loadUserSessionsStream(RealmModel realm,
ClientModel client,
boolean offline,
Integer firstResult,
Integer maxResults)
Loads the user sessions for the given
ClientModel in the given RealmModel if present. |
Stream<UserSessionModel> |
loadUserSessionsStream(RealmModel realm,
UserModel user,
boolean offline,
Integer firstResult,
Integer maxResults)
Loads the user sessions for the given
UserModel in the given RealmModel if present. |
void |
onClientRemoved(RealmModel realm,
ClientModel client) |
void |
onRealmRemoved(RealmModel realm) |
void |
onUserRemoved(RealmModel realm,
UserModel user) |
void |
postInit(KeycloakSessionFactory factory)
Called after all provider factories have been initialized
|
void |
removeClientSession(String userSessionId,
String clientUUID,
boolean offline) |
void |
removeExpired(RealmModel realm) |
void |
removeUserSession(String userSessionId,
boolean offline) |
void |
updateLastSessionRefreshes(RealmModel realm,
int lastSessionRefresh,
Collection<String> userSessionIds,
boolean offline) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitorderloadUserSessionspublic static final String ID
public DisabledUserSessionPersisterProvider()
public UserSessionPersisterProvider create(KeycloakSession session)
create in interface ProviderFactory<UserSessionPersisterProvider>public void init(Config.Scope config)
ProviderFactoryinit in interface ProviderFactory<UserSessionPersisterProvider>public void postInit(KeycloakSessionFactory factory)
ProviderFactorypostInit in interface ProviderFactory<UserSessionPersisterProvider>public void close()
ProviderFactoryclose in interface Providerclose in interface ProviderFactory<UserSessionPersisterProvider>public String getId()
getId in interface ProviderFactory<UserSessionPersisterProvider>public void createUserSession(UserSessionModel userSession, boolean offline)
createUserSession in interface UserSessionPersisterProviderpublic void createClientSession(AuthenticatedClientSessionModel clientSession, boolean offline)
createClientSession in interface UserSessionPersisterProviderpublic void removeUserSession(String userSessionId, boolean offline)
removeUserSession in interface UserSessionPersisterProviderpublic void removeClientSession(String userSessionId, String clientUUID, boolean offline)
removeClientSession in interface UserSessionPersisterProviderpublic void onRealmRemoved(RealmModel realm)
onRealmRemoved in interface UserSessionPersisterProviderpublic void onClientRemoved(RealmModel realm, ClientModel client)
onClientRemoved in interface UserSessionPersisterProviderpublic void onUserRemoved(RealmModel realm, UserModel user)
onUserRemoved in interface UserSessionPersisterProviderpublic void updateLastSessionRefreshes(RealmModel realm, int lastSessionRefresh, Collection<String> userSessionIds, boolean offline)
updateLastSessionRefreshes in interface UserSessionPersisterProviderpublic void removeExpired(RealmModel realm)
removeExpired in interface UserSessionPersisterProviderpublic UserSessionModel loadUserSession(RealmModel realm, String userSessionId, boolean offline)
UserSessionPersisterProviderloadUserSession in interface UserSessionPersisterProviderpublic Stream<UserSessionModel> loadUserSessionsStream(RealmModel realm, ClientModel client, boolean offline, Integer firstResult, Integer maxResults)
UserSessionPersisterProviderClientModel in the given RealmModel if present.loadUserSessionsStream in interface UserSessionPersisterProviderpublic Stream<UserSessionModel> loadUserSessionsStream(RealmModel realm, UserModel user, boolean offline, Integer firstResult, Integer maxResults)
UserSessionPersisterProviderUserModel in the given RealmModel if present.loadUserSessionsStream in interface UserSessionPersisterProviderpublic Stream<UserSessionModel> loadUserSessionsStream(Integer firstResult, Integer maxResults, boolean offline, String lastUserSessionId)
UserSessionPersisterProviderloadUserSessionsStream in interface UserSessionPersisterProviderfirstResult - Integer Index of the first desired user session. Ignored if negative or null.maxResults - Integer Maximum number of returned user sessions. Ignored if negative or null.offline - boolean Flag to include offline sessions.lastUserSessionId - String Id of the user session. It will return only user sessions with id's lexicographically greater than this.
it will compare the id in dictionary order and takes only those created later.UserSessionModel. Never returns null.public int getUserSessionsCount(boolean offline)
UserSessionPersisterProvidergetUserSessionsCount in interface UserSessionPersisterProviderpublic int getUserSessionsCount(RealmModel realm, ClientModel clientModel, boolean offline)
UserSessionPersisterProvidergetUserSessionsCount in interface UserSessionPersisterProviderpublic Map<String,Long> getUserSessionsCountsByClients(RealmModel realm, boolean offline)
UserSessionPersisterProviderMap containing the number of user-sessions aggregated by client id for the given realm.getUserSessionsCountsByClients in interface UserSessionPersisterProviderMap with clientId as key and session count as valueCopyright © 2021 JBoss by Red Hat. All rights reserved.