Class ClientInfoFilter

java.lang.Object
org.codice.ddf.pax.web.jetty.ClientInfoFilter
All Implemented Interfaces:
org.codice.ddf.platform.filter.http.HttpFilter, org.codice.ddf.platform.filter.SecurityFilter

public class ClientInfoFilter extends Object implements org.codice.ddf.platform.filter.http.HttpFilter, org.codice.ddf.platform.filter.SecurityFilter
This servlet filter extracts client-specific information and places it in the shiro ThreadContext so it can be forwarded to useful areas of interest. Also contains the constants for working with the client info map.

The information currently all comes from the servlet API; specifically a select few getters within ServletRequest. The format of the keys follows the format of java beans. The keys are camel-cased names without the preceeding 'get' found in the method name.

For example, the key associated with ServletRequest.getRemoteAddr() would be the string remoteAddr.

The only exception to this rule, ThreadContextProperties.CLIENT_INFO_KEY, which holds a value string of client-info, is the key used to access the entire client information map. It may contain different kinds of data that does not necessarily correlate to the servlet API.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.codice.ddf.platform.filter.http.HttpFilterChain filterChain)
     
    void
    doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain filterChain)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClientInfoFilter

      public ClientInfoFilter()
  • Method Details

    • doFilter

      public void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.codice.ddf.platform.filter.http.HttpFilterChain filterChain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface org.codice.ddf.platform.filter.http.HttpFilter
      Throws:
      IOException
      javax.servlet.ServletException
    • init

      public void init()
      Specified by:
      init in interface org.codice.ddf.platform.filter.SecurityFilter
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain filterChain) throws IOException, org.codice.ddf.platform.filter.AuthenticationException
      Specified by:
      doFilter in interface org.codice.ddf.platform.filter.SecurityFilter
      Throws:
      IOException
      org.codice.ddf.platform.filter.AuthenticationException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.codice.ddf.platform.filter.SecurityFilter