@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
// if(isRpcRequest(request, response, authentication)) {
response.setStatus(HttpServletResponse.SC_OK);
if (authentication instanceof MyAuthenticationToken) {
LoggedUser user = ((MyAuthenticationToken) authentication).getMyUser();
response.getWriter().write(user.getResponseUser().toJSON());
}
response.getWriter().flush();
//}else {
// super.onAuthenticationSuccess(request, response, authentication);