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

Method MakeAudioComAuthorizeURL

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

Source from the content-addressed store, hash-verified

358}
359
360std::string OAuthService::MakeAudioComAuthorizeURL(std::string_view userId, std::string_view redirectUrl)
361{
362 auto token = GetAccessToken();
363
364 // Remove token type from the token string
365 size_t pos = token.find(' ');
366 if (pos != std::string::npos) {
367 token = token.substr(pos + 1);
368 }
369
370 std::string url = concat(
371 GetServiceConfig().GetAuthWithRedirectURL(), "?",
372 tokenPrefix, token, "&",
373 userPrefix, userId, "&",
374 urlPrefix, audacity::UrlEncode(redirectUrl)
375 );
376
377 if (SendAnonymousUsageInfo->Read()) {
378 url += concat(std::string_view("&"), instanceIdPrefix, InstanceId->Read());
379 }
380
381 return url;
382}
383
384void OAuthService::Authorize(std::string_view email,
385 std::string_view password,

Callers 6

CompletePromiseMethod · 0.80
GetCloudProjectPageMethod · 0.80
HandleCloudLoginMethod · 0.80
OnCloudStatusChangedMethod · 0.80
GetSelectedProjectUrlMethod · 0.80
GetSelectedAudioUrlMethod · 0.80

Calls 5

concatFunction · 0.85
UrlEncodeFunction · 0.85
findMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected