This is an automated email from the ASF dual-hosted git repository. mmerli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 2532fbd5ef0 [fix] JWT CLI util should force the token validation (#22831) 2532fbd5ef0 is described below commit 2532fbd5ef0b718695b2a4a76d63669bb5097b9e Author: Matteo Merli <mme...@apache.org> AuthorDate: Mon Jun 3 21:01:13 2024 -0700 [fix] JWT CLI util should force the token validation (#22831) --- .../main/java/org/apache/pulsar/utils/auth/tokens/TokensCliUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/utils/auth/tokens/TokensCliUtils.java b/pulsar-broker/src/main/java/org/apache/pulsar/utils/auth/tokens/TokensCliUtils.java index 82f0178c9ca..6f718601646 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/utils/auth/tokens/TokensCliUtils.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/utils/auth/tokens/TokensCliUtils.java @@ -291,11 +291,10 @@ public class TokensCliUtils { } // Validate the token - @SuppressWarnings("unchecked") Jwt<?, Claims> jwt = Jwts.parserBuilder() .setSigningKey(validationKey) .build() - .parse(token); + .parseClaimsJws(token); System.out.println(jwt.getBody()); return 0;