[keycloak-dev] Example Setup to simplify the development of Keycloak Extensions

Thomas Darimont thomas.darimont at googlemail.com
Tue Feb 12 03:39:30 EST 2019


Hello Keycloak-Team,

I found a neat setup to simplify the development of Keycloak extensions.
I setup a "keycloak-extension-playground" project that contains two or more
maven modules:
- keycloak-playground-server
- simple-auth-extension (example)

In the "keycloak-playground-server" module, I wrap a KeycloakServer from
the "keycloak-testsuite-utils" library where one could potentially add
additional configuration. Note that this library must be in (local) Maven
Repository.

The "simple-auth-extension" is an example extension module that
demonstrates the usage of the Authenticator SPI.

I now declare "simple-auth-extension" as a compile time dependency of the
"keycloak-playground-server" project. This ensures that it's classes and
resources are on the classpath of KeycloakServer. Therefore all SPI
implementations in custom extensions can be found. This improves the
debugging experience and speeds up development time.

The example project can be found here:
https://github.com/thomasdarimont/keycloak-extension-playground

What do you guys think about this approach?

Cheers,
Thomas


More information about the keycloak-dev mailing list