[keycloak-dev] Theme resource provider - ability for custom authenticators to load additional templates

Stian Thorgersen sthorger at redhat.com
Tue Feb 6 01:16:18 EST 2018


I was experimenting with a custom authenticator and found it annoying that
I had to copy templates manually to the themes directory.

To resolve this I added a Theme Resource Provider SPI.

A theme resource provider can provide additional templates and/or resources
alongside the custom authenticator.

Themes are always searched first for templates and resources. Template
resource providers are only searched if not found in themes. This is
important as it allows a theme to override the templates and/or resources
provided by a theme resource provider.

The code is ready in the PR https://github.com/keycloak/keycloak/pull/4971

For an example on how it's used take a look at
https://github.com/stianst/keycloak-experimental/tree/master/u2f.


More information about the keycloak-dev mailing list