如何覆盖 AbstractUserDetailsReactiveAuthenticationManager

时间:2021-01-20 14:56:27

标签: spring-boot spring-security spring-webflux

在具有反应式编程的 Spring security 5 中,我想记录所有登录尝试,包括失败的登录尝试,我不是通过登录表单来执行此操作,而是仅通过 http 基本身份验证..

我发现这样做的方法是覆盖 AbstractUserDetailsReactiveAuthenticationManager#preAuthenticationChecks

但现在该字段的 setter 已不复存在。我们只能设置postAuthenticationChecks。

我想知道为什么会这样?在 AbstractUserDetailsReactiveAuthenticationManager

中仍然存在 setPreAuthenticationChecks

您如何以反应方式记录失败的登录尝试,我尝试使用 google 搜索,但在 http 基本身份验证的反应领域中找不到任何内容。

0 个答案:

没有答案