directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-ldap-api] branch shared-value updated: Added a (first) version of SASL CRAM-MD5 and DIGEST-MD5 dedicated bind function. Note that the DIGESTMD5 does not have enough parameters.
Date Sun, 24 Dec 2017 22:55:49 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch shared-value
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/shared-value by this push:
     new e9445b1  Added a (first) version of SASL CRAM-MD5 and DIGEST-MD5 dedicated bind function.
Note that the DIGESTMD5 does not have enough parameters.
e9445b1 is described below

commit e9445b1466ea171e6e4c24a53db09be36705d64e
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Sun Dec 24 23:55:36 2017 +0100

    Added a (first) version of SASL CRAM-MD5 and DIGEST-MD5 dedicated bind
    function. Note that the DIGESTMD5 does not have enough parameters.
---
 .../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" <commits@directory.apache.org>'].

Mime
View raw message