2
votes

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.

i highly recommend using ldaps as opposed to ldap. all of your ldap traffic is practically clear on the network. something to consider. - angryip
will this solve my issue? - iPhoneJavaDev
there are a lof of missing pieces in your code ( how is the ldap code being called, etc ). it’s unlikely that it will, but it will certainly make it more secure - angryip