Explicit LDAP bean configuration
In this section, we’ll lead you through the set of bean configurations required to explicitly configure both a connection to an external LDAP server and the LdapAuthenticationProvider
interface required to support authentication against an external server. As with other explicit bean-based configurations, you really want to avoid doing this unless you find yourself in a situation where the capabilities of the security namespace style of configuration will not support your business or your technical requirements, in which case, read on!
Configuring an external LDAP server reference
To implement this configuration, we’ll assume that we have a local LDAP server running on port 33389
, with the same configuration corresponding to the DefaultSpringSecurityContextSource
interface example provided in the previous section. The required bean definition is provided in the SecurityConfig.java
file. In fact, to keep things simple, we have provided...