Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keycloak: Subscribe events like create user to trigger a webservice

I need to update from the Keycloak to another proprietary data store information about created users (no matter if created directly in Keycloak or in a connected LDAP/Active directory). I tried to enhance the logging but it seems that this is not logging everything.

Is there a way in Keycloak to subscribe to some events (like create user) and trigger some logging / web Service call from that event – so that all information are transmitted? What would be the right point to do this?

like image 384
PaulEdison Avatar asked Aug 09 '19 13:08

PaulEdison


1 Answers

You can write your own Event Listener by implementing the EventListenerProvider and EventListenerProviderFactory interfaces, more can found in server development documentation.

You can also find sample event listener that writes events to System.out in keycloak-quickstarts

like image 89
ravthiru Avatar answered Nov 11 '22 04:11

ravthiru