How do i set the URL for spring security LDAP configuration? There are plenty of xml based examples but i cannot find a java config example to replication the below xml line. I assume it is configured in the below java code block taken from the spring guide for using a embedded ldap but how do we set a external url?
<ldap-server id="ldapServer" url="ldap://example.com:PORT/dc=example,dc=com" />
@Override
public void init(AuthenticationManagerBuilder auth) throws Exception {
auth.ldapAuthentication()
.userDnPatterns("uid={0},ou=people")
.groupSearchBase("ou=groups")
.contextSource()
.ldif("classpath:test-server.ldif");
}