【发布时间】:2018-02-02 16:43:20
【问题描述】:
我正在尝试在我的 Spring Boot 应用程序中集成基于 LDAP 的登录。
作为第一步,我正在尝试使用此 LDAP 服务器 (http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/)。
但是,我无法成功连接服务器并收到此错误。
nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
我在配置类中使用此信息。
authenticationManagerBuilder.ldapAuthentication()
.contextSource().url("ldap://ldap.forumsys.com:389/dc=example,dc=com")
.managerDn("cn=read-only-admin,dc=example,dc=com").managerPassword("password")
.and()
.userSearchBase("ou=mathematicians")
.groupSearchBase("ou=mathematicians")
.userSearchFilter("(cn={0})");
这是我的这个项目的 application.properties 文件。
spring.ldap.urls=ldap.forumsys.com:389
spring.ldap.base=cn=read-only-admin,dc=example,dc=com
spring.ldap.password=password
任何人都可以使用 LDAP 服务器为 Spring Boot 应用程序提供工作配置吗?
【问题讨论】:
标签: spring-boot spring-security ldap spring-security-ldap