2

I am using Spring Security and would like to use authentication providers for 'one time password' and 'security questions'. The number of allowed failures for one time password and security questions is limited.

So far the authentication providers works fine but for the enduser it would be nice to know if he has typed in the wrong 'one time password' or the limit of allowed failures is exceeded. But I have only the possiblity to throw an AuthenticationException within my authentication provider.

Any ideas?

Thanks, Ralph

4

1 回答 1

1

您可以继承 AuthenticationException,然后编写自定义 [extend] ExceptionTranslationFilter 来处理您的新异常。

于 2009-03-19T16:07:10.520 回答