Commit 30967e2f7ac54df5c32553e0c6cadda223ada181
1 parent
c39565d5
Exists in
master
Ajuste no content-type do response
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/AuthenticationExceptionMapper.java
| ... | ... | @@ -7,11 +7,12 @@ import javax.ws.rs.ext.ExceptionMapper; |
| 7 | 7 | import javax.ws.rs.ext.Provider; |
| 8 | 8 | |
| 9 | 9 | import br.gov.frameworkdemoiselle.security.AuthenticationException; |
| 10 | + | |
| 10 | 11 | @Provider |
| 11 | 12 | public class AuthenticationExceptionMapper implements ExceptionMapper<AuthenticationException> { |
| 12 | 13 | |
| 13 | 14 | @Override |
| 14 | 15 | public Response toResponse(AuthenticationException exception) { |
| 15 | - return Response.status(SC_UNAUTHORIZED).entity(exception.getMessage()).build(); | |
| 16 | + return Response.status(SC_UNAUTHORIZED).entity(exception.getMessage()).type("text/plain").build(); | |
| 16 | 17 | } |
| 17 | 18 | } | ... | ... |