-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C++] Fix wrong unit of Access Token Response's
expires_in
field (#…
…14554) 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. 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. (cherry picked from commit 95c1581)
- Loading branch information
1 parent
e1bcb2b
commit 3dd8102
Showing
2 changed files
with
6 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters