43 bool HasAccessToken()
const;
46 bool HasRefreshToken()
const;
59 void ValidateAuth(std::function<
void(std::string_view)> completedHandler,
bool silent);
75 std::function<
void(std::string_view)> completedHandler);
81 std::string GetAccessToken()
const;
84 void AuthorisePassword(
86 std::string_view password,
87 std::function<
void(std::string_view)> completedHandler);
89 void AuthoriseRefreshToken(
91 std::function<
void(std::string_view)> completedHandler,
bool silent);
93 void AuthoriseRefreshToken(
95 std::function<
void(std::string_view)> completedHandler,
bool silent);
98 const ServiceConfig& config, std::string_view authorizationCode,
99 std::function<
void(std::string_view)> completedHandler);
103 std::function<
void(std::string_view)> completedHandler,
bool silent);
107 using Clock = std::chrono::steady_clock;
An object that sends messages to an open-ended list of subscribed callbacks.
Service responsible for OAuth authentication against the audio.com service.
std::chrono::steady_clock Clock
Clock::time_point mTokenExpirationTime
std::recursive_mutex mMutex
Configuration for the audio.com.
StringSetting refreshToken
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.
Message that is sent when authorization state changes.
std::string_view accessToken
OAuth access token, valid for the current session or less.
bool authorised
Flag that indicates if user is authorised.
std::string_view errorMessage
Error message returned by the server in case of oauth error.