softwarefactory-project / keycloak-event-listener-mqtt

A Keycloak SPI that publishes events to a MQTT broker.
Apache License 2.0
38 stars 9 forks source link

Representation field missing in Admin Event #9

Closed eclhmf closed 1 year ago

eclhmf commented 1 year ago

In admin events the field representation is missing.

In order to fix this, add following line:

ev.put("representation", adminEvent.getRepresentation());

at line 121 in file MQTTEventListenerProvider.java (based on release 19.0.2 - commit 777500ca).

See: https://www.keycloak.org/docs-api/18.0/javadocs/org/keycloak/events/admin/AdminEvent.html#getRepresentation()

For comparison, see EventAdminNotificationMqMsg.java from project keycloak-event-listener-rabbitmq