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 2005/11/19 10:08:50 UTC

svn commit: r345643 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java

Author: elecharny
Date: Sat Nov 19 01:08:46 2005
New Revision: 345643

URL: http://svn.apache.org/viewcvs?rev=345643&view=rev
Log:
Added a logger

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java?rev=345643&r1=345642&r2=345643&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authn/SimpleAuthenticator.java Sat Nov 19 01:08:46 2005
@@ -30,6 +30,8 @@
 import org.apache.ldap.server.partition.DirectoryPartitionNexusProxy;
 import org.apache.ldap.server.invocation.Invocation;
 import org.apache.ldap.server.invocation.InvocationStack;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.HashSet;
 import java.util.Collections;
@@ -45,6 +47,8 @@
  */
 public class SimpleAuthenticator extends AbstractAuthenticator
 {
+    private static final Logger log = LoggerFactory.getLogger( SimpleAuthenticator.class );
+
     private static final Collection USERLOOKUP_BYPASS;
 
     static
@@ -118,6 +122,7 @@
         try
         {
             userEntry = proxy.lookup( principalDn, new String[] {"userPassword"}, USERLOOKUP_BYPASS );
+            
             if ( userEntry == null )
             {
                 throw new LdapAuthenticationException( "Failed to lookup user for authentication: " + principal );
@@ -125,6 +130,7 @@
         }
         catch( Exception cause )
         {
+            log.error( cause.getMessage() );
             LdapAuthenticationException e = new LdapAuthenticationException();
             e.setRootCause( e );
             throw e;