mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Suppress a logging statement most of the time
Most of the time, we don't expect incoming requests to have an authorization header. So this statement gets printed a lot, and doesn't provide much useful information. We already have a statement listing what type of authentication/authorization is required by the endpoint, and other statements indicating either that authorization was successful with a particular method or was not successful at all. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175969652
This commit is contained in:
parent
d840180f3a
commit
29913cf5bd
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,9 @@ public class OAuthAuthenticationMechanism implements AuthenticationMechanism {
|
||||||
// OAuthService itself only looks at the first one anyway.
|
// OAuthService itself only looks at the first one anyway.
|
||||||
String header = request.getHeader(AUTHORIZATION);
|
String header = request.getHeader(AUTHORIZATION);
|
||||||
if ((header == null) || !header.startsWith(BEARER_PREFIX)) {
|
if ((header == null) || !header.startsWith(BEARER_PREFIX)) {
|
||||||
logger.infofmt("missing or invalid authorization header");
|
if (header != null) {
|
||||||
|
logger.infofmt("invalid authorization header");
|
||||||
|
}
|
||||||
return AuthResult.create(NONE);
|
return AuthResult.create(NONE);
|
||||||
}
|
}
|
||||||
// Assume that, if a bearer token is found, it's what OAuthService will use to attempt
|
// Assume that, if a bearer token is found, it's what OAuthService will use to attempt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue