【发布时间】:2017-01-30 21:00:53
【问题描述】:
我在使用 Active Directory 服务帐户时遇到错误的凭据异常,并且相同的代码对用户帐户运行良好。
而且服务用户凭据没有任何问题。
请在下面找到我的代码。
@Configuration
protected static class AuthenticationConfiguration extends GlobalAuthenticationConfigurerAdapter {
@Override
public void init(AuthenticationManagerBuilder auth) throws Exception {
ActiveDirectoryLdapAuthenticationProvider provider = new ActiveDirectoryLdapAuthenticationProvider(
"abc.def.ghi", "ldap://abc.def.ghi:389");
auth.authenticationProvider(provider);
}
}
【问题讨论】:
标签: spring spring-security spring-boot spring-ldap