nastra commented on code in PR #13215:
URL: https://github.com/apache/iceberg/pull/13215#discussion_r2182342687
##########
core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Manager.java:
##########
@@ -154,6 +154,38 @@ public OAuth2Util.AuthSession tableSession(
(OAuth2Util.AuthSession) parent);
}
+ @Override
+ public AuthSession tableSession(RESTClient sharedClient, Map<String, String>
properties) {
+
+ AuthConfig config = AuthConfig.fromProperties(properties);
+ Map<String, String> headers = OAuth2Util.authHeaders(config.token());
+ OAuth2Util.AuthSession parent = new OAuth2Util.AuthSession(headers,
config);
+
+ keepRefreshed(config.keepRefreshed());
+
+ // Important: this method is invoked from standalone components; we must
not assume that
+ // the refresh client and session cache have been initialized, because
catalogSession()
+ // won't be called.
+ if (refreshClient == null) {
+ refreshClient = sharedClient.withAuthSession(parent);
+ }
Review Comment:
nit: newline
--
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]