0
我使用活動目錄服務帳戶時出現錯誤憑證異常,並且相同的代碼對於用戶帳戶正常工作。春季啓動+春季LDAP +服務帳戶+錯誤憑證
服務用戶憑證沒有問題。
請在下面找到我的代碼。
@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);
}
}