Commit aa024bce authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[remoting] Fix TestOAuthTokenGetter

* Change the redirect URI to the new non-talk one.
* Remove the ME2ME OAuth scope check in OAuthTokenExchanger since it
  breaks IT2ME and test binaries.

Change-Id: I36e7778a9ee7a42ea77719277784bab2eb294a5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626400
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662483}
parent a49b0582
......@@ -28,8 +28,6 @@ namespace {
const int kMaxRetries = 3;
const char API_TACHYON[] = "https://www.googleapis.com/auth/tachyon";
const char API_CHROMOTING_ME2ME_HOST[] =
"https://www.googleapis.com/auth/chromoting.me2me.host";
const char TOKENINFO_SCOPE_KEY[] = "scope";
......@@ -39,8 +37,7 @@ bool HasNeededScopes(const std::string& scopes) {
std::vector<base::StringPiece> scopes_list =
base::SplitStringPiece(scopes, base::kWhitespaceASCII,
base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
return base::ContainsValue(scopes_list, API_TACHYON) &&
base::ContainsValue(scopes_list, API_CHROMOTING_ME2ME_HOST);
return base::ContainsValue(scopes_list, API_TACHYON);
}
} // namespace
......
......@@ -33,8 +33,7 @@ constexpr char kChromotingAuthScopeValues[] =
"https://www.googleapis.com/auth/tachyon";
constexpr char kOauthRedirectUrl[] =
"https://chromoting-oauth.talkgadget."
"google.com/talkgadget/oauth/chrome-remote-desktop/dev";
"https://remotedesktop.google.com/_/oauthredirect";
std::string GetAuthorizationCodeUri(bool show_consent_page) {
// Replace space characters with a '+' sign when formatting.
......@@ -42,8 +41,7 @@ std::string GetAuthorizationCodeUri(bool show_consent_page) {
std::string uri = base::StringPrintf(
"https://accounts.google.com/o/oauth2/auth"
"?scope=%s"
"&redirect_uri=https://chromoting-oauth.talkgadget.google.com/"
"talkgadget/oauth/chrome-remote-desktop/dev"
"&redirect_uri=https://remotedesktop.google.com/_/oauthredirect"
"&response_type=code"
"&client_id=%s"
"&access_type=offline",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment