Spring Security ldap通过anotation进行身份验证

时间:2017-07-12 16:37:00

标签: java active-directory

我们正在尝试创建一个登录页面,该页面将通过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 

0 个答案:

没有答案