![](/img/trans.png)
[英]How can I customize exception mappings of default AuthenticationEventPublisher in Grails Spring Security Plugin
背景: 在我的項目中,我需要通過擴展DaoAuthenticationProvider來實現雙因素身份驗證(通過將 OTP 發送到注冊電子郵件)。 為了確定 OTP 身份驗證失敗的原因,我的自定義身份驗證提供程序拋出新的自定義異常,例如BadOtpException 、 ExpiredOtpExce ...