|
olp-cpp-sdk
1.23.1
|
A parsed response received from the OAuth2.0 token endpoint. More...
#include <TokenResult.h>
Public Member Functions | |
| TokenResult (std::string access_token, time_t expiry_time, boost::optional< std::string > scope) | |
Creates the TokenResult instance. More... | |
| TokenResult (std::string access_token, std::chrono::seconds expires_in, boost::optional< std::string > scope) | |
Creates the TokenResult instance. More... | |
| TokenResult ()=default | |
Creates the default TokenResult 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, or -1 if the token is invalid. More... | |
| std::chrono::seconds | GetExpiresIn () const |
| Gets the access token expiry time. More... | |
| const boost::optional< std::string > & | GetScope () const |
| Gets the scope that is assigned to the access token. 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::authentication::TokenResult::TokenResult | ( | std::string | access_token, |
| time_t | expiry_time, | ||
| boost::optional< std::string > | scope | ||
| ) |
Creates the TokenResult instance.
| access_token | The access token issued by the authorization server. |
| expiry_time | The Epoch time when the token expires, or -1 if the token is invalid. |
| scope | The scope assigned to the access token. |
| olp::authentication::TokenResult::TokenResult | ( | std::string | access_token, |
| std::chrono::seconds | expires_in, | ||
| boost::optional< std::string > | scope | ||
| ) |
Creates the TokenResult instance.
| access_token | The access token issued by the authorization server. |
| expires_in | The expiry time of the access token. |
| scope | The scope assigned to the access token. |
| const std::string& olp::authentication::TokenResult::GetAccessToken | ( | ) | const |
Gets the access token issued by the authorization server.
| std::chrono::seconds olp::authentication::TokenResult::GetExpiresIn | ( | ) | const |
Gets the access token expiry time.
| time_t olp::authentication::TokenResult::GetExpiryTime | ( | ) | const |
Gets the Epoch time when the token expires, or -1 if the token is invalid.
| const boost::optional<std::string>& olp::authentication::TokenResult::GetScope | ( | ) | const |
Gets the scope that is assigned to the access token.