Class IPFilter

All Implemented Interfaces:
jakarta.servlet.Filter

public class IPFilter extends AbstractFilter
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

    • IPFilter

      public IPFilter()
  • Method Details

    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      This filter is being used for accessing applications REST API so that return valid is if {@link #isAllowed) or it's coming from isNodeCommunicationTokenValid Check the {@code RestProxyFilter} for getting more information about isNodeCommunicationTokenValid
      Throws:
      IOException
      jakarta.servlet.ServletException
    • isAllowed

      public boolean isAllowed(String remoteIPAddress)
      Test if a remote's IP address is allowed to proceed.
      Parameters:
      remoteIPAddress - The remote's IP address, as a string
      Returns:
      true if allowed