Examples of ApacheDSContainer


Examples of org.springframework.security.ldap.server.ApacheDSContainer

            }
            contextSource = postProcess(contextSource);
            if(url != null) {
                return contextSource;
            }
            ApacheDSContainer apacheDsContainer = new ApacheDSContainer(root, ldif);
            apacheDsContainer.setPort(getPort());
            postProcess(apacheDsContainer);
            return contextSource;
        }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

    @Test
    public void defaultLdifFileIsSuccessful() {
        appCtx = new InMemoryXmlApplicationContext(
                "<ldap-server/>");
        ApacheDSContainer dsContainer = appCtx.getBean(ApacheDSContainer.class);

        assertEquals("classpath*:*.ldif", ReflectionTestUtils.getField(dsContainer, "ldifResources"));
    }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

    /**
     * Main class to allow server to be started from gradle script
     */
    public static void main(String[] args) throws Exception {
        ApacheDSContainer server = new ApacheDSContainer("dc=springframework,dc=org", "classpath:test-server.ldif");
        server.afterPropertiesSet();
    }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

    public static void startServer() throws Exception {
// OpenLDAP configuration
//        contextSource = new DefaultSpringSecurityContextSource("ldap://127.0.0.1:22389/dc=springsource,dc=com");
//        contextSource.setUserDn("cn=admin,dc=springsource,dc=com");
//        contextSource.setPassword("password");
        server = new ApacheDSContainer("dc=springframework,dc=org", "classpath:test-server.ldif");
        int port = getAvailablePort();
        server.setPort(port);
        server.afterPropertiesSet();
        serverPort = port;
    }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

  @BeforeClass
  public static void beforeClass() throws Exception{
    injector = Guice.createInjector(new AuthorizationTestModule(), new JpaPersistModule("ambari-javadb"));
    injector.getInstance(GuiceJpaInitializer.class);

    apacheDSContainer = new ApacheDSContainer("dc=ambari,dc=apache,dc=org", "classpath:/users.ldif");
    apacheDSContainer.setPort(33389);
    apacheDSContainer.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

  @BeforeClass
  public static void beforeClass() throws Exception{
    injector = Guice.createInjector(new AuthorizationTestModule());
    injector.getInstance(GuiceJpaInitializer.class);

    apacheDSContainer = new ApacheDSContainer("dc=ambari,dc=apache,dc=org", "classpath:/users.ldif");
    apacheDSContainer.setPort(33389);
    apacheDSContainer.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

  @Inject
  Configuration configuration;

  @BeforeClass
  public static void beforeClass() throws Exception{
    apacheDSContainer = new ApacheDSContainer("dc=ambari,dc=apache,dc=org", "classpath:/users.ldif");
    apacheDSContainer.setPort(33389);
    apacheDSContainer.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

  @BeforeClass
  public static void beforeClass() throws Exception{
    injector = Guice.createInjector(new AuthorizationTestModule());
    injector.getInstance(GuiceJpaInitializer.class);

    apacheDSContainer = new ApacheDSContainer("dc=ambari,dc=apache,dc=org", "classpath:/users.ldif");
    apacheDSContainer.setPort(33389);
    apacheDSContainer.afterPropertiesSet();
  }
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

        // see ApacheDSContainer#afterPropertiesSet() as to why this is necessary
        if (FileSystemUtils.deleteRecursively(apacheWorkDir)) {
            System.out.println("Deleted " + apacheWorkDir.getAbsolutePath());
        }

        dsContainer = new ApacheDSContainer(ROOT_DN, LDIF_RESUOURCE);
        dsContainer.setPort(TEST_PORT);
        dsContainer.setWorkingDirectory(apacheWorkDir);

        DefaultDirectoryService dsService = dsContainer.getService();
        dsService.setShutdownHookEnabled(true);
View Full Code Here

Examples of org.springframework.security.ldap.server.ApacheDSContainer

  @BeforeClass
  public static void beforeClass() throws Exception{
    injector = Guice.createInjector(new AuthorizationTestModule());
    injector.getInstance(GuiceJpaInitializer.class);

    apacheDSContainer = new ApacheDSContainer("dc=ambari,dc=apache,dc=org", "classpath:/users.ldif");
    apacheDSContainer.setPort(33389);
    apacheDSContainer.afterPropertiesSet();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.