Skip to content

Commit

Permalink
Merge pull request #63 from buehner/fix-auth-bug
Browse files Browse the repository at this point in the history
looks good; fix needed in order to get JSON response by j_spring_security_check after logging in
  • Loading branch information
ahennr committed Jul 16, 2015
2 parents bb300bf + ee4c3b9 commit 0221585
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public void sendRedirect(HttpServletRequest httpServletRequest,
});
super.successfulAuthentication(request, response, authResult);

// set content type
response.setContentType("application/json;charset=UTF-8");

// build a comma separated string of the ROLES
String authorityText = StringUtils.join(authResult.getAuthorities(), ",");

Expand All @@ -109,8 +112,8 @@ public void sendRedirect(HttpServletRequest httpServletRequest,
} catch (IOException e) {
throw e;
} finally {
IOUtils.closeQuietly(out);
IOUtils.closeQuietly(jsonGenerator);
IOUtils.closeQuietly(out);
}
}

Expand Down

0 comments on commit 0221585

Please sign in to comment.