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

Stian Thorgersen sthorger at redhat.com
Tue Feb 6 14:03:33 EST 2018


On 6 February 2018 at 18:42, Dmitry Telegin <mitya at cargosoft.ru> wrote:

> Hi Stian, nice feature! Is it limited to login themes?
>

Nah, it's a generic theme feature.

Not sure I can see any use-cases other than custom providers that need
additional templates though. At the moment I can only think of
authenticators and required actions.

Did you have any other use-cases in mind?


>
> BTW the correct link is https://github.com/stianst/
> keycloak-experimental/tree/master/fido-u2f
>
> Also nice to hear that the work has finally started on U2F, it's indeed a
> must-have feature today. Is it slated for 4.0.0?
>
> Dmitry
>
> 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.
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>


More information about the keycloak-dev mailing list