# HG changeset patch # User Felix Wolfsteller # Date 1338736315 0 # Node ID 6c613c9f3a51f1bc7950d3253019183ae4919cab # Parent 55ea5474e11ee001810b99258526a65bc31f08e4 Stub for A&A Servlet Filter. flys-client/trunk@4572 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 55ea5474e11e -r 6c613c9f3a51 flys-client/ChangeLog --- a/flys-client/ChangeLog Fri Jun 01 12:47:03 2012 +0000 +++ b/flys-client/ChangeLog Sun Jun 03 15:11:55 2012 +0000 @@ -1,7 +1,13 @@ +2012-06-03 Felix Wolfsteller + + * src/main/java/de/intevation/flys/client/server/GGinAFilter.java: + New. Stub for upcoming authentication and authorization servlet + filter. + 2012-06-01 Sascha L. Teichmann - * src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java: - Fixed descriptions of Q sectors. + * src/main/java/de/intevation/flys/client/client/ui/fixation/FixGaugeSelectPanel.java: + Fixed descriptions of Q sectors. 2012-06-01 Raimund Renkert diff -r 55ea5474e11e -r 6c613c9f3a51 flys-client/src/main/java/de/intevation/flys/client/server/GGInAFilter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/GGInAFilter.java Sun Jun 03 15:11:55 2012 +0000 @@ -0,0 +1,69 @@ +package de.intevation.flys.client.server; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; + + +/** ServletFilter used for GGInA authentification and certain authorisation. */ +public class GGInAFilter implements Filter { + + /** Private logger. */ + private static Logger logger = Logger.getLogger(GGInAFilter.class); + + public static final String LOG4J_PROPERTIES = "FLYS_CLIENT_LOG4J_PROPERIES"; + + + /** + * Initialize. + */ + @Override + public void init(FilterConfig config) + throws ServletException + { + System.out.println("GGInAFilter.init"); + } + + + /** + * Called when filter in chain invoked. + * @param req request to servlet + * @param resp response of servlet + * @param chain the filter chain + */ + @Override + public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) + throws IOException, ServletException + { + /* + String userAgent = ((HttpServletRequest) req).getHeader("User-Agent"); + // Redirect + ((HttpServletResponse) resp).sendRedirect(this.geh,gina); + */ + System.out.println("GGInAFilter.doFilter"); + logger.debug("GGInAFilter.doFilter"); + chain.doFilter(req, resp); + return; + } + + + /** + * Do nothing at destruction. + */ + @Override + public void destroy() { + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :