diff --git a/src/main/java/com/covas/Resources/TokenRessource.java b/src/main/java/com/covas/Resources/TokenRessource.java index 72ddc6f..4c80581 100644 --- a/src/main/java/com/covas/Resources/TokenRessource.java +++ b/src/main/java/com/covas/Resources/TokenRessource.java @@ -72,6 +72,10 @@ public class TokenRessource { return Response.status(Response.Status.NOT_ACCEPTABLE).build(); } // or jwt = parser.decrypt(jwtCookie, secret); + String kid = jwt.getClaim(Claims.kid).toString(); + if(!kid.equals(users.id.toString())){ + return Response.status(Response.Status.UNAUTHORIZED).build(); + } return Response.status(Response.Status.OK).build(); }