In my WebSecurityConfigurerAdapter I override the configure method as follows:
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.ldapAuthentication()
.userSearchBase("DC=unit1,DC=org1,DC=com")
.userSearchFilter("(sAMAccountName={0})")
.contextSource().url(ldapUrl).managerDn(mgrDn).managerPassword(mgrPassword);
}
I am passing the following request:
Request Headers: Content-Type: application/x-www.form-urlencoded;charset=UTF-8
Form Data username=user&password=password
But I keep on getting the ldap error. Please advise.