Package com.unboundid.ldap.sdk

Examples of com.unboundid.ldap.sdk.DN


                                                      final String baseDN,
                                                      final String authDN,
                                                      final String authPassword,
                                                      final String ldifFile) throws LDAPException, IOException {
        final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", port);
        final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(baseDN));
        config.setListenerConfigs(listenerConfig);
        config.addAdditionalBindCredentials(authDN, authPassword);
        final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
        server.add(new Entry(baseDN, new Attribute("objectclass", "domain", "top")));
        loadData(server, ldifFile);
View Full Code Here


     * @throws LDAPException If there was a problem configuring or starting the embedded LDAP directory server.
     * @throws IOException   If there was a problem reading the LDIF data.
     */
    private InMemoryDirectoryServer startServer() throws LDAPException, IOException {
        final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", annotation.port());
        final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(annotation.baseDN()));
        config.setListenerConfigs(listenerConfig);
        config.addAdditionalBindCredentials(annotation.authDN(), annotation.authPassword());
        final InMemoryDirectoryServer server = new InMemoryDirectoryServer(config);
        server.add(new Entry(annotation.baseDN(), new Attribute("objectclass", "domain", "top")));
        loadData(server);
View Full Code Here

    @Override
    public void start(final Logger logger) {
        try {
            logger.logInfo("Starting UnboundID server");
            final InMemoryListenerConfig listenerConfig = InMemoryListenerConfig.createLDAPConfig("default", getServerPort());
            final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(new DN(getRoot()));
            config.setListenerConfigs(listenerConfig);
            if (getAuthDn() != null) {
                config.addAdditionalBindCredentials(getAuthDn(), getPasswd());
            }
            server = new InMemoryDirectoryServer(config);
View Full Code Here

TOP

Related Classes of com.unboundid.ldap.sdk.DN

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.