美好的一天,
我想在我的 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
?