Skip to content

Remove logging aud (fails when it's not String) #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ public Mono<Map<String, Object>> resolve(String token) {
String kid = (String) header.get("kid");
Objects.requireNonNull(kid, "kid is missing");

Map<String, Object> body = jwtToken.body();
String aud = (String) body.get("aud"); // optional

LOGGER.debug("[resolveToken][aud:{}][kid:{}] Resolving token {}", aud, kid, mask(token));
LOGGER.debug("[resolveToken][kid:{}] Resolving token {}", kid, mask(token));

// workaround to remove safely on errors
AtomicReference<Mono<Key>> computedValueHolder = new AtomicReference<>();
Expand All @@ -107,18 +104,12 @@ public Mono<Map<String, Object>> resolve(String token) {
.doOnError(
throwable ->
LOGGER.error(
"[resolveToken][aud:{}][kid:{}][{}] Exception occurred: {}",
aud,
"[resolveToken][kid:{}][{}] Exception occurred: {}",
kid,
mask(token),
throwable.toString()))
.doOnSuccess(
s ->
LOGGER.debug(
"[resolveToken][aud:{}][kid:{}] Resolved token {}",
aud,
kid,
mask(token)));
s -> LOGGER.debug("[resolveToken][kid:{}] Resolved token {}", kid, mask(token)));
});
}

Expand Down