|
olp-cpp-sdk
1.23.1
|
A parsed response received from the OAuth2.0 token endpoint. More...
#include <OauthToken.h>
Public Member Functions | |
| OauthToken (std::string access_token, time_t expiry_time) | |
Creates the OauthToken instance. More... | |
| OauthToken (std::string access_token, std::chrono::seconds expires_in) | |
Creates the OauthToken instance. More... | |
| OauthToken ()=default | |
Creates the default OauthToken instance. | |
| const std::string & | GetAccessToken () const |
| Gets the access token issued by the authorization server. More... | |
| time_t | GetExpiryTime () const |
| Gets the Epoch time when the token expires. More... | |
| std::chrono::seconds | GetExpiresIn () const |
| Gets the number of seconds the token is still valid for. More... | |
A parsed response received from the OAuth2.0 token endpoint.
You can get the following information: the access token issued by the authorization server ( GetAccessToken ) and its expiry time ( GetExpiryTime ).
| olp::client::OauthToken::OauthToken | ( | std::string | access_token, |
| time_t | expiry_time | ||
| ) |
Creates the OauthToken instance.
| access_token | The access token issued by the authorization server. |
| expiry_time | The Epoch time when the token expires. |
| olp::client::OauthToken::OauthToken | ( | std::string | access_token, |
| std::chrono::seconds | expires_in | ||
| ) |
Creates the OauthToken instance.
| access_token | The access token issued by the authorization server. |
| expires_in | The expiry time of the access token. |
| const std::string& olp::client::OauthToken::GetAccessToken | ( | ) | const |
Gets the access token issued by the authorization server.
| std::chrono::seconds olp::client::OauthToken::GetExpiresIn | ( | ) | const |
Gets the number of seconds the token is still valid for.
| time_t olp::client::OauthToken::GetExpiryTime | ( | ) | const |
Gets the Epoch time when the token expires.