java - Spring Implementing an AuthenticationListener -


i getting frustrated creating authenticationfailurehandler. it’s setup killing me. cannot handler fired when user enters in incorrect login credentials. think it’s declaring bean incorrectly knows @ point.

i have following class:

public class authenticationlistener implements authenticationfailurehandler {     @override     public void onauthenticationfailure(httpservletrequest request,         httpservletresponse response, authenticationexception ae)         throws ioexception, servletexception {          system.out.println("it gets authetificationlistener");      } } 

and in securityconfig have following declaration:

@bean authenticationfailurehandler authenticationlistener() {     system.out.println(":: :: instantiating authentication failure handler :: ::");     return new authenticationlistener(); } 

the logs prints ":: instantiating authentication failure handler ::” not "it gets authetificationlistener”. appreciated.

ultimately, catch bad credentials can store failed attempts in database , force them reset password after amount.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -