token auth filter now only catches badcredentialsexception instead of all exceptions. This prevents it from absorbing ALL exception stacktraces
This commit is contained in:
parent
493d3cd079
commit
ea4b2eb1b1
@ -110,7 +110,7 @@ public class TokenAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
filterChain.doFilter(request, response);
|
filterChain.doFilter(request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception e) {
|
catch (BadCredentialsException e) {
|
||||||
response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_VALUE);
|
response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN_VALUE);
|
||||||
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
|
||||||
// response.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage());
|
// response.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage());
|
||||||
|
Loading…
Reference in New Issue
Block a user