You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/04 04:39:53 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #14554: [C++] Fix wrong unit of Access Token Response's `expires_in` field

BewareMyPower opened a new pull request #14554:
URL: https://github.com/apache/pulsar/pull/14554


   ### Motivation
   
   The `expires_in` field of Access Token Response is in seconds. See
   https://datatracker.ietf.org/doc/html/rfc6749#section-4.2.2. However,
   C++ client treats it as milliseconds currently. It will leads to an
   earlier expiration of the token.
   
   ### Modifications
   
   Record the time point via the `std::time_point` class, which supports
   add operations with a `std::duration` object. Then converts the
   `expires_in` field via `std::chrono::second` function and calculate the
   expired time point.
   
   It also removes the usage of Boost time functions and makes code more clear.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower merged pull request #14554: [C++] Fix wrong unit of Access Token Response's `expires_in` field

Posted by GitBox <gi...@apache.org>.
BewareMyPower merged pull request #14554:
URL: https://github.com/apache/pulsar/pull/14554


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org