Package org.springframework.ldap.core.support

Examples of org.springframework.ldap.core.support.LdapContextSource.afterPropertiesSet()


        source.setPassword(configurationModel.getLdapConfiguration()
                .getLdapPassword());
        source.setDirObjectFactory(DefaultDirObjectFactory.class);
        source.setPooled(false);
        try {
            source.afterPropertiesSet();
        } catch (Exception e) {
            e.printStackTrace();
        }

        LdapTemplate template = new LdapTemplate(source);
View Full Code Here


        springSecurityContextSource.setUserDn(ldapServerProperties.get().getManagerDn());
        springSecurityContextSource.setPassword(ldapServerProperties.get().getManagerPassword());
      }

      try {
        springSecurityContextSource.afterPropertiesSet();
      } catch (Exception e) {
        LOG.error("LDAP Context Source not loaded ", e);
        throw new UsernameNotFoundException("LDAP Context Source not loaded", e);
      }
View Full Code Here

        LdapContextSource contextSource = new LdapContextSource();
        contextSource.setUrl("ldap://localhost:389");
        contextSource.setBase(baseDN);
        contextSource.setUserDn("cn=admin,o=sevenSeas");
        contextSource.setPassword("secret");
        contextSource.afterPropertiesSet();
        ldapTemplate = new LdapTemplate();
        ldapTemplate.setContextSource(contextSource);

        try
        {
View Full Code Here

                LdapContextSource contextSource = new LdapContextSource();
                contextSource.setUrl(ldapServerUrl);
                contextSource.setUserDn(LdapTestUtils.DEFAULT_PRINCIPAL);
                contextSource.setPassword(LdapTestUtils.DEFAULT_PASSWORD);
                contextSource.setPooled(false);
                contextSource.afterPropertiesSet();
   
                // Create the Sprint LDAP template
                LdapTemplate template = new LdapTemplate(contextSource);
   
                // Clear out any old data - and load the test data
View Full Code Here

        contextSource.setUrl("ldap://localhost:"+Integer.toString(getLdapPort()));
        contextSource.setBase(baseDN);
        contextSource.setUserDn("uid=admin,ou=system");
        contextSource.setPassword("secret");
        contextSource.setPooled(false);
        contextSource.afterPropertiesSet();
        PoolingContextSource pcs = new MutablePoolingContextSource();
        pcs.setContextSource(contextSource);
       
        ldapTemplate = new LdapTemplate(pcs);
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.