class AuthFilter implements Filter {

    @Override
    public void init(FilterConfig fc) throws ServletException {
        //Do Nothing
    }

    @Override
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain fc) throws IOException, ServletException {<FILL_FUNCTION_BODY>}

    @Override
    public void destroy() {
        //Do nothing
    }

}

        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) res;

        if (!request.getRequestURI().contains("/login") && !request.getRequestURI().contains("/acd/appconfig")) {
            RequestDispatcher dispatcher;
            HttpSession session = request.getSession();
            if (session != null) {
                if (session.getAttribute("authName") == null || session.getAttribute("authRole") == null) {
                    response.sendRedirect("/login");
                    return;
                }

            } else {
                request.setAttribute("fail_msg", "Session timed out!");
                dispatcher = request.getRequestDispatcher("/Login");
                dispatcher.forward(request, response);
                return;
            }
        }

        fc.doFilter(req, res);
    
<no_super_class>