22 #include <boost/optional.hpp>
27 #include "AuthenticationApi.h"
28 #include "ErrorResponse.h"
31 namespace authentication {
50 boost::optional<std::string> scope);
59 TokenResult(std::string access_token, std::chrono::seconds expires_in,
60 boost::optional<std::string> scope);
95 const boost::optional<std::string>&
GetScope()
const;
98 std::string access_token_;
99 time_t expiry_time_{};
100 std::chrono::seconds expires_in_{};
101 boost::optional<std::string> scope_;
A parsed response received from the OAuth2.0 token endpoint.
Definition: TokenResult.h:39
time_t GetExpiryTime() const
Gets the Epoch time when the token expires, or -1 if the token is invalid.
std::chrono::seconds GetExpiresIn() const
Gets the access token expiry time.
TokenResult(std::string access_token, time_t expiry_time, boost::optional< std::string > scope)
Creates the TokenResult instance.
TokenResult(std::string access_token, std::chrono::seconds expires_in, boost::optional< std::string > scope)
Creates the TokenResult instance.
const boost::optional< std::string > & GetScope() const
Gets the scope that is assigned to the access token.
TokenResult()=default
Creates the default TokenResult instance.
const std::string & GetAccessToken() const
Gets the access token issued by the authorization server.
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24