【问题标题】:UsernamePasswordAuthenticationFilter Spring Security 2.0.8用户名密码验证过滤器 Spring Security 2.0.8
【发布时间】:2016-04-30 08:57:40
【问题描述】:

我正在尝试将使用 Spring-Security 3.x 开发的自定义旧式身份验证提供程序降级到 2.0.8。

我的身份验证机制使用“用户和密码表单登录...”

遗留项目使用 UsernamePasswordAuthenticationFilter 类的自定义扩展作为 Spring Security Filter

public class AuthenticationProcessingFilter extends UsernamePasswordAuthenticationFilter {

    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) {
     ...
    }
}

但 Spring Security 2.0.8 不提供该类。

那么有没有 UsernamePasswordAuthenticationFilter 的有效替代方案,还是让我使用经典的 SpringSecurityFilter?

谢谢

【问题讨论】:

    标签: spring spring-security forms-authentication


    【解决方案1】:

    自己找 org.springframework.security.ui.webapp.AuthenticationProcessingFilter;

    【讨论】:

      猜你喜欢
      • 2011-11-15
      • 2021-03-18
      • 1970-01-01
      • 2012-09-12
      • 2012-02-08
      • 2017-08-28
      • 2019-05-20
      • 1970-01-01
      • 2018-06-27
      相关资源
      最近更新 更多