You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/10/02 18:01:42 UTC
svn commit: r293130 - in /directory/shared/ldap/trunk: apache2-provider/
apache2-provider/src/java/main/org/apache/asn1new/ldap/
common/src/java/org/apache/ldap/common/message/
common/src/test/org/apache/ldap/common/message/
Author: akarasulu
Date: Sun Oct 2 09:01:32 2005
New Revision: 293130
URL: http://svn.apache.org/viewcvs?rev=293130&view=rev
Log:
added sasl mechanism property to beans and updated Twix transformer to use the same property
Modified:
directory/shared/ldap/trunk/apache2-provider/ (props changed)
directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/TwixTransformer.java
directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequest.java
directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequestImpl.java
directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
Propchange: directory/shared/ldap/trunk/apache2-provider/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Oct 2 09:01:32 2005
@@ -1 +1,2 @@
target
+*.iml
Modified: directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/TwixTransformer.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/TwixTransformer.java?rev=293130&r1=293129&r2=293130&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/TwixTransformer.java (original)
+++ directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/TwixTransformer.java Sun Oct 2 09:01:32 2005
@@ -213,7 +213,7 @@
{
snickersMessage.setSimple( false );
snickersMessage.setCredentials( ( (SaslCredentials)authentication).getCredentials().getValue() );
- snickersMessage.setMechanism( ( (SaslCredentials)authentication).getMechanism() );
+ snickersMessage.setSaslMechanism( ( (SaslCredentials)authentication).getMechanism() );
}
return snickersMessage;
Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequest.java?rev=293130&r1=293129&r2=293130&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequest.java (original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequest.java Sun Oct 2 09:01:32 2005
@@ -14,7 +14,7 @@
* limitations under the License.
*
*/
-package org.apache.ldap.common.message ;
+package org.apache.ldap.common.message;
/**
@@ -24,13 +24,12 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public interface BindRequest
- extends SingleReplyRequest
+public interface BindRequest extends SingleReplyRequest
{
/** Bind request message type enumeration value */
- MessageTypeEnum TYPE = MessageTypeEnum.BINDREQUEST ;
+ MessageTypeEnum TYPE = MessageTypeEnum.BINDREQUEST;
/** Bind response message type enumeration value */
- MessageTypeEnum RESP_TYPE = BindResponse.TYPE ;
+ MessageTypeEnum RESP_TYPE = BindResponse.TYPE;
/**
* Checks to see if the authentication mechanism is simple and not SASL
@@ -38,7 +37,7 @@
*
* @return true if the mechanism is simple false if it is SASL based.
*/
- boolean isSimple() ;
+ boolean isSimple();
/**
* Checks to see if the authentication mechanism is simple and not SASL
@@ -46,15 +45,15 @@
*
* @return true if the mechanism is simple false if it is SASL based.
*/
- boolean getSimple() ;
+ boolean getSimple();
/**
* Sets the authentication mechanism to simple or to SASL based
* authentication.
*
- * @param a_isSimple true if authentication is simple, false otherwise.
+ * @param isSimple true if authentication is simple, false otherwise.
*/
- void setSimple( boolean a_isSimple ) ;
+ void setSimple( boolean isSimple );
/**
* Gets the simple credentials associated with a simple authentication
@@ -62,16 +61,16 @@
*
* @return null if the mechanism is SASL or the credentials if it is simple.
*/
- byte [] getCredentials() ;
+ byte [] getCredentials();
/**
* Sets the simple credentials associated with a simple authentication
* attempt ignored if this request uses SASL authentication mechanisms.
*
- * @param a_credentials the credentials if authentication is simple, null
+ * @param credentials the credentials if authentication is simple, null
* otherwise
*/
- void setCredentials( byte [] a_credentials ) ;
+ void setCredentials( byte [] credentials );
/**
* Gets the distinguished name of the subject in this authentication
@@ -82,7 +81,7 @@
*
* @return the DN of the authenticating user.
*/
- String getName() ;
+ String getName();
/**
* Sets the distinguished name of the subject in this authentication
@@ -91,10 +90,10 @@
* performed at a lower layer, or when using SASL credentials with a
* mechanism that includes the LDAPDN in the credentials.
*
- * @param a_name the DN of the authenticating user - leave null for
+ * @param name the DN of the authenticating user - leave null for
* annonymous user.
*/
- void setName( String a_name ) ;
+ void setName( String name );
/**
* Checks to see if the Ldap v3 protocol is used. Normally this would
@@ -107,7 +106,7 @@
*
* @return true if client using version 3 false if it is version 2.
*/
- boolean isVersion3() ;
+ boolean isVersion3();
/**
* Gets whether or not the Ldap v3 protocol is used. Normally this would
@@ -120,7 +119,7 @@
*
* @return true if client using version 3 false if it is version 2.
*/
- boolean getVersion3() ;
+ boolean getVersion3();
/**
* Sets whether or not the LDAP v3 or v2 protocol is used. Normally this
@@ -131,8 +130,24 @@
* use an type-safe enumeration type for a binary value. If an LDAPv4 comes
* out then we shall convert the return type to a type safe enumeration.
*
- * @param a_isVersion3 if true the client will be exhibiting version 3 bind
+ * @param isVersion3 if true the client will be exhibiting version 3 bind
* behavoir, if false is used version 2 behavoir will be exhibited.
*/
- void setVersion3( boolean a_isVersion3 ) ;
+ void setVersion3( boolean isVersion3 );
+
+ /**
+ * Gets the SASL mechanism String associated with this BindRequest if
+ * the bind operation is using SASL.
+ *
+ * @return the SASL mechanism or null if the bind op is simple
+ */
+ String getSaslMechanism();
+
+ /**
+ * Sets the SASL mechanism String associated with this BindRequest if
+ * the bind operation is using SASL.
+ *
+ * @param saslMechanism the SASL mechanism
+ */
+ void setSaslMechanism( String saslMechanism );
}
Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequestImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequestImpl.java?rev=293130&r1=293129&r2=293130&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequestImpl.java (original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/BindRequestImpl.java Sun Oct 2 09:01:32 2005
@@ -28,8 +28,7 @@
* Apache Directory Project</a>
* @version $Rev$
*/
-public class BindRequestImpl
- extends AbstractRequest implements BindRequest
+public class BindRequestImpl extends AbstractRequest implements BindRequest
{
static final long serialVersionUID = 7945504184130380071L;
/**
@@ -135,7 +134,7 @@
*
* @return The mechanism if SASL.
*/
- public String getMechanism()
+ public String getSaslMechanism()
{
return mechanism;
}
@@ -146,7 +145,7 @@
* @param mechanism the mechanism
* otherwise
*/
- public void setMechanism( String mechanism )
+ public void setSaslMechanism( String mechanism )
{
lockCheck( "Attempt to alter auth. cred. of locked BindRequest!" );
this.mechanism = mechanism;
Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java?rev=293130&r1=293129&r2=293130&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java (original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/message/BindRequestImplTest.java Sun Oct 2 09:01:32 2005
@@ -289,6 +289,17 @@
{
return false;
}
+
+
+ public String getSaslMechanism()
+ {
+ return null;
+ }
+
+
+ public void setSaslMechanism( String saslMechanism )
+ {
+ }
};
BindRequestImpl req1 = new BindRequestImpl( 5 );