This commit is contained in:
Bill Burke 2016-10-25 13:40:24 -04:00
parent b67cb0e97a
commit 2cc4a920a0
4 changed files with 13 additions and 3 deletions

View file

@ -622,7 +622,9 @@ public class ModelToRepresentation {
providerRep.setStoreToken(identityProviderModel.isStoreToken());
providerRep.setTrustEmail(identityProviderModel.isTrustEmail());
providerRep.setAuthenticateByDefault(identityProviderModel.isAuthenticateByDefault());
providerRep.setConfig(identityProviderModel.getConfig());
Map<String, String> config = new HashMap<>();
config.putAll(identityProviderModel.getConfig());
providerRep.setConfig(config);
providerRep.setAddReadTokenRoleOnCreate(identityProviderModel.isAddReadTokenRoleOnCreate());
String firstBrokerLoginFlowId = identityProviderModel.getFirstBrokerLoginFlowId();

View file

@ -1762,9 +1762,18 @@ public class RepresentationToModel {
component.setSubType(rep.getSubType());
}
Map<String, ProviderConfigProperty> providerConfiguration = null;
if (!internal) {
providerConfiguration = ComponentUtil.getComponentConfigProperties(session, component);
}
if (rep.getConfig() != null) {
Set<String> keys = new HashSet<>(rep.getConfig().keySet());
for (String k : keys) {
if (!internal && !providerConfiguration.containsKey(k)) {
break;
}
List<String> values = rep.getConfig().get(k);
if (values == null || values.isEmpty() || values.get(0) == null || values.get(0).trim().isEmpty()) {
component.getConfig().remove(k);

View file

@ -50,7 +50,6 @@ public class StripSecretsUtils {
next.setValue(Collections.singletonList(ComponentRepresentation.SECRET_VALUE));
}
} else {
itr.remove();
}
}
return rep;

View file

@ -132,7 +132,7 @@ public class UserStorageTest {
}
@Test
//@Test
public void testIDE() throws Exception {
Thread.sleep(100000000);
}