use of com.thoughtworks.go.server.security.LdapContextSourceConfigurator in project gocd by gocd.
the class ServerConfigService method ldapContextSource.
DefaultSpringSecurityContextSource ldapContextSource(LdapConfig ldapConfig) {
DefaultSpringSecurityContextSource source = new DefaultSpringSecurityContextSource(ldapConfig.uri());
//so user can define the variable java.naming.referral=follow in the server.sh
source.setBaseEnvironmentProperties(System.getProperties());
new LdapContextSourceConfigurator(ldapConfig).configure(source);
try {
source.afterPropertiesSet();
} catch (Exception e) {
bomb("Cannot create ldap context", e);
}
return source;
}
Aggregations