diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-federation.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-federation.html
index d56ec17e42..aad2d4b6e0 100755
--- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-federation.html
+++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/user-federation.html
@@ -18,7 +18,7 @@
Add provider...
@@ -34,7 +34,7 @@
- {{instance.id}}
+ {{instance.displayName}}
{{instance.providerName|capitalize}}
{{instance.priority}}
diff --git a/model/api/src/main/java/org/keycloak/models/RealmModel.java b/model/api/src/main/java/org/keycloak/models/RealmModel.java
index aee3119ec1..36b14b7e13 100755
--- a/model/api/src/main/java/org/keycloak/models/RealmModel.java
+++ b/model/api/src/main/java/org/keycloak/models/RealmModel.java
@@ -167,7 +167,7 @@ public interface RealmModel extends RoleContainerModel {
List getUserFederationProviders();
- UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority);
+ UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority, String displayName);
void updateUserFederationProvider(UserFederationProviderModel provider);
void removeUserFederationProvider(UserFederationProviderModel provider);
void setUserFederationProviders(List providers);
diff --git a/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java b/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java
index b723f3dd74..7b3c38835a 100755
--- a/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java
+++ b/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java
@@ -2,10 +2,13 @@ package org.keycloak.models;
import org.keycloak.provider.ProviderFactory;
+import java.util.List;
+
/**
* @author Bill Burke
* @version $Revision: 1 $
*/
public interface UserFederationProviderFactory extends ProviderFactory {
UserFederationProvider getInstance(KeycloakSession session, UserFederationProviderModel model);
+ List getConfigurationOptions();
}
diff --git a/model/api/src/main/java/org/keycloak/models/UserFederationProviderModel.java b/model/api/src/main/java/org/keycloak/models/UserFederationProviderModel.java
index a682c5499d..2542b9084b 100755
--- a/model/api/src/main/java/org/keycloak/models/UserFederationProviderModel.java
+++ b/model/api/src/main/java/org/keycloak/models/UserFederationProviderModel.java
@@ -13,15 +13,18 @@ public class UserFederationProviderModel {
private String providerName;
private Map config = new HashMap();
private int priority;
+ private String displayName;
public UserFederationProviderModel() {};
- public UserFederationProviderModel(String id, String providerName, Map config, int priority) {
+ public UserFederationProviderModel(String id, String providerName, Map config, int priority, String displayName) {
this.id = id;
this.providerName = providerName;
if (config != null) {
this.config.putAll(config);
}
+ this.priority = priority;
+ this.displayName = displayName;
}
public String getId() {
@@ -51,4 +54,12 @@ public class UserFederationProviderModel {
public void setPriority(int priority) {
this.priority = priority;
}
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
}
diff --git a/model/api/src/main/java/org/keycloak/models/entities/UserFederationProviderEntity.java b/model/api/src/main/java/org/keycloak/models/entities/UserFederationProviderEntity.java
index 5e39d9dbb6..6d3916e7e7 100755
--- a/model/api/src/main/java/org/keycloak/models/entities/UserFederationProviderEntity.java
+++ b/model/api/src/main/java/org/keycloak/models/entities/UserFederationProviderEntity.java
@@ -11,6 +11,7 @@ public class UserFederationProviderEntity {
protected String providerName;
protected Map config;
protected int priority;
+ protected String displayName;
public String getId() {
@@ -44,4 +45,12 @@ public class UserFederationProviderEntity {
public void setPriority(int priority) {
this.priority = priority;
}
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
}
diff --git a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java
index 714ee8dfa5..ec0c8442ba 100755
--- a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java
+++ b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java
@@ -51,6 +51,7 @@ public class ModelToRepresentation {
rep.setEnabled(user.isEnabled());
rep.setEmailVerified(user.isEmailVerified());
rep.setTotp(user.isTotp());
+ rep.setFederationLink(user.getFederationLink());
List reqActions = new ArrayList();
for (UserModel.RequiredAction ra : user.getRequiredActions()){
@@ -276,6 +277,7 @@ public class ModelToRepresentation {
rep.setConfig(model.getConfig());
rep.setProviderName(model.getProviderName());
rep.setPriority(model.getPriority());
+ rep.setDisplayName(model.getDisplayName());
return rep;
}
}
diff --git a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java
index 06c66307bd..4df881c67b 100755
--- a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java
+++ b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java
@@ -320,7 +320,7 @@ public class RepresentationToModel {
for (UserFederationProviderRepresentation representation : providers) {
UserFederationProviderModel model = new UserFederationProviderModel(representation.getId(), representation.getProviderName(),
- representation.getConfig(), representation.getPriority());
+ representation.getConfig(), representation.getPriority(), representation.getDisplayName());
result.add(model);
}
return result;
diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java
index b0281dc5e0..6639208f57 100755
--- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java
+++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java
@@ -618,9 +618,9 @@ public class RealmAdapter implements RealmModel {
}
@Override
- public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority) {
+ public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority, String displayName) {
getDelegateForUpdate();
- return updated.addUserFederationProvider(providerName, config, priority);
+ return updated.addUserFederationProvider(providerName, config, priority, displayName);
}
@Override
diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java
index ee94cf16fa..bc57ef16f8 100755
--- a/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java
+++ b/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java
@@ -746,14 +746,14 @@ public class RealmAdapter implements RealmModel {
});
List result = new ArrayList();
for (UserFederationProviderEntity entity : copy) {
- result.add(new UserFederationProviderModel(entity.getId(), entity.getProviderName(), entity.getConfig(), entity.getPriority()));
+ result.add(new UserFederationProviderModel(entity.getId(), entity.getProviderName(), entity.getConfig(), entity.getPriority(), entity.getDisplayName()));
}
return result;
}
@Override
- public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority) {
+ public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority, String displayName) {
String id = KeycloakModelUtils.generateId();
UserFederationProviderEntity entity = new UserFederationProviderEntity();
entity.setId(id);
@@ -761,10 +761,14 @@ public class RealmAdapter implements RealmModel {
entity.setProviderName(providerName);
entity.setConfig(config);
entity.setPriority(priority);
+ if (displayName == null) {
+ displayName = id;
+ }
+ entity.setDisplayName(displayName);
em.persist(entity);
realm.getUserFederationProviders().add(entity);
em.flush();
- return new UserFederationProviderModel(entity.getId(), providerName, config, priority);
+ return new UserFederationProviderModel(entity.getId(), providerName, config, priority, displayName);
}
@Override
@@ -785,6 +789,10 @@ public class RealmAdapter implements RealmModel {
while (it.hasNext()) {
UserFederationProviderEntity entity = it.next();
if (entity.getId().equals(model.getId())) {
+ String displayName = model.getDisplayName();
+ if (displayName != null) {
+ entity.setDisplayName(model.getDisplayName());
+ }
entity.setConfig(model.getConfig());
entity.setPriority(model.getPriority());
entity.setProviderName(model.getProviderName());
@@ -807,6 +815,10 @@ public class RealmAdapter implements RealmModel {
entity.setPriority(model.getPriority());
entity.setProviderName(model.getProviderName());
entity.setPriority(model.getPriority());
+ String displayName = model.getDisplayName();
+ if (displayName != null) {
+ entity.setDisplayName(model.getDisplayName());
+ }
found = true;
break;
}
@@ -829,7 +841,7 @@ public class RealmAdapter implements RealmModel {
if (!found) add.add(model);
}
- for (UserFederationProviderModel model : providers) {
+ for (UserFederationProviderModel model : add) {
UserFederationProviderEntity entity = new UserFederationProviderEntity();
if (model.getId() != null) entity.setId(model.getId());
else entity.setId(KeycloakModelUtils.generateId());
@@ -837,6 +849,10 @@ public class RealmAdapter implements RealmModel {
entity.setPriority(model.getPriority());
entity.setProviderName(model.getProviderName());
entity.setPriority(model.getPriority());
+ String displayName = model.getDisplayName();
+ if (displayName == null) {
+ entity.setDisplayName(entity.getId());
+ }
em.persist(entity);
realm.getUserFederationProviders().add(entity);
diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java
index d4a40c2c2f..42863bf29f 100755
--- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java
+++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java
@@ -41,6 +41,9 @@ public class UserFederationProviderEntity {
@CollectionTable(name="USER_FEDERATION_CONFIG")
private Map config;
+ @Column(name="DISPLAY_NAME")
+ private String displayName;
+
public String getId() {
return id;
}
@@ -81,5 +84,11 @@ public class UserFederationProviderEntity {
this.config = config;
}
+ public String getDisplayName() {
+ return displayName;
+ }
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
}
diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java
index 351ea6b5fe..f42365e6ac 100755
--- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java
+++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java
@@ -795,16 +795,19 @@ public class RealmAdapter extends AbstractMongoAdapter impleme
}
@Override
- public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority) {
+ public UserFederationProviderModel addUserFederationProvider(String providerName, Map config, int priority, String displayName) {
UserFederationProviderEntity entity = new UserFederationProviderEntity();
entity.setId(KeycloakModelUtils.generateId());
entity.setPriority(priority);
entity.setProviderName(providerName);
entity.setConfig(config);
+ if (displayName == null) {
+ displayName = entity.getId();
+ }
realm.getUserFederationProviders().add(entity);
updateRealm();
- return new UserFederationProviderModel(entity.getId(), providerName, config, priority);
+ return new UserFederationProviderModel(entity.getId(), providerName, config, priority, displayName);
}
@Override
@@ -828,6 +831,10 @@ public class RealmAdapter extends AbstractMongoAdapter impleme
entity.setProviderName(model.getProviderName());
entity.setConfig(model.getConfig());
entity.setPriority(model.getPriority());
+ String displayName = model.getDisplayName();
+ if (displayName != null) {
+ entity.setDisplayName(model.getDisplayName());
+ }
}
}
updateRealm();
@@ -851,7 +858,7 @@ public class RealmAdapter extends AbstractMongoAdapter impleme
});
List result = new LinkedList();
for (UserFederationProviderEntity entity : copy) {
- result.add(new UserFederationProviderModel(entity.getId(), entity.getProviderName(), entity.getConfig(), entity.getPriority()));
+ result.add(new UserFederationProviderModel(entity.getId(), entity.getProviderName(), entity.getConfig(), entity.getPriority(), entity.getDisplayName()));
}
return result;
@@ -867,6 +874,10 @@ public class RealmAdapter extends AbstractMongoAdapter impleme
entity.setProviderName(model.getProviderName());
entity.setConfig(model.getConfig());
entity.setPriority(model.getPriority());
+ String displayName = model.getDisplayName();
+ if (displayName == null) {
+ entity.setDisplayName(entity.getId());
+ }
entities.add(entity);
}
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java
index 4ceef1c122..e947b1ed6b 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java
@@ -16,8 +16,10 @@ import org.keycloak.models.RoleModel;
import org.keycloak.models.SocialLinkModel;
import org.keycloak.models.UserCredentialModel;
import org.keycloak.models.UserFederationProvider;
+import org.keycloak.models.UserFederationProviderFactory;
import org.keycloak.models.UserFederationProviderModel;
import org.keycloak.models.UserModel;
+import org.keycloak.models.UserProviderFactory;
import org.keycloak.models.UserSessionModel;
import org.keycloak.models.utils.ModelToRepresentation;
import org.keycloak.models.utils.RepresentationToModel;
@@ -28,6 +30,7 @@ import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.MappingsRepresentation;
import org.keycloak.representations.idm.RoleRepresentation;
import org.keycloak.representations.idm.SocialLinkRepresentation;
+import org.keycloak.representations.idm.UserFederationProviderFactoryRepresentation;
import org.keycloak.representations.idm.UserFederationProviderRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import org.keycloak.representations.idm.UserSessionRepresentation;
@@ -96,19 +99,43 @@ public class UserFederationResource {
@GET
@Path("providers")
@Produces("application/json")
- public List> getProviders() {
+ public List getProviders() {
logger.info("get provider list");
auth.requireView();
- List> providers = new LinkedList>();
+ List providers = new LinkedList();
for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
- Map provider = new HashMap();
- provider.put("name", factory.getId());
- providers.add(provider);
+ UserFederationProviderFactoryRepresentation rep = new UserFederationProviderFactoryRepresentation();
+ rep.setId(factory.getId());
+ rep.setOptions(((UserFederationProviderFactory)factory).getConfigurationOptions());
+ providers.add(rep);
}
logger.info("provider list.size() " + providers.size());
return providers;
}
+ /**
+ * Get List of available provider factories
+ *
+ * @return
+ */
+ @GET
+ @Path("providers/{id}")
+ @Produces("application/json")
+ public UserFederationProviderFactoryRepresentation getProvider(@PathParam("id") String id) {
+ logger.info("get provider list");
+ auth.requireView();
+ for (ProviderFactory factory : session.getKeycloakSessionFactory().getProviderFactories(UserFederationProvider.class)) {
+ if (!factory.getId().equals(id)) {
+ continue;
+ }
+ UserFederationProviderFactoryRepresentation rep = new UserFederationProviderFactoryRepresentation();
+ rep.setId(factory.getId());
+ rep.setOptions(((UserFederationProviderFactory)factory).getConfigurationOptions());
+ return rep;
+ }
+ throw new NotFoundException("Could not find provider");
+ }
+
/**
* Create a provider
*
@@ -118,10 +145,14 @@ public class UserFederationResource {
@POST
@Path("instances")
@Consumes("application/json")
- public Response createProvider(UserFederationProviderRepresentation rep) {
+ public Response createProviderInstance(UserFederationProviderRepresentation rep) {
logger.info("createProvider");
auth.requireManage();
- UserFederationProviderModel model = realm.addUserFederationProvider(rep.getProviderName(), rep.getConfig(), rep.getPriority());
+ String displayName = rep.getDisplayName();
+ if (displayName != null && displayName.trim().equals("")) {
+ displayName = null;
+ }
+ UserFederationProviderModel model = realm.addUserFederationProvider(rep.getProviderName(), rep.getConfig(), rep.getPriority(), displayName);
return Response.created(uriInfo.getAbsolutePathBuilder().path(model.getId()).build()).build();
}
@@ -134,10 +165,14 @@ public class UserFederationResource {
@PUT
@Path("instances/{id}")
@Consumes("application/json")
- public void updateProvider(@PathParam("id") String id, UserFederationProviderRepresentation rep) {
+ public void updateProviderInstance(@PathParam("id") String id, UserFederationProviderRepresentation rep) {
logger.info("updateProvider");
auth.requireManage();
- UserFederationProviderModel model = new UserFederationProviderModel(id, rep.getProviderName(), rep.getConfig(), rep.getPriority());
+ String displayName = rep.getDisplayName();
+ if (displayName != null && displayName.trim().equals("")) {
+ displayName = null;
+ }
+ UserFederationProviderModel model = new UserFederationProviderModel(id, rep.getProviderName(), rep.getConfig(), rep.getPriority(), displayName);
realm.updateUserFederationProvider(model);
}
@@ -149,7 +184,7 @@ public class UserFederationResource {
@GET
@Path("instances/{id}")
@Consumes("application/json")
- public UserFederationProviderRepresentation getProvider(@PathParam("id") String id) {
+ public UserFederationProviderRepresentation getProviderInstance(@PathParam("id") String id) {
logger.info("getProvider");
auth.requireView();
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
@@ -167,10 +202,10 @@ public class UserFederationResource {
*/
@DELETE
@Path("instances/{id}")
- public void deleteProvider(@PathParam("id") String id) {
+ public void deleteProviderInstance(@PathParam("id") String id) {
logger.info("deleteProvider");
auth.requireManage();
- UserFederationProviderModel model = new UserFederationProviderModel(id, null, null, -1);
+ UserFederationProviderModel model = new UserFederationProviderModel(id, null, null, -1, null);
realm.removeUserFederationProvider(model);
}
@@ -184,8 +219,8 @@ public class UserFederationResource {
@GET
@Path("instances")
@Produces("application/json")
- public List getUserFederationProviders() {
- logger.info("getUserFederationProviders");
+ public List getUserFederationInstances() {
+ logger.info("getUserFederationInstances");
auth.requireManage();
List reps = new LinkedList();
for (UserFederationProviderModel model : realm.getUserFederationProviders()) {
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java
new file mode 100755
index 0000000000..5d2c36b738
--- /dev/null
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProvider.java
@@ -0,0 +1,88 @@
+package org.keycloak.testutils;
+
+import org.keycloak.models.RealmModel;
+import org.keycloak.models.RoleModel;
+import org.keycloak.models.UserCredentialModel;
+import org.keycloak.models.UserFederationProvider;
+import org.keycloak.models.UserModel;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Bill Burke
+ * @version $Revision: 1 $
+ */
+public class DummyUserFederationProvider implements UserFederationProvider {
+ @Override
+ public UserModel proxy(UserModel local) {
+ return local;
+ }
+
+ @Override
+ public boolean isRegistrationSupported() {
+ return false;
+ }
+
+ @Override
+ public UserModel register(RealmModel realm, UserModel user) {
+ return user;
+ }
+
+ @Override
+ public boolean removeUser(RealmModel realm, UserModel user) {
+ return true;
+ }
+
+ @Override
+ public UserModel getUserByUsername(RealmModel realm, String username) {
+ return null;
+ }
+
+ @Override
+ public UserModel getUserByEmail(RealmModel realm, String email) {
+ return null;
+ }
+
+ @Override
+ public List searchByAttributes(Map attributes, RealmModel realm) {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public void preRemove(RealmModel realm) {
+
+ }
+
+ @Override
+ public void preRemove(RealmModel realm, RoleModel role) {
+
+ }
+
+ @Override
+ public boolean isValid(UserModel local) {
+ return false;
+ }
+
+ @Override
+ public Set getSupportedCredentialTypes() {
+ return Collections.emptySet();
+ }
+
+ @Override
+ public boolean validCredentials(RealmModel realm, UserModel user, List input) {
+ return false;
+ }
+
+ @Override
+ public boolean validCredentials(RealmModel realm, UserModel user, UserCredentialModel... input) {
+ return false;
+ }
+
+ @Override
+ public void close() {
+
+ }
+}
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java
new file mode 100755
index 0000000000..2314a67482
--- /dev/null
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java
@@ -0,0 +1,48 @@
+package org.keycloak.testutils;
+
+import org.keycloak.Config;
+import org.keycloak.models.KeycloakSession;
+import org.keycloak.models.UserFederationProvider;
+import org.keycloak.models.UserFederationProviderFactory;
+import org.keycloak.models.UserFederationProviderModel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Bill Burke
+ * @version $Revision: 1 $
+ */
+public class DummyUserFederationProviderFactory implements UserFederationProviderFactory {
+ @Override
+ public UserFederationProvider getInstance(KeycloakSession session, UserFederationProviderModel model) {
+ return new DummyUserFederationProvider();
+ }
+
+ @Override
+ public List getConfigurationOptions() {
+ List list = new ArrayList();
+ list.add("important.config");
+ return list;
+ }
+
+ @Override
+ public UserFederationProvider create(KeycloakSession session) {
+ return new DummyUserFederationProvider();
+ }
+
+ @Override
+ public void init(Config.Scope config) {
+
+ }
+
+ @Override
+ public void close() {
+
+ }
+
+ @Override
+ public String getId() {
+ return "dummy";
+ }
+}
diff --git a/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory b/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory
new file mode 100755
index 0000000000..82b852c8e0
--- /dev/null
+++ b/testsuite/integration/src/main/resources/META-INF/services/org.keycloak.models.UserFederationProviderFactory
@@ -0,0 +1 @@
+org.keycloak.testutils.DummyUserFederationProviderFactory
\ No newline at end of file
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java
index ba162623ba..0dbb9474f6 100755
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java
@@ -64,7 +64,7 @@ public class FederationProvidersIntegrationTest {
- appRealm.addUserFederationProvider(LDAPFederationProviderFactory.PROVIDER_NAME, ldapConfig, 0);
+ appRealm.addUserFederationProvider(LDAPFederationProviderFactory.PROVIDER_NAME, ldapConfig, 0, null);
// Configure LDAP
ldapRule.getEmbeddedServer().setupLdapInRealm(appRealm);