使用 Spring Boot 和 Java 的 Active Directory LDAP 身份验证

问题描述

我正在尝试向组织 ldap 服务器进行身份验证。当我输入凭据时,我正面临此错误。有人可以帮忙吗?

Uncategorized exception occured during LDAP processing; nested exception is javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C090A7D,comment: In order to perform this operation a successful bind must be completed on the connection.,data 0,v3839]; remaining name 'username=aestools,ou=people'

这是我的配置:

@Override
    public void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth
        .ldapAuthentication().userDnPatterns("username={0},ou=people").contextSource()
        .url("ldap://ldap.example.com:389/dc=ms,ddc=ds,dc=example,dc=com").and().passwordCompare()
        .passwordAttribute("password");

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)