Skip to content

Commit

Permalink
Merge branch 'feature/ldap_backwards_compatible_json' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
fhanik committed Feb 17, 2016
2 parents e8fc11e + 645b8a9 commit fce3af9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

package org.cloudfoundry.identity.uaa.provider;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.util.List;
import java.util.Map;

@JsonIgnoreProperties(ignoreUnknown = true)
public class AbstractIdentityProviderDefinition {
public static final String EMAIL_DOMAIN_ATTR = "emailDomain";
public static final String PROVIDER_DESCRIPTION = "providerDescription";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ public void clearIdentityHolder() {
IdentityZoneHolder.clear();
}

@Test
public void testUpgradeLDAPProvider() throws Exception {
String insertSQL = "INSERT INTO identity_provider (id,identity_zone_id,name,origin_key,type,config)VALUES ('ldap','uaa','ldap','ldap2','ldap','{\"ldapdebug\":\"Test debug\",\"profile\":{\"file\":\"ldap/ldap-search-and-bind.xml\"},\"base\":{\"url\":\"ldap://localhost:389/\",\"userDn\":\"cn=admin,dc=test,dc=com\",\"password\":\"password\",\"searchBase\":\"dc=test,dc=com\",\"searchFilter\":\"cn={0}\",\"referral\":\"follow\"},\"groups\":{\"file\":\"ldap/ldap-groups-map-to-scopes.xml\",\"searchBase\":\"dc=test,dc=com\",\"groupSearchFilter\":\"member={0}\",\"searchSubtree\":true,\"maxSearchDepth\":10,\"autoAdd\":true,\"ignorePartialResultException\":true}}')";
jdbcTemplate.update(insertSQL);
IdentityProviderProvisioning provisioning = new JdbcIdentityProviderProvisioning(jdbcTemplate);
IdentityProviderBootstrap bootstrap = new IdentityProviderBootstrap(provisioning, environment);
bootstrap.afterPropertiesSet();
}

@Test
public void testLdapProfileBootstrap() throws Exception {
MockEnvironment environment = new MockEnvironment();
Expand Down

0 comments on commit fce3af9

Please sign in to comment.