use of com.unboundid.ldap.listener.InMemoryDirectoryServerConfig in project cdap by caskdata.
the class ExternalLDAPAuthenticationServerTestBase method startExternalAuthenticationServer.
protected void startExternalAuthenticationServer() throws Exception {
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig("dc=example,dc=com");
config.setListenerConfigs(ldapListenerConfig);
Entry defaultEntry = new Entry("dn: dc=example,dc=com", "objectClass: top", "objectClass: domain", "dc: example");
Entry userEntry = new Entry("dn: uid=user,dc=example,dc=com", "objectClass: inetorgperson", "cn: admin", "sn: User", "uid: user", "userPassword: realtime");
ldapServer = new InMemoryDirectoryServer(config);
ldapServer.addEntries(defaultEntry, userEntry);
ldapServer.startListening();
}
Aggregations