我们正在尝试创建一个登录页面,该页面将通过ldap服务器进行身份验证。 为此,我们创建了以下模块,该模块无效。 culd任何人建议在spring security中验证ldap的最佳方法。
@autowired
Public void configAuthentication(AthenticationBuilder auth) throws exception{
auth.ldapAuthentication()
.userDnPatterns("uid={0},ou=")
.groupSearchBase("ou=")
.ContextSource()
.url("ldap://localhost:Port/dc=,dc=com")
}
错误
Connection refused