Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/auth/plain/Authenticator.java @ 2985:1f64ee424f92
Corrected broken web.xml
flys-client/trunk@4996 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 13 Jul 2012 13:51:58 +0000 |
parents | cc126abafeab |
children | 71ba3cf3ec5e |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/auth/plain/Authenticator.java Fri Jul 13 13:38:32 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/auth/plain/Authenticator.java Fri Jul 13 13:51:58 2012 +0000 @@ -12,9 +12,14 @@ import java.util.ArrayList; import java.util.List; +import org.apache.log4j.Logger; + public class Authenticator implements de.intevation.flys.client.server.auth.Authenticator { + private static final Logger log = + Logger.getLogger(Authenticator.class); + public static class Authentication implements de.intevation.flys.client.server.auth.Authentication { @@ -71,6 +76,7 @@ { File file = credentialsFile(); if (!file.canRead() || !file.isFile()) { + log.error("cannot find user file '" + file + "'"); return new Authentication(null, null, new ArrayList<String>(0)); } @@ -89,6 +95,7 @@ continue; } if (parts[0].equals(username)) { + log.debug("user '" + username + "' found."); if (parts[1].equals(password)) { List<String> roles = new ArrayList<String>(parts.length - 2); @@ -97,6 +104,7 @@ roles.add(parts[i]); } + log.debug("success"); return new Authentication(username, password, roles); } // Stop: user found, wrong password @@ -107,6 +115,7 @@ finally { reader.close(); } + log.debug("failed"); return new Authentication(null, null, new ArrayList<String>(0)); } }