flyrain commented on code in PR #278:
URL: https://github.com/apache/iceberg-rust/pull/278#discussion_r1531236117


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -134,6 +134,22 @@ impl RestCatalogConfig {
             Client::builder().default_headers(headers).build()?,
         ))
     }
+
+    fn extract_optional_oauth_params(&self) -> HashMap<&str, &str> {

Review Comment:
   minor: we could simplify the method name to `optional_oauth_params`, which 
is consistent with other names, like `table_endpoint`



##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -134,6 +134,22 @@ impl RestCatalogConfig {
             Client::builder().default_headers(headers).build()?,
         ))
     }
+
+    fn extract_optional_oauth_params(&self) -> HashMap<&str, &str> {
+        let mut optional_oauth_param = HashMap::new();
+        if let Some(scope) = self.props.get("scope") {
+            optional_oauth_param.insert("scope", scope.as_str());
+        } else {
+            optional_oauth_param.insert("scope", "catalog");

Review Comment:
   It doesn't quite make sense to have a default one, since the scope mainly 
relies on the internal implementation of an OAuth server, but we may still keep 
it as pyiceberg has it. Open to suggestions.



-- 
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