From 02824eaa2483f6847d1ab913bc0d5c80f186f189 Mon Sep 17 00:00:00 2001 From: Marko Strukelj Date: Tue, 8 Jun 2021 21:43:28 +0200 Subject: [PATCH] Fix debug logging of JWT token payload (#114) Signed-off-by: Marko Strukelj --- .../java/io/strimzi/kafka/oauth/common/TokenIntrospection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth-common/src/main/java/io/strimzi/kafka/oauth/common/TokenIntrospection.java b/oauth-common/src/main/java/io/strimzi/kafka/oauth/common/TokenIntrospection.java index 190600ff..b6e565d9 100644 --- a/oauth-common/src/main/java/io/strimzi/kafka/oauth/common/TokenIntrospection.java +++ b/oauth-common/src/main/java/io/strimzi/kafka/oauth/common/TokenIntrospection.java @@ -49,7 +49,7 @@ public static void debugLogJWT(Logger log, String token) { JWSObject jws; try { jws = JWSObject.parse(token); - log.debug("Token: {}", jws.getParsedString()); + log.debug("Token: {}", jws.getPayload()); } catch (Exception e) { log.debug("[IGNORED] Token doesn't seem to be JWT token: " + mask(token), e); return;