Package org.keycloak.models.map.events
Class MapEventStoreProvider
java.lang.Object
org.keycloak.models.map.events.MapEventStoreProvider
- All Implemented Interfaces:
EventListenerProvider
,EventStoreProvider
,Provider
-
Constructor Summary
ConstructorDescriptionMapEventStoreProvider
(KeycloakSession session, MapStorage<MapAuthEventEntity, Event> loginEventsStore, MapStorage<MapAdminEventEntity, AdminEvent> adminEventsStore) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all auth events from this store provider.void
clear
(RealmModel realm) Removes all auth events for the realm from this store provider.void
clear
(RealmModel realm, long olderThan) Removes all auth events for the realm that are older thanolderThan
from this store provider.void
Removes all admin events from this store provider.void
clearAdmin
(RealmModel realm) Removes all auth events for the realm from this store provider.void
clearAdmin
(RealmModel realm, long olderThan) Removes all auth events for the realm that are older thanolderThan
from this store provider.void
Clears all expired events in all realmsvoid
close()
Returns an object representing admin event query of typeAdminEventQuery
.Returns an object representing auth event query of typeEventQuery
.void
onEvent
(AdminEvent event, boolean includeRepresentation) ADMIN EVENTSvoid
LOGIN EVENTS
-
Constructor Details
-
MapEventStoreProvider
public MapEventStoreProvider(KeycloakSession session, MapStorage<MapAuthEventEntity, Event> loginEventsStore, MapStorage<MapAdminEventEntity, AdminEvent> adminEventsStore)
-
-
Method Details
-
onEvent
LOGIN EVENTS- Specified by:
onEvent
in interfaceEventListenerProvider
- Parameters:
event
- to be triggered
-
createQuery
Description copied from interface:EventStoreProvider
Returns an object representing auth event query of typeEventQuery
. The object is used for collecting requested properties of auth events (e.g. realm, operation, resourceType time boundaries, etc.) and contains theEventQuery.getResultStream()
method that returns all objects from this store provider that have given properties.- Specified by:
createQuery
in interfaceEventStoreProvider
- Returns:
- a query object
-
clear
public void clear()Description copied from interface:EventStoreProvider
Removes all auth events from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
-
clear
Description copied from interface:EventStoreProvider
Removes all auth events for the realm from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
- Parameters:
realm
- the realm
-
clear
Description copied from interface:EventStoreProvider
Removes all auth events for the realm that are older thanolderThan
from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
- Parameters:
realm
- the realmolderThan
- point in time in milliseconds
-
clearExpiredEvents
public void clearExpiredEvents()Description copied from interface:EventStoreProvider
Clears all expired events in all realms- Specified by:
clearExpiredEvents
in interfaceEventStoreProvider
-
onEvent
ADMIN EVENTS- Specified by:
onEvent
in interfaceEventListenerProvider
- Parameters:
event
- to be triggeredincludeRepresentation
- when false, event listener should NOT include representation field in the resulting action
-
createAdminQuery
Description copied from interface:EventStoreProvider
Returns an object representing admin event query of typeAdminEventQuery
. The object is used for collecting requested properties of admin events (e.g. realm, operation, resourceType time boundaries, etc.) and contains theAdminEventQuery.getResultStream()
method that returns all objects from this store provider that have given properties.- Specified by:
createAdminQuery
in interfaceEventStoreProvider
- Returns:
- a query object
-
clearAdmin
public void clearAdmin()Description copied from interface:EventStoreProvider
Removes all admin events from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
-
clearAdmin
Description copied from interface:EventStoreProvider
Removes all auth events for the realm from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
- Parameters:
realm
- the realm
-
clearAdmin
Description copied from interface:EventStoreProvider
Removes all auth events for the realm that are older thanolderThan
from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
- Parameters:
realm
- the realmolderThan
- point in time in milliseconds
-
close
public void close()
-