Deploying a custom SPI: using Keycloak deployer vs. JBoss API

Hello everyone!

I’m currently trying to deploy a custom ‘required actions’ SPI for keycloak, but I’m stuck with the right way to do so in a production environment. Based on the keycloak documentation I have two options:

(A) Keycloak deployer (standalone/deployments folder)

This method works fine for me on the dev. environment, but JBoss documentation mentions this should not be used for production environments. Is that true? See:

(B) JBoss API

I’ve tried to register my custom SPI as a module, and to include it in the standalone.xml, but the SPI is not loading. It is not visible under the registered SPI’s in the admin interface. I’ve followed the steps as described in the keycloak docs. Could anyone of you point me to a better description? Or do you have any clue what I might be doing wrong?

Thanks in advance for your help.

I’ve always just done “A” in production, and have never had a problem with it.