Hi,
I have written a custom filter to be executed when the user submits the
credentials. The filter executes before authentication and after the user is
authenticated which is the part I'm interested in.
After the chain.doFilter(request, response) I expect finding the Authentication
object in the spring SecurityContext to count the number of authentication
failures and forward and apply an action (a delay or a forward to a warning
page) with the following method:
SecurityContextHolder.getContext().getAuthentication()
The thing is that I get a null.
It is declared like this:
At the end of my web.xml:
<filter>
<display-name>PolicyFilter</display-name>
<filter-name>policyFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>policyFilter</filter-name>
<url-pattern>/login</url-pattern>
</filter-mapping>
And in my securityContext.xml I have the bean declared like this:
<bean id="policyFilter" class="edu.xxx.cas.PolicyFilter"/>
What I'm doing wrong?
Thank you very much in advance!
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user