The JWS validation is currently broken.
The validation fails in certain cases even if the jwt is valid.
The problem is due to some json reordering on reconstructing the jws to validate.
E.g. if the header of the JWS is
the validation algorithm reconstruct the jws upon validation as
and consequently the signature would not match any longer