2014-08-27 10:41:40 +00:00
|
|
|
Example Event Store that stores events in memory
|
|
|
|
================================================
|
|
|
|
|
2016-04-06 11:18:23 +00:00
|
|
|
To deploy copy target/event-store-mem-example.jar to providers directory. Alternatively you can deploy as a module by running:
|
2015-04-01 12:22:17 +00:00
|
|
|
|
2016-02-04 08:17:44 +00:00
|
|
|
KEYCLOAK_HOME/bin/jboss-cli.sh --command="module add --name=org.keycloak.examples.event-inmem --resources=target/event-store-mem-example.jar --dependencies=org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi"
|
2015-04-01 12:22:17 +00:00
|
|
|
|
2016-09-08 12:04:12 +00:00
|
|
|
Then registering the provider by editing `standalone/configuration/standalone.xml` and adding the module to the providers element:
|
2015-04-01 12:22:17 +00:00
|
|
|
|
2016-09-08 12:04:12 +00:00
|
|
|
<providers>
|
|
|
|
...
|
|
|
|
<provider>module:org.keycloak.examples.event-inmem</provider>
|
|
|
|
</providers>
|
2015-01-28 09:48:26 +00:00
|
|
|
|
2016-09-08 12:04:12 +00:00
|
|
|
Then edit `standalone/configuration/standalone.xml`, change:
|
2014-08-27 10:41:40 +00:00
|
|
|
|
2016-09-08 12:04:12 +00:00
|
|
|
<spi name="eventsStore">
|
|
|
|
<default-provider>jpa</default-provider>
|
|
|
|
</spi>
|
2014-08-27 10:41:40 +00:00
|
|
|
|
|
|
|
to:
|
|
|
|
|
2016-09-08 12:04:12 +00:00
|
|
|
<spi name="eventsStore">
|
|
|
|
<default-provider>in-mem</default-provider>
|
|
|
|
</spi>
|
2014-08-27 10:41:40 +00:00
|
|
|
|
2015-01-28 09:48:26 +00:00
|
|
|
Then start (or restart)the server. Once started open the admin console, select your realm, then click on Events,
|
|
|
|
followed by config. Set the toggle for Enabled to ON. After this try to logout and login again then open the Events tab
|
|
|
|
again in the admin console to view events from the in-mem provider.
|