41 bool HasAccessToken()
const;
44 bool HasRefreshToken()
const;
56 void ValidateAuth(std::function<
void(std::string_view)> completedHandler);
70 std::function<
void(std::string_view)> completedHandler);
76 std::string GetAccessToken()
const;
79 void AuthorisePassword(
81 std::string_view password,
82 std::function<
void(std::string_view)> completedHandler);
84 void AuthoriseRefreshToken(
86 std::function<
void(std::string_view)> completedHandler);
88 void AuthoriseRefreshToken(
90 std::function<
void(std::string_view)> completedHandler);
93 const ServiceConfig& config, std::string_view authorizationCode,
94 std::function<
void(std::string_view)> completedHandler);
98 std::function<
void(std::string_view)> completedHandler);
102 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::recursive_mutex mMutex
Clock::time_point mTokenExpirationTime
std::chrono::steady_clock Clock
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 errorMessage
Error message returned by the server in case of oauth error.
bool authorised
Flag that indicates if user is authorised.
std::string_view accessToken
OAuth access token, valid for the current session or less.