Class HTTPRequestHeadersFilter
java.lang.Object
org.odpi.openmetadata.tokenmanager.http.HTTPRequestHeadersFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
HTTPRequestHeadersFilter is a Java Servlet Filter that receives a list of http header names which are then
saved from the request in HTTPHeadersThreadLocal.
-
Constructor Details
-
HTTPRequestHeadersFilter
Constructor- Parameters:
headerNames
- list of http header names
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
init
in interfacejakarta.servlet.Filter
- Throws:
jakarta.servlet.ServletException
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException This call is run during the processing of an HTTP request. It copies the authorization headers into ThreadLocal storage.- Specified by:
doFilter
in interfacejakarta.servlet.Filter
- Parameters:
servletRequest
- theServletRequest
object contains the client's requestservletResponse
- theServletResponse
object contains the filter's responsefilterChain
- theFilterChain
for invoking the next filter or the resource- Throws:
IOException
- problem accessing the http requestjakarta.servlet.ServletException
- problem with the servlet
-