// TODO: Optimize
@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));
    }
Authentication authentication) throws ServletException, IOException {
log.debug("Authentication success");
// TODO: Optimize
Map<String, Object> result = new HashMap<>(1);
result.put("redirect", sitProperties.redirect());
@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");
// TODO: Optimize
Map<String, Object> result = new HashMap<>(1);
result.put("redirect", sitProperties.redirect());
JSONWriter.write(response, HttpStatus.OK, Result.ok(result));
}