flyrain commented on code in PR #486:
URL: https://github.com/apache/iceberg-python/pull/486#discussion_r1513528807


##########
pyiceberg/catalog/rest.py:
##########
@@ -289,12 +291,25 @@ def auth_url(self) -> str:
         else:
             return self.url(Endpoints.get_token, prefixed=False)
 
+    def _extract_optional_oauth_params(self) -> Dict[str, str]:
+        set_of_optional_params = {AUDIENCE, RESOURCE}

Review Comment:
   Can we extend this method like this? So that all optional parameters are 
handled by a single method. I feel this is a bit more organized. Not a blocker 
though.
   ```
   def _extract_optional_oauth_params(self) -> Dict[str, str]:
           optional_oauth_param = {}
           optional_oauth_param[SCOPE] = self.properties.get(SCOPE) or 
CATALOG_SCOPE
   
           set_of_optional_params = {AUDIENCE, RESOURCE}
           for param in set_of_optional_params:
               if param_value := self.properties.get(param):
                   optional_oauth_param[param] = param_value
   
           return optional_oauth_param
   ```



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