Overload FreeMarkerAccountProvider?

Hello, I would like to overload FreeMarkerAccountProvider, I already did it without problem for login and email but this time my provider does not appear in server info.
Is it possible to overload it ?


How are you installing it? I believe you have to use the account SPI name. E.g.:

  <spi name="account">
    <provider name="my-freemarker" enabled="true"/>

Yes I activate my provider with a startup script like this :

embed-server --std-out=echo --server-config=standalone-ha.xmlembed-server --std-out=echo --server-config=standalone-ha.xml

And in my CustomFreeMarkerAccountProviderFactory :

public class CustomFreeMarkerAccountProviderFactory extends FreeMarkerAccountProviderFactory{
     private FreeMarkerUtil freeMarker;

    public AccountProvider create(KeycloakSession session) {
        return new CustomFreeMarkerAccountProvider(session, freeMarker);

    public void init(Config.Scope config) {
        freeMarker = new FreeMarkerUtil();

    public String getId() {
        return "freemarkeraccount";

But it doesn’t appear )=

Looks right. Might have something to do with the fact that it’s not being set as default. I don’t know how to do that in a startup script, but you might try that.

Did you define your SPI in META-INF? If not you need to define it there as well.

In jboss-deployment-structure.xml? or MET-INF.services? In the jboss-deployment-structure.xml file, I have already declared another provider and I was not able to declare another one )=.
My file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
        <module-alias name="deployment.com.test.keycloak.FreeMakerLoginFormProvider"/>
            <module name="javax.ws.rs.api"/>
            <module name="org.keycloak.keycloak-server-spi"/>
            <module name="org.keycloak.keycloak-server-spi-private"/>
            <module name="org.keycloak.keycloak-services"/>

How can I add CustomFreeMarkerAccountProviderFactory in this file? I already tried without success (bad structure).

yup in the MET-INF.services, not sure that you need to change deployment structure.