Skip to content

Commit

Permalink
Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
albertzaharovits committed Jul 24, 2023
1 parent 2a2e7f7 commit d76a62d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,12 @@ private void findTokenFromRefreshToken(String refreshToken, Iterator<TimeValue>
if (version.onOrAfter(VERSION_GET_TOKEN_DOC_FOR_REFRESH)) {
final byte[] refreshTokenBytes = in.readByteArray();
if (refreshTokenBytes.length != RAW_TOKEN_BYTES_TOTAL_LENGTH) {
logger.debug(
"Refresh token with version [{}] has length [{}] but expect length is [{}].",
version,
refreshTokenBytes.length,
RAW_TOKEN_BYTES_LENGTH
);
listener.onResponse(null);
} else {
MessageDigest userTokenIdDigest = sha256();
Expand All @@ -1067,6 +1073,7 @@ private void findTokenFromRefreshToken(String refreshToken, Iterator<TimeValue>
findTokenFromRefreshToken(hashedRefreshToken, securityTokensIndex, backoff, listener);
}
} else {
logger.debug("Unrecognized refresh token version [{}].", version);
listener.onResponse(null);
}
} catch (IOException e) {
Expand Down

0 comments on commit d76a62d

Please sign in to comment.