26#include <olp/core/porting/optional.h>
27#include "AuthenticationApi.h"
28#include "ErrorResponse.h"
31namespace authentication {
50 porting::optional<std::string> scope);
59 TokenResult(std::string access_token, std::chrono::seconds expires_in,
60 porting::optional<std::string> scope);
95 const porting::optional<std::string>&
GetScope()
const;
98 std::string access_token_;
99 time_t expiry_time_{};
100 std::chrono::seconds expires_in_{};
101 porting::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.
const std::string & GetAccessToken() const
Gets the access token issued by the authorization server.
TokenResult()=default
Creates the default TokenResult instance.
const porting::optional< std::string > & GetScope() const
Gets the scope that is assigned to the access token.
TokenResult(std::string access_token, std::chrono::seconds expires_in, porting::optional< std::string > scope)
Creates the TokenResult instance.
TokenResult(std::string access_token, time_t expiry_time, porting::optional< std::string > scope)
Creates the TokenResult instance.
Rules all the other namespaces.
Definition AppleSignInProperties.h:24