Hi!
I have a question related to the LDAPStorageProviderFactory extension, why my custom provider does not show the Mappers tab that will allow me to add ldap mappers to my custom provider?
I have extended the LDAPStorageProviderFactory and LDAPStorageProvider classes in order to override the removeUser method. However, when using a new LDAP provider using this custom provider, the Settings tab labels are not being displayed properly and the mappers tab is entirely missing. Here is what I am experiencing:
And these are my two classes extending Keycloak LDAP Provider and Factory:
public class CustomLDAPStorageProvider extends LDAPStorageProvider{
public CustomLDAPStorageProvider(LDAPStorageProviderFactory factory, KeycloakSession session, ComponentModel model, LDAPIdentityStore ldapIdentityStore) { super(factory, session, model, ldapIdentityStore); _session=session; }
public class CustomLDAPStorageProviderFactory extends LDAPStorageProviderFactory implements UserStorageProviderFactory<LDAPStorageProvider>{
public static final String PROVIDER_ID = "Custom-ldap-provider";
private static final Logger _logger = Logger.getLogger(CustomLDAPStorageProviderFactory.class);
private Config.Scope _config;
private ComponentModel _componentModel;
private LDAPIdentityStoreRegistry _ldapStoreRegistry;
@Override
public String getId() {
_logger.debug("CustomLDAPStorageProviderFactory getId");
return PROVIDER_ID;
}
@Override
public CustomLDAPStorageProvider create(KeycloakSession session,ComponentModel model ) {
Map<ComponentModel, LDAPConfigDecorator> configDecorators = getLDAPConfigDecorators(session, model);
LDAPIdentityStore ldapIdentityStore = this._ldapStoreRegistry.getLdapStore(session, model, configDecorators);
return new CustomLDAPStorageProvider(this, session, model, ldapIdentityStore);
}
@Override
public void init(Config.Scope config) {
this._ldapStoreRegistry = new LDAPIdentityStoreRegistry();
}}
