[Yanel-commits] rev 30323 - public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl

michi at wyona.com michi at wyona.com
Sun Jan 13 09:34:41 CET 2008


Author: michi
Date: 2008-01-13 09:34:37 +0100 (Sun, 13 Jan 2008)
New Revision: 30323

Modified:
   public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java
Log:
debug statements fixed

Modified: public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java
===================================================================
--- public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java	2008-01-13 00:15:22 UTC (rev 30322)
+++ public/yanel/trunk/src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java	2008-01-13 08:34:37 UTC (rev 30323)
@@ -55,6 +55,7 @@
             Realm realm = map.getRealm(request.getServletPath());
             String path = map.getPath(realm, request.getServletPath());
             //Realm realm = map.getRealm(new Path(request.getServletPath()));
+            if (log.isDebugEnabled()) log.debug("Generic WebAuthenticator called for realm path " + path);
 
             // HTML Form based authentication
             String loginUsername = request.getParameter("yanel.login.username");
@@ -91,9 +92,11 @@
                 log.warn("OpenID implementation not finished yet: [" + openID + "]");
                 getXHTMLAuthenticationForm(request, response, realm, "Login failed because OpenID implementation is not finished yet!", reservedPrefix, xsltLoginScreenDefault, servletContextRealPath, sslPort, map);
                 return response;
+            } else {
+                if (log.isDebugEnabled()) log.debug("No form based authentication request.");
             }
 
-            // Neutron-Auth based authentication
+            // Check for Neutron-Auth based authentication
             String yanelUsecase = request.getParameter("yanel.usecase");
             if(yanelUsecase != null && yanelUsecase.equals("neutron-auth")) {
                 log.debug("Neutron Authentication ...");
@@ -142,6 +145,7 @@
                         response.setContentType("text/plain; charset=" + YanelServlet.DEFAULT_ENCODING);
                         response.setStatus(response.SC_OK);
 
+                        if (log.isDebugEnabled()) log.debug("Neutron Authentication successful.");
                         PrintWriter writer = response.getWriter();
                         writer.print("Neutron Authentication Successful!");
                         return response;
@@ -222,9 +226,11 @@
                     return response;
                 }
             } else {
-                log.debug("Neutron Authentication successful.");
-                return null;
+                if (log.isDebugEnabled()) log.debug("No Neutron based authentication request.");
             }
+
+            if (log.isDebugEnabled()) log.debug("TODO: Was this authentication request really necessary!");
+            return null;
         } catch (Exception e) {
             log.error(e.getMessage(), e);
             throw new ServletException(e.getMessage(), e);



More information about the Yanel-commits mailing list