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
Post a Comment