lishuxu commented on code in PR #600:
URL: https://github.com/apache/iceberg-cpp/pull/600#discussion_r2979774361
##########
src/iceberg/catalog/rest/auth/auth_properties.cc:
##########
@@ -75,7 +79,25 @@ Result<AuthProperties> AuthProperties::FromProperties(
}
}
- // TODO(lishuxu): Parse JWT exp claim from token to set expires_at_millis_.
+ // Parse JWT exp claim from token to set expires_at_millis_.
+ if (auto token = config.token(); !token.empty()) {
+ auto first_dot = token.find('.');
+ auto last_dot = token.find('.', first_dot + 1);
Review Comment:
nit: `last_dot` is a bit misleading — it could imply `rfind` was used.
Since JWT has exactly three parts, `second_dot` is more precise.
--
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]