Skip to content

Commit

Permalink
Use DEBUG to log invalid authorization header in `OAuth2TokenExtr…
Browse files Browse the repository at this point in the history
…actor` (#5874)

Motivation:

Invalid authorization is a client error so there isn't much a server
maintainer can do. It seems better to use `DEBUG` to detect problems
during development. `WARN` could be noisy because it may be related to a
monitoring system.

Modifications:

- Use `DEBUG` to log an invalid authorization header.

Result:

An invalid authorization header is now logged at `DEBUG` by the OAuth2
token extractor.
  • Loading branch information
ikhoon authored Sep 24, 2024
1 parent bd5f6ab commit b91d432
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public OAuth2Token apply(RequestHeaders headers) {

final Matcher matcher = AUTHORIZATION_HEADER_PATTERN.matcher(authorization);
if (!matcher.matches()) {
logger.warn("Invalid authorization header: " + authorization);
logger.debug("Invalid authorization header: {}", authorization);
return null;
}

Expand Down

0 comments on commit b91d432

Please sign in to comment.