![](/img/trans.png)
[英]LDAP: error code 49 - 80090308: LdapErr: DSID-0C09044E, comment: AcceptSecurityContext error, data 52e, v2580 (first time using ldap)
[英]AcceptSecurityContext error when using ldap
我有問題 。 這是我使用 ldap 進行身份驗證的代碼
在春天,但它有錯誤與我交談 AcceptSecurityContext。
javax.naming.AuthenticationException:[LDAP:錯誤代碼 49 - 80090308:LdapErr:DSID-0C090400,注釋:AcceptSecurityContext 錯誤,數據 52e,v1db1]
請幫我
@GetMapping("/login/{userName}/{password}")
public Map<String, Boolean> login(@PathVariable(value = "userName") String username,@PathVariable(value = "password") String password) throws Exception {
LdapContextSource contextSource = new LdapContextSource();
contextSource.setUrl(url);
contextSource.setUserDn("userPrincipalName=arpa@msv.net");
contextSource.setPassword("masterone4408$$)*");
contextSource.afterPropertiesSet();
LdapTemplate ldapTemplate=new LdapTemplate(contextSource);
AndFilter filter = new AndFilter();
System.out.println(username+"////"+password);
filter.and(new EqualsFilter("cn", username));
ldapTemplate.afterPropertiesSet();
Map<String, Boolean> response = new HashMap<>();
response.put("deleted", ldapTemplate.authenticate(DistinguishedName.EMPTY_PATH,"(&(userPrincipalName="+username+"@msv.net))", password));
return response;
}
[LDAP: error code 49 -... data 52e 當用戶名有效但密碼/憑證無效時返回。
-吉姆
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.