danielcweeks commented on code in PR #18754:
URL: https://github.com/apache/iceberg/pull/18754#discussion_r4514484901
##########
core/src/main/java/org/apache/iceberg/rest/auth/AuthManagers.java:
##########
@@ -52,17 +52,12 @@ public static AuthManager loadAuthManager(String name,
Map<String, String> prope
} else {
authType = properties.get(AuthProperties.AUTH_TYPE);
if (authType == null) {
- boolean hasCredential =
properties.containsKey(OAuth2Properties.CREDENTIAL);
- boolean hasToken = properties.containsKey(OAuth2Properties.TOKEN);
- if (hasCredential || hasToken) {
- LOG.warn(
- "Inferring {}={} since property {} was provided. "
- + "Please explicitly set {} to avoid this warning.",
- AuthProperties.AUTH_TYPE,
- AuthProperties.AUTH_TYPE_OAUTH2,
- hasCredential ? OAuth2Properties.CREDENTIAL :
OAuth2Properties.TOKEN,
- AuthProperties.AUTH_TYPE);
+ if (properties.containsKey(OAuth2Properties.CREDENTIAL)) {
+ warnInferredAuthType(AuthProperties.AUTH_TYPE_OAUTH2,
OAuth2Properties.CREDENTIAL);
authType = AuthProperties.AUTH_TYPE_OAUTH2;
+ } else if (properties.containsKey(OAuth2Properties.TOKEN)) {
Review Comment:
I'm fine with the separation in the new behavior, but we have to preserve
the exiting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]