You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/07 18:15:45 UTC

svn commit: r702529 - /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java

Author: gnodet
Date: Tue Oct  7 09:15:45 2008
New Revision: 702529

URL: http://svn.apache.org/viewvc?rev=702529&view=rev
Log:
Remove logging of credentials

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java?rev=702529&r1=702528&r2=702529&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/security/auth/impl/JAASAuthenticationService.java Tue Oct  7 09:15:45 2008
@@ -47,7 +47,7 @@
                              final String user, 
                              final Object credentials) throws GeneralSecurityException {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Authenticating '" + user + "' with '" + credentials + "'");
+            LOG.debug("Authenticating '" + user);
         }
         LoginContext loginContext = new LoginContext(domain, subject, new CallbackHandler() {
             public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
@@ -64,9 +64,16 @@
                 }
             }
         });
-        loginContext.login();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Authenticating " + user + " successfully");
+        try {
+            loginContext.login();
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Authenticating " + user + " successfully");
+            }
+        } catch (GeneralSecurityException e) {
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Error authenticating " + user, e);
+            }
+            throw e;
         }
     }