1
0
mirror of https://github.com/google/nomulus synced 2026-01-05 13:07:04 +00:00

Reduce log level to info when no email is found from the OIDC token (#2694)

This can happen on public endpoints (in pubapi) where the service is
behind IAP but all users (including not-logged-in ones) are allowed. IAP
will add an OIDC token with no email field in the request header.
This commit is contained in:
Lai Jiang
2025-02-26 17:17:45 -05:00
committed by GitHub
parent 9fe64bf9ec
commit 5180095cb6

View File

@@ -106,7 +106,7 @@ public abstract class OidcTokenAuthenticationMechanism implements Authentication
String email = (String) token.getPayload().get("email");
if (email == null) {
logger.atWarning().log("No email address from the OIDC token:\n%s", token.getPayload());
logger.atInfo().log("No email address from the OIDC token:\n%s", token.getPayload());
return AuthResult.NOT_AUTHENTICATED;
}
Optional<User> maybeUser =