Update of /var/cvs/src/org/mmbase/security/implementation/context
In directory james.mmbase.org:/tmp/cvs-serv10090/context

Modified Files:
        ClassLogin.java ContextLoginModule.java 
Log Message:
just clarified some logging


See also: 
http://cvs.mmbase.org/viewcvs/src/org/mmbase/security/implementation/context


Index: ClassLogin.java
===================================================================
RCS file: 
/var/cvs/src/org/mmbase/security/implementation/context/ClassLogin.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ClassLogin.java     1 Oct 2008 16:57:34 -0000       1.9
+++ ClassLogin.java     3 Nov 2008 18:42:49 -0000       1.10
@@ -19,7 +19,7 @@
  * ClassLogin, authentication based on 'class', using 
<security>/classauthentication.xml or ClassAuthenticationWrapper.
  *
  * @author Michiel Meeuwissen
- * @version $Id: ClassLogin.java,v 1.9 2008/10/01 16:57:34 michiel Exp $
+ * @version $Id: ClassLogin.java,v 1.10 2008/11/03 18:42:49 michiel Exp $
  * @since MMBase-1.8
  */
 
@@ -33,8 +33,8 @@
             throw new SecurityException("Class authentication failed  '" + 
userLoginInfo + "' (class not authorized)");
         }
         // get username
-        String userName = li.getMap().get("username");
-        String reqRank  = li.getMap().get("rank");
+        final String userName = li.getMap().get("username");
+        final String reqRank  = li.getMap().get("rank");
         if(userName == null && reqRank == null) throw new 
org.mmbase.security.SecurityException("expected the property 'username' and/or 
'rank' with login");
 
         if ("anonymous".equals(reqRank) && userName == null) {
@@ -43,17 +43,17 @@
 
         org.w3c.dom.Element node = getAccount(userName, null, reqRank);
         if(node == null) {
-            log.info("No user with name '" + userName + "' and rank '" + 
reqRank + "'");
+            log.warn("No user with name '" + userName + "' and rank '" + 
reqRank + "' " + userLoginInfo + " " + li.getMap());
             return null;
         }
-        userName = node.getAttribute("name");
+        String un = node.getAttribute("name");
 
-        Rank rank= getRank(userName, null);
+        Rank rank= getRank(un, null);
         if(rank == null) {
-            log.warn( "expected a rank for user with name '" + userName + "', 
canceling a valid login due to the fact that the rank attribute was not set");
+            log.warn( "expected a rank for user with name '" + un + "', 
canceling a valid login due to the fact that the rank attribute was not set");
             return null;
 
         }
-        return getValidUserContext(userName, rank);
+        return getValidUserContext(un, rank);
     }
 }


Index: ContextLoginModule.java
===================================================================
RCS file: 
/var/cvs/src/org/mmbase/security/implementation/context/ContextLoginModule.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- ContextLoginModule.java     23 Sep 2008 16:29:07 -0000      1.23
+++ ContextLoginModule.java     3 Nov 2008 18:42:49 -0000       1.24
@@ -26,7 +26,7 @@
  * @javadoc
  *
  * @author Eduard Witteveen
- * @version $Id: ContextLoginModule.java,v 1.23 2008/09/23 16:29:07 michiel 
Exp $
+ * @version $Id: ContextLoginModule.java,v 1.24 2008/11/03 18:42:49 michiel 
Exp $
  */
 
 public abstract class ContextLoginModule {
@@ -146,9 +146,9 @@
 
         if(found == null) {
             if (rank != null) {
-                log.warn("No user with rank '" + rank + "' " + (userName != 
null ? "and username '" + userName + "'": "") + "was not found for identify 
type: '" + identifyType  + "'");
+                log.warn("No user with rank '" + rank + "' " + (userName != 
null ? "and username '" + userName + "'": "") + " was not found for identify 
type: '" + identifyType  + "'", new Exception());
             } else {
-                log.warn("No user with username '" + userName + "' was not 
found for identify type: '" + identifyType  + "'");
+                log.warn("No user with username '" + userName + "' was found 
for identify type: '" + identifyType  + "'");
             }
             return null;
         }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to