Spring 3 : Can't find AuthenticationProcessingFilter

半腔热情 提交于 2019-12-05 05:27:22

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!