Example usage for org.springframework.security.ldap DefaultSpringSecurityContextSource DefaultSpringSecurityContextSource

List of usage examples for org.springframework.security.ldap DefaultSpringSecurityContextSource DefaultSpringSecurityContextSource

Introduction

In this page you can find the example usage for org.springframework.security.ldap DefaultSpringSecurityContextSource DefaultSpringSecurityContextSource.

Prototype

public DefaultSpringSecurityContextSource(List<String> urls, String baseDn) 

Source Link

Document

Create and initialize an instance which will connect of the LDAP Spring Security Context Source.

Usage

From source file:de.whs.poodle.Poodle.java

@Bean
@Autowired/*from   ww w  .  jav a  2  s .c  o m*/
@ConditionalOnBean(LdapLoginProperties.class)
public BaseLdapPathContextSource ldapContextSource(LdapLoginProperties ldapProperties) {
    DefaultSpringSecurityContextSource ldapContextSource = new DefaultSpringSecurityContextSource(
            ldapProperties.getUrls(), ldapProperties.getBaseDn());
    ldapContextSource.setUserDn(ldapProperties.getUserDn());
    ldapContextSource.setPassword(ldapProperties.getPassword());
    return ldapContextSource;
}