@Override
    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                                        Authentication authentication) throws ServletException, IOException {
        log.debug("Authentication success");
        // TODO: Optimize
        Map<String, Object> result = new HashMap<>(1);
        result.put("redirect", sitProperties.redirect());
        JSONWriter.write(response, HttpStatus.OK, Result.ok(result));
    }
@Override
    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
                                        Authentication authentication) throws ServletException, IOException {
        log.debug("Authentication success");
       
        Map<String, Object> result = new HashMap<>(1);
        result.put("redirect", sitProperties.redirect());
        JSONWriter.write(response, HttpStatus.OK, Result.ok(result));
    }
@override public void onauthenticationsuccess(httpservletrequest request, httpservletresponse response, authentication authentication) throws servletexception, ioexception { log.debug("authentication success"); map<string, object> result = new hashmap<>(1); result.put("redirect", sitproperties.redirect()); jsonwriter.write(response, httpstatus.ok, result.ok(result)); }