[FIX] Error 403 instead of 401 when no role found in token.
This commit is contained in:
parent
106e64a90c
commit
8c46d9b441
@ -174,7 +174,7 @@ public class AuthenticationFilter implements ContainerRequestFilter {
|
||||
if (!haveRight) {
|
||||
LOGGER.error("REJECTED not enought right : {} require: {}", requestContext.getUriInfo().getPath(), roles);
|
||||
requestContext
|
||||
.abortWith(Response.status(Response.Status.UNAUTHORIZED).entity("Not enought RIGHT !!!").build());
|
||||
.abortWith(Response.status(Response.Status.FORBIDDEN).entity("Not enought RIGHT !!!").build());
|
||||
return;
|
||||
}
|
||||
requestContext.setSecurityContext(userContext);
|
||||
|
Loading…
x
Reference in New Issue
Block a user