Announcement Announcement Module
Collapse
No announcement yet.
FilterChainProxy and included requests. Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FilterChainProxy and included requests.

    Hi,

    I'm trying to use the FilterChainProxy on included requests.

    Unfortunately the FilterInvocationDefinitionSource uses the Request URL, rather than the included URL for working out which filters to apply.

    I was wondering what the best way of extending this would be. I guess if FilterChainProxy used a factory method for the "new FilterInvocation()" in doFilter I could override it to return a FilterInvocation that gave the included URL for the when asked for the request URL. Any other suggestions?

    David

    In my web.xml I have:

    <filter>
    <filter-name>includeFilter</filter-name>
    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
    <param-name>targetBean</param-name>
    <param-value>includeFilter</param-value>
    </init-param>
    </filter>


    <filter-mapping>
    <filter-name>includeFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

    In applicationProperties.xml I have:

    <bean id="includeFilter"
    class="org.acegisecurity.util.FilterChainProxy">
    <property name="filterInvocationDefinitionSource">
    <value>
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    /public/cache/.*=cachingFilter
    </value>
    </property>
    </bean>

    and I'm using acegi 1.0.3.

  • #2
    I've come up with a solution to this. I'm not sure that it's the best way, but if anyone wants the code, I've put up a web page about it. IncludedFilterChainProxy.java

    Comment

    Working...
    X