Package org.springframework.security.ldap.server

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


    @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

    /**
     * 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

    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

  @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

  @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

  @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

  @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

        // 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

  @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

Related Classes of org.springframework.security.ldap.server.ApacheDSContainer

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.