Class SecurityBasedIgnoreFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.broadleafcommerce.common.web.filter.SecurityBasedIgnoreFilter
All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware

@Component("blSecurityBasedIgnoreFilter") public class SecurityBasedIgnoreFilter extends org.springframework.web.filter.GenericFilterBean implements org.springframework.core.Ordered
Sets a request attribute that informs all concerned Broadleaf filters that they should pass the request through and ignore all normal operation. This implementation makes it's determination based on whether or not Spring Security is configured to ignore the requested URI.
Author:
Jeff Fischer
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.security.web.FilterChainProxy
     

    Fields inherited from class org.springframework.web.filter.GenericFilterBean

    logger

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain)
     
    int
     
    void
    init(org.springframework.context.event.ContextRefreshedEvent event)
     

    Methods inherited from class org.springframework.web.filter.GenericFilterBean

    addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

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

    • springSecurity

      protected org.springframework.security.web.FilterChainProxy springSecurity
  • Constructor Details

    • SecurityBasedIgnoreFilter

      public SecurityBasedIgnoreFilter()
  • Method Details

    • init

      @EventListener(org.springframework.context.event.ContextRefreshedEvent.class) public void init(org.springframework.context.event.ContextRefreshedEvent event)
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered