Skip to content

Commit 4779a86

Browse files
authored
Remove logging aud (fails when it's not String) (#93)
1 parent 65c55d0 commit 4779a86

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tokens/src/main/java/io/scalecube/security/tokens/jwt/JwtTokenResolverImpl.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ public Mono<Map<String, Object>> resolve(String token) {
9393
String kid = (String) header.get("kid");
9494
Objects.requireNonNull(kid, "kid is missing");
9595

96-
Map<String, Object> body = jwtToken.body();
97-
String aud = (String) body.get("aud"); // optional
98-
99-
LOGGER.debug("[resolveToken][aud:{}][kid:{}] Resolving token {}", aud, kid, mask(token));
96+
LOGGER.debug("[resolveToken][kid:{}] Resolving token {}", kid, mask(token));
10097

10198
// workaround to remove safely on errors
10299
AtomicReference<Mono<Key>> computedValueHolder = new AtomicReference<>();
@@ -107,18 +104,12 @@ public Mono<Map<String, Object>> resolve(String token) {
107104
.doOnError(
108105
throwable ->
109106
LOGGER.error(
110-
"[resolveToken][aud:{}][kid:{}][{}] Exception occurred: {}",
111-
aud,
107+
"[resolveToken][kid:{}][{}] Exception occurred: {}",
112108
kid,
113109
mask(token),
114110
throwable.toString()))
115111
.doOnSuccess(
116-
s ->
117-
LOGGER.debug(
118-
"[resolveToken][aud:{}][kid:{}] Resolved token {}",
119-
aud,
120-
kid,
121-
mask(token)));
112+
s -> LOGGER.debug("[resolveToken][kid:{}] Resolved token {}", kid, mask(token)));
122113
});
123114
}
124115

0 commit comments

Comments
 (0)