Spring Security - 特定角色的两因素身份验证

时间:2021-06-03 12:21:10

标签: java spring spring-mvc spring-security

美好的一天,

我想在我的 AuthenticationFilter 中添加一个 2FA:

public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter {
    @Override
    public Authentication attemptAuthentication(HttpServletRequest request,
            HttpServletResponse response)
            throws AuthenticationException {
        
        return super.attemptAuthentication(request, response);
    }
}

我想在成功登录某个角色后申请 2FA。我的问题是我应该将 2FA 放在哪里以及如何重定向到 /2faValidation.html

0 个答案:

没有答案