Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 32330 invoked from network); 26 Jul 2009 23:45:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jul 2009 23:45:26 -0000 Received: (qmail 57075 invoked by uid 500); 26 Jul 2009 23:46:31 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 57012 invoked by uid 500); 26 Jul 2009 23:46:31 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 57003 invoked by uid 99); 26 Jul 2009 23:46:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jul 2009 23:46:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jul 2009 23:46:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7443A23888EC; Sun, 26 Jul 2009 23:46:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r798007 - /directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Date: Sun, 26 Jul 2009 23:46:09 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090726234609.7443A23888EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Sun Jul 26 23:46:08 2009 New Revision: 798007 URL: http://svn.apache.org/viewvc?rev=798007&view=rev Log: Added a bind() method which takes a LdapDN instead of a String Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Modified: directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java?rev=798007&r1=798006&r2=798007&view=diff ============================================================================== --- directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java (original) +++ directory/shared/trunk/client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Sun Jul 26 23:46:08 2009 @@ -876,6 +876,19 @@ /** + * An Unauthenticated Authentication Bind on a server. (cf RFC 4513, + * par 5.1.2) + * + * @param name The name we use to authenticate the user. + * @return The BindResponse LdapResponse + */ + public BindResponse bind( LdapDN name ) throws Exception + { + return bind( name, (byte[])null ); + } + + + /** * Simple Bind on a server. * * @param name The name we use to authenticate the user. It must be a @@ -894,6 +907,33 @@ * * @param name The name we use to authenticate the user. It must be a * valid DN + * @param credentials The password. It can't be null + * @return The BindResponse LdapResponse + */ + public BindResponse bind( LdapDN name, String credentials ) throws LdapException + { + return bind( name, StringTools.getBytesUtf8( credentials ) ); + } + + + /** + * Simple Bind on a server. + * + * @param name The name we use to authenticate the user. + * @param credentials The password. + * @return The BindResponse LdapResponse + */ + public BindResponse bind( LdapDN name, byte[] credentials ) throws LdapException + { + return bind( name.getUpName(), credentials ); + } + + + /** + * Simple Bind on a server. + * + * @param name The name we use to authenticate the user. It must be a + * valid DN * @param credentials The password. * @return The BindResponse LdapResponse */