0
누구든지 ldapwhoami -U portal -h yorktown -Y PLAIN -ZZ
이 잘 작동하면이 코드가 작동하지 않는 이유를 볼 수 있습니까? 내가하는 일에 상응하지 않는 것이 있습니까?openldap 서버로 자바 sasl 인증
LDAPConnection connection = new LDAPConnection();
connection.connect("yorktown.example.com", 389);
SSLUtil sslUtil = new SSLUtil(new TrustAllTrustManager());
SSLContext sslContext = sslUtil.createSSLContext();
ExtendedResult extendedResult = connection.processExtendedOperation(new StartTLSExtendedRequest(sslContext));
PLAINBindRequest bindRequest = new PLAINBindRequest("u:portal", "test");
BindResult bindResult = connection.bind(bindRequest);
이 코드는 connection.bind
호출에 의해 슬로우 다음과 같은 예외를 제공합니다
play.exceptions.JavaExecutionException: SASL(-13): user not found: Password verification failed at play.mvc.ActionInvoker.invoke(ActionInvoker.java:285) at Invocation.HTTP Request(Play!) Caused by: LDAPException(resultCode=49 (invalid credentials), errorMessage='SASL(-13): user not found: Password verification failed', diagnosticMessage='SASL(-13): user not found: Password verification failed') at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:1710)