Results 1 to 2 of 2

Thread: Minor improvement to FilterToBeanProxy

  1. #1
    Join Date
    Feb 2005
    Location
    Warwickshire, UK
    Posts
    148

    Default Minor improvement to FilterToBeanProxy

    I'd like to suggest a small improvement to FilterToBeanProxy that would help make my configuration easier and terser.

    Currently you must supply an init param for the name or class of bean to be proxied.

    If no init-param is specified, why not use the name of the filter as a default?

    eg. in web.xml

    Code:
      <filter>
        <filter-name>someBean</filter-name>
        <filter-class>....BeanProxyFilter</filter-class>
      </filter>
    in applicationContext.xml

    Code:
    <bean id="someBean" class="...SomeFilterClass">
    By the way, FilterToBeanProxy is tremendously useful and I use it for many things other than Acegi. Any plans to move it to the Spring Core/Web?

    -Dave

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    If you contribute a patch, sure, we'll add it.

    However, in CVS (and from 0.8.0) there's a far more powerful FilterChainProxy class. You'll thus only have one FilterToBeanProxy - which loads the FilterChainProxy - and it takes care of the rest.

    Here's an example of the syntax this new filter offers:

    Code:
    <bean id="filterChainProxy" class="net.sf.acegisecurity.util.FilterChainProxy">
     <property name="filterInvocationDefinitionSource">
       <value>
         CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
         PATTERN_TYPE_APACHE_ANT
         /webServices/**=basicProcessingFilter,httpSessionIntegrationFilter,securityEnforcementFilter
         /**=authenticationProcessingFilter,httpSessionIntegrationFilter,securityEnforcementFilter
       </value>
     </property>
    </bean>

Similar Threads

  1. Replies: 5
    Last Post: Apr 14th, 2006, 07:31 AM
  2. Replies: 3
    Last Post: Jan 19th, 2005, 03:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •