Search in sources :

Example 16 with EventStoreProvider

use of org.keycloak.events.EventStoreProvider in project keycloak by keycloak.

the class TestingResourceProvider method clearExpiredEvents.

@GET
@Path("/clear-expired-events")
@Produces(MediaType.APPLICATION_JSON)
public Response clearExpiredEvents() {
    EventStoreProvider eventStore = session.getProvider(EventStoreProvider.class);
    eventStore.clearExpiredEvents();
    return Response.noContent().build();
}
Also used : EventStoreProvider(org.keycloak.events.EventStoreProvider) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 17 with EventStoreProvider

use of org.keycloak.events.EventStoreProvider in project keycloak by keycloak.

the class TestingResourceProvider method clearEventStore.

@GET
@Path("/clear-event-store-for-realm")
@Produces(MediaType.APPLICATION_JSON)
public Response clearEventStore(@QueryParam("realmId") String realmId) {
    EventStoreProvider eventStore = session.getProvider(EventStoreProvider.class);
    eventStore.clear(realmId);
    return Response.noContent().build();
}
Also used : EventStoreProvider(org.keycloak.events.EventStoreProvider) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

EventStoreProvider (org.keycloak.events.EventStoreProvider)17 Path (javax.ws.rs.Path)14 GET (javax.ws.rs.GET)10 Produces (javax.ws.rs.Produces)9 NoCache (org.jboss.resteasy.annotations.cache.NoCache)4 Date (java.util.Date)3 AdminEventQuery (org.keycloak.events.admin.AdminEventQuery)3 Consumes (javax.ws.rs.Consumes)2 DELETE (javax.ws.rs.DELETE)2 Test (org.junit.Test)2 OperationType (org.keycloak.events.admin.OperationType)2 ModelToRepresentation (org.keycloak.models.utils.ModelToRepresentation)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 URI (java.net.URI)1 ParseException (java.text.ParseException)1 SimpleDateFormat (java.text.SimpleDateFormat)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 Map (java.util.Map)1