An example how to create custom Spi provider and how to add it to the Keycloak.
TLDR; run docker compose up
, run mvn package
and ./install.sh
- Run keycloak
- Create directory
KEYCLOAK_HOME/providers
- Build Spi (
mvn package
) - Add jar to
providers
directory - Restart server (
KEYCLOAK_HOME/bin/jboss-cli.sh --connect --command:reload
) - Your Spi should be available!
- See "Server Info -> Providers" to verify it.
- Implement
Spi
. - Create
Provider
andProviderFactory
interfaces for your Spi. - Implement these interfaces.
- Create a provider configuration files:
org.keycloak.provider.Spi
and add your Spiyour.package.ProviderFactoryInteraface
and add factory implementation