Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java @ 3696:a050cb5f303f
Cosmetics
flys-client/trunk@5395 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Sat, 08 Sep 2012 11:26:30 +0000 |
parents | 56f17c6c6288 |
children | 2e12518ff5b4 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Fri Sep 07 15:58:10 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/LoginServlet.java Sat Sep 08 11:26:30 2012 +0000 @@ -49,7 +49,8 @@ @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { + throws ServletException, IOException + { String encoding = req.getCharacterEncoding(); String username = req.getParameter("username"); String password = req.getParameter("password"); @@ -59,11 +60,13 @@ if (username == null || password == null) { logger.debug("No username or password provided"); this.redirectFailure(resp); + return; } + try { Authentication aresp = this.auth(username, password, encoding); if (aresp == null || !aresp.isSuccess()) { - logger.debug("Athentication not successful"); + logger.debug("Authentication not successful"); this.redirectFailure(resp); } User user = aresp.getUser(); @@ -91,7 +94,8 @@ } private Authentication auth(String username, String password, String encoding) - throws AuthenticationException, IOException { + throws AuthenticationException, IOException + { ServletContext sc = this.getServletContext(); Features features = (Features)sc.getAttribute(Features.CONTEXT_ATTRIBUTE); String auth = sc.getInitParameter("authentication");