sungwy commented on code in PR #2055:
URL: https://github.com/apache/iceberg-python/pull/2055#discussion_r2224189527


##########
mkdocs/docs/configuration.md:
##########
@@ -374,6 +374,94 @@ Specific headers defined by the RESTCatalog spec include:
 | ------------------------------------ | ------------------------------------- 
| -------------------- | 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 |
 | `header.X-Iceberg-Access-Delegation` | `{vended-credentials,remote-signing}` 
| `vended-credentials` | Signal to the server that the client supports 
delegated access via a comma-separated list of access mechanisms. The server 
may choose to supply access via any or none of the requested mechanisms |
 
+#### Authentication in RESTCatalog

Review Comment:
   separated out to: https://github.com/apache/iceberg-python/pull/2244



##########
pyiceberg/catalog/rest/auth.py:
##########
@@ -109,6 +122,95 @@ def auth_header(self) -> str:
         return f"Bearer {self._token}"
 
 
+class OAuth2TokenProvider:
+    """Thread-safe OAuth2 token provider with token refresh support."""
+
+    client_id: str
+    client_secret: str
+    token_url: str
+    scope: Optional[str]
+    refresh_margin: int
+    expires_in: Optional[int]
+
+    _token: Optional[str]
+    _expires_at: int
+    _lock: threading.Lock
+
+    def __init__(
+        self,
+        client_id: str,
+        client_secret: str,

Review Comment:
   separated out to: https://github.com/apache/iceberg-python/pull/2244



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

Reply via email to