Hi,
implementation of an existing SPI is exactly your case: Implement an own event listener
using an existing Interface.
As already said here, try to use the standalone/deployments approach it's the
easiest.
Remember to provide a META-INF/services/org.keycloak.events.EventListenerProviderFactory
File containing the fully qualified classname of your implementation (eg
org.acme.MyEventListenerProviderFactory). Also you need to declare your (provided)
keycloak module dependencies using the META-INF/MANIFEST.MF file (eg. Dependencies:
org.keycloak.keycloak-services, org.keycloak.keycloak-server-spi,
org.keycloak.keycloak-server-spi-private). For alternative module declaration approaches
see the official wildfly documentation:
http://docs.wildfly.org/17/Developer_Guide.html#ear-class-loading
Additional jars could be packaged in an EAR file or shaded into the jar. Keycloak has a
comprehensive list of modules available (eg httpclient, Jackson, commons).
Best
Daniel
-----Ursprüngliche Nachricht-----
Von: keycloak-user-bounces(a)lists.jboss.org <keycloak-user-bounces(a)lists.jboss.org>
Im Auftrag von John Norris
Gesendet: Dienstag, 15. Oktober 2019 10:53
An: stian(a)redhat.com
Cc: keycloak-user <keycloak-user(a)lists.jboss.org>
Betreff: Re: [keycloak-user] Custom SPI does not appear in list
So the problem seems to be that if I use the method in the manual then keycloak does not
start.
If I use the <spi> block then it starts but the module does not load and is not in
the dropdown list of events on the admin pages.
Also, I am not sure what is the difference between an existing SPI and a custom SPI.
For instance I am interested in event listeners. When I got to events -> config in
admin, I see the default events and I want to see a third, the event for a jar that has
been added and referenced in the standalone.xml. Now that is not happening.
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user