danielcweeks commented on code in PR #12197:
URL: https://github.com/apache/iceberg/pull/12197#discussion_r1978070687


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -198,18 +167,33 @@ Map<String, String> params() {
   }
 
   public RESTSessionCatalog() {
-    this(config -> 
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI)).build(), 
null);
+    this(
+        config -> {
+          HTTPClient.Builder builder =
+              
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI));
+          configHeaders(config).forEach(builder::withHeader);
+          return builder.build();
+        },
+        null);
   }
 
   public RESTSessionCatalog(
       Function<Map<String, String>, RESTClient> clientBuilder,
       BiFunction<SessionContext, Map<String, String>, FileIO> ioBuilder) {
+    this(clientBuilder, ioBuilder, AuthManagers::loadAuthManager);
+  }
+
+  public RESTSessionCatalog(
+      Function<Map<String, String>, RESTClient> clientBuilder,
+      BiFunction<SessionContext, Map<String, String>, FileIO> ioBuilder,
+      BiFunction<String, Map<String, String>, AuthManager> authManagerBuilder) 
{

Review Comment:
   Is there a reason we need to expose this?  I really don't love tracking a 
`BiFunction<...>` as a member reference and this is adding something that I 
don't think is currently exposed.  I don't see anywhere this is actually used 
either, so it seems we could follow up if there's a use case, but for now, we 
can just encapsulate it.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to