KEYCLOAK-12969 Don't use GenericFilter in server-authz test application

This commit is contained in:
mhajas 2020-02-12 15:41:06 +01:00 committed by Pedro Igor
parent 7a3998870c
commit 167f73f54e

View file

@ -17,8 +17,9 @@
package org.keycloak.testsuite.servletauthz;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.GenericFilter;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@ -32,10 +33,16 @@ import org.keycloak.util.JsonSerialization;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class TestFilter extends GenericFilter {
public class TestFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
throws IOException {
HttpServletRequest req = (HttpServletRequest) request;
if (req.getRequestURI().endsWith("/body")) {
@ -46,4 +53,10 @@ public class TestFilter extends GenericFilter {
writer.flush();
}
}
@Override
public void destroy() {
}
}