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 2008/07/22 22:35:10 UTC
svn commit: r678888 - in /directory/apacheds/branches/bigbang:
core/src/main/java/org/apache/directory/server/core/authn/
server-unit/src/test/java/org/apache/directory/server/operations/bind/
Author: elecharny
Date: Tue Jul 22 13:35:10 2008
New Revision: 678888
URL: http://svn.apache.org/viewvc?rev=678888&view=rev
Log:
o Correctly fixed the failing SimpleBind test by throwing the correct exception (the wrong one was throwed before)
o Removed some useless import
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java
directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=678888&r1=678887&r2=678888&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Tue Jul 22 13:35:10 2008
@@ -28,8 +28,6 @@
import java.util.Map;
import java.util.Set;
-import javax.naming.OperationNotSupportedException;
-
import org.apache.directory.server.core.CoreSession;
import org.apache.directory.server.core.DefaultCoreSession;
import org.apache.directory.server.core.DirectoryService;
@@ -56,6 +54,8 @@
import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
+import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.slf4j.Logger;
@@ -425,7 +425,7 @@
{
// This is a case where the Bind request contains a DN, but no password.
// We don't check the DN, we just return a UnwillingToPerform error
- throw new OperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName() );
+ throw new LdapOperationNotSupportedException( "Cannot Bind for DN " + opContext.getDn().getUpName(), ResultCodeEnum.UNWILLING_TO_PERFORM );
}
Collection<Authenticator> authenticators = getAuthenticators( level.getName() );
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java?rev=678888&r1=678887&r2=678888&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/Authenticator.java Tue Jul 22 13:35:10 2008
@@ -21,7 +21,6 @@
import javax.naming.Context;
-import javax.naming.NamingException;
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.interceptor.context.BindOperationContext;
Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java?rev=678888&r1=678887&r2=678888&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/operations/bind/SimpleBindITest.java Tue Jul 22 13:35:10 2008
@@ -378,7 +378,7 @@
catch ( OperationNotSupportedException onse )
{
// Error code 53 : LDAP_UNWILLING_TO_PERFORM
- assertTrue( true );
+ assertTrue( onse.getMessage().startsWith( "[LDAP: error code 53 - Bind failed" ) );
}
catch ( NamingException ne )
{