Hello all,
I need some advice on the implementation of a use case.
I have developed a spring-boot application and use Keycloak as identity provider. I would like to get notified anytime a user successfully registers / logs in etc…
I have come so far to implement an EventlistenerProvider and EventlistenerProviderFactory. However, as far as I understand it I need to put the jar on my Keycloak servers provider folder so that they are registered.
Since I also use application logic in the EventListenerProvider or functions from the service layer I find it a bit strange to place the whole application there.
What would be the alternative or have I misunderstood something here?
The EventlistenerProvider will run inside Keycloak. If you need to execute some external logic in another application, it is recommended that you send a message to that application from your EventlistenerProvider implementation. One approach is to send an HTTP request. I’ve got some helpers to do that here GitHub - p2-inc/keycloak-events: Useful Keycloak event listener implementations and utilities.
thanks for the quick response. Do you know, if i can use anything else instead of of HTTP requests? Is there any chance using messaging or similar technology?