46 bool HasAccessToken()
const;
49 bool HasRefreshToken()
const;
63 std::function<
void(std::string_view)> completedHandler,
AudiocomTrace,
80 std::function<
void(std::string_view)> completedHandler);
86 std::string GetAccessToken()
const;
89 void AuthorisePassword(
92 std::function<
void(std::string_view)> completedHandler);
94 void AuthoriseRefreshToken(
96 AudiocomTrace, std::function<
void(std::string_view)> completedHandler,
99 void AuthoriseRefreshToken(
101 std::function<
void(std::string_view)> completedHandler,
bool silent);
104 const ServiceConfig& config, std::string_view authorizationCode,
105 AudiocomTrace, std::function<
void(std::string_view)> completedHandler);
109 std::function<
void(std::string_view)> completedHandler,
bool silent);
113 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.