error kid invalid

This commit is contained in:
Valentin CZERYBA 2022-05-15 11:33:50 +02:00
parent 88d93ab8e8
commit 83d7ec19bc

View File

@ -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();
}