MCPcopy Create free account
hub / github.com/audacity/audacity / AuthoriseRefreshToken

Method AuthoriseRefreshToken

libraries/lib-cloud-audiocom/OAuthService.cpp:261–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void OAuthService::AuthoriseRefreshToken(
262 const ServiceConfig& config, std::string_view token, AudiocomTrace trace,
263 std::function<void(std::string_view)> completedHandler, bool silent)
264{
265 using namespace rapidjson;
266
267 Document document;
268 document.SetObject();
269
270 WriteCommonFields(document, "refresh_token", "");
271
272 document.AddMember(
273 "refresh_token", StringRef(token.data(), token.size()),
274 document.GetAllocator());
275
276 rapidjson::StringBuffer buffer;
277 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
278 document.Accept(writer);
279
280 DoAuthorise(
281 config, { buffer.GetString(), buffer.GetSize() }, trace,
282 std::move(completedHandler), silent);
283}
284
285void OAuthService::AuthoriseRefreshToken(
286 const ServiceConfig& config, AudiocomTrace trace,

Callers

nothing calls this directly

Calls 8

WriteCommonFieldsFunction · 0.85
moveFunction · 0.85
ToUTF8Function · 0.85
dataMethod · 0.45
sizeMethod · 0.45
GetStringMethod · 0.45
GetSizeMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected