lishuxu commented on code in PR #1041:
URL: https://github.com/apache/iceberg-cpp/pull/1041#discussion_r4357037975


##########
src/iceberg/catalog/rest/auth/auth_properties.h:
##########
@@ -128,4 +128,20 @@ class ICEBERG_REST_EXPORT AuthProperties : public 
ConfigBase<AuthProperties> {
   std::optional<int64_t> expires_at_millis_;
 };
 
+/// \brief Resolve the OAuth2 server URI from a properties map.
+///
+/// This function resolves the OAuth2 server URI by examining the
+/// `oauth2-server-uri` key in the provided properties map. The resolution 
logic:
+/// - If the value starts with `http://` or `https://`, it is returned as-is
+///   (absolute URL).
+/// - If the value is empty, it is returned as-is.
+/// - Otherwise, the value is treated as a relative path and resolved against 
the
+///   `uri` key from the properties map. If the relative path starts with `/`, 
it
+///   is appended directly; otherwise, a `/` separator is inserted.
+///
+/// \param properties Properties map containing `oauth2-server-uri` and `uri` 
keys.
+/// \return Resolved OAuth2 server URI.
+Result<std::string> ResolveOAuth2ServerUri(

Review Comment:
   Fixed, added ICEBERG_REST_EXPORT. This is a public header and the other free 
functions in public REST headers are exported.



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