Revize 06a05d68
Přidáno uživatelem Jakub Šmíd před asi 3 roky(ů)
backend/src/main/java/cz/zcu/kiv/backendapi/security/jwt/JwtUtils.java | ||
---|---|---|
95 | 95 |
* @throws IOException I/O exception |
96 | 96 |
*/ |
97 | 97 |
public void writeErrorToResponse(HttpServletResponse response, Exception e) throws IOException { |
98 |
response.setStatus(HttpStatus.FORBIDDEN.value());
|
|
98 |
response.setStatus(HttpStatus.UNAUTHORIZED.value());
|
|
99 | 99 |
Map<String, String> error = new HashMap<>(); |
100 | 100 |
error.put("error_message", e.getMessage()); |
101 | 101 |
response.setContentType(MediaType.APPLICATION_JSON_VALUE); |
Také k dispozici: Unified diff
Changed bad JWT response to HTTP status 401 from 403