我需要自定义消息,所以我试图通过简单地覆盖grails .plugin.springsecurity.LoginController来修改LoginController
我从我的customizedAuthenticationProvider中抛出了AccountNotApprovedException。
有人可以建议我我所缺少的吗?
class AccountNotApprovedException extends AuthenticationException{
public AccountNotApprovedException(String message, Throwable t) {
super(message, t)
}
public AccountNotApprovedException(String message) {
super(message)
}
/** @deprecated */
@Deprecated
public AccountNotApprovedException(String message, Object extraInformation) {
super(message, extraInformation)
}
}
我覆盖了loginController:-
class LoginController extends grails.plugin.springsecurity.LoginController {
def authenticationTrustResolver
/**
* Dependency injection for the springSecurityService.
*/
def springSecurityService
def authfail() {
//my customized code
}
}
当springSecurity运行时,它没有调用覆盖的authFail()