You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2017/12/25 17:29:27 UTC
[directory-ldap-api] branch master updated: Added teh
CRAM-MD5/DIGEST-MD5 dedicated bind method (not complete for DIGESMD5)
This is an automated email from the ASF dual-hosted git repository.
elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git
The following commit(s) were added to refs/heads/master by this push:
new 9f207ec Added teh CRAM-MD5/DIGEST-MD5 dedicated bind method (not complete for DIGESMD5)
9f207ec is described below
commit 9f207ec781b01b1003a3d2b04e6370618ff4236f
Author: Emmanuel Lécharny <el...@symas.com>
AuthorDate: Mon Dec 25 18:29:18 2017 +0100
Added teh CRAM-MD5/DIGEST-MD5 dedicated bind method (not complete for DIGESMD5)
---
.../ldap/client/api/LdapNetworkConnection.java | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
index e43a8f2..90f99fc 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
@@ -1522,6 +1522,42 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements Lda
/**
+ * Bind to the server using the SASL CRAM-MD5 mechanism.
+ *
+ * @param userName The user name
+ * @param credentials The user credentials
+ * @return A LdapResponse containing the result
+ * @throws LdapException if some error occurred
+ */
+ public BindResponse bindSaslCramMd5( String userName, String credentials ) throws LdapException
+ {
+ SaslCramMd5Request request = new SaslCramMd5Request();
+ request.setUsername( userName );
+ request.setCredentials( "secret" );
+
+ return bind( request );
+ }
+
+
+ /**
+ * Bind to the server using the SASL DIGEST-MD5 mechanism.
+ *
+ * @param userName The user name
+ * @param credentials The user credentials
+ * @return A LdapResponse containing the result
+ * @throws LdapException if some error occurred
+ */
+ public BindResponse bindSaslDigestMd5( String userName, String credentials ) throws LdapException
+ {
+ SaslDigestMd5Request request = new SaslDigestMd5Request();
+ request.setUsername( userName );
+ request.setCredentials( "secret" );
+
+ return bind( request );
+ }
+
+
+ /**
* Bind to the server using a CramMd5Request object.
*
* @param request The CramMd5Request POJO containing all the needed parameters
--
To stop receiving notification emails like this one, please contact
['"commits@directory.apache.org" <co...@directory.apache.org>'].