views:

493

answers:

1

For some reason the authoritieObject I was expecting at my vote() method is an instance of FilterInvocation, and I needed a MethodInvocation. Can't figure out why this is happening.

My web.xml is the following:

    <filter>
 <filter-name>springSecurityFilterChain</filter-name>
 <filter-class>
  org.springframework.web.filter.DelegatingFilterProxy
 </filter-class>
</filter>
<filter-mapping>
 <filter-name>springSecurityFilterChain</filter-name>
 <url-pattern>/*</url-pattern>
</filter-mapping>

my applicationContext:

<b:bean id="_methodDefinitionSourceAdvisor" class="org.springframework.security.intercept.method.aopalliance.MethodDefinitionSourceAdvisor">
 <b:constructor-arg value="_methodSecurityInterceptor" />
 <b:constructor-arg ref="_delegatingMethodDefinitionSource" />
</b:bean>

where MethodSecurityInterceptor is defined like this:

    <b:bean id="_methodSecurityInterceptor" class="org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor">
...

    </b:bean>

and delegatingMethodDefinitionSource, like this:

    <b:bean id="_delegatingMethodDefinitionSource" class="org.springframework.security.intercept.method.DelegatingMethodDefinitionSource">
...

    </bean>

Any clue? I could really use a little help!

A: 

I had to put a missing <aspectj:autoproxy/> tag on the configuration xmls. This makes the beans autoproxied by the security interceptor.

Rodrigo Gama

related questions