Marouane Gazanayi
Marouane Gazanayi

Reputation: 5183

Spring 3 : Can't find AuthenticationProcessingFilter

I'm not able to find AuthenticationProcessingFilter when migrating from Spring 2 to Spring 3 (using spring-core)

Upvotes: 7

Views: 6972

Answers (2)

Eshaan Kumar
Eshaan Kumar

Reputation: 69

If you're looking for constants which were available in spring 3 in AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY That is no longer available in that class.

Alternative is spring has added WebAttributes class org.springframework.security.web.WebAttributes in which you can get the same exception using the below code - session[WebAttributes.AUTHENTICATION_EXCEPTION]

In WebAttributes AUTHENTICATION_EXCEPTION is string defined as below WebAttributes.AUTHENTICATION_EXCEPTION = "SPRING_SECURITY_LAST_EXCEPTION_KEY"

Hopefully this helps.

Upvotes: 0

Arnaud Gourlay
Arnaud Gourlay

Reputation: 4666

This class has been renamed to UsernamePasswordAuthenticationFilter in Spring security 3.x.

ref : http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/web/authentication/AuthenticationProcessingFilter.html

Upvotes: 9

Related Questions