diff options
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/gaia/gaia_switches.cc | 1 | ||||
-rw-r--r-- | google_apis/gaia/gaia_switches.h | 2 | ||||
-rw-r--r-- | google_apis/gaia/gaia_urls.cc | 7 |
3 files changed, 9 insertions, 1 deletions
diff --git a/google_apis/gaia/gaia_switches.cc b/google_apis/gaia/gaia_switches.cc index dae016a..5ed8032 100644 --- a/google_apis/gaia/gaia_switches.cc +++ b/google_apis/gaia/gaia_switches.cc @@ -12,5 +12,6 @@ const char kGaiaUrlPath[] = "gaia-url-path"; const char kOAuth1LoginScope[] = "oauth1-login-scope"; const char kOAuth2IssueTokenUrl[] = "oauth2-issue-token-url"; const char kOAuth2TokenUrl[] = "oauth2-token-url"; +const char kOAuthUserInfoUrl[] = "oauth-user-info-url"; } // namespace switches diff --git a/google_apis/gaia/gaia_switches.h b/google_apis/gaia/gaia_switches.h index 79e0eb9..bdb3f28 100644 --- a/google_apis/gaia/gaia_switches.h +++ b/google_apis/gaia/gaia_switches.h @@ -29,6 +29,8 @@ extern const char kOAuth2IssueTokenUrl[]; // Specifies custom OAuth2 token URL for testing purposes. extern const char kOAuth2TokenUrl[]; +// Specifies custom OAuth user info URL for testing purposes. +extern const char kOAuthUserInfoUrl[]; } // namespace switches #endif // GOOGLE_APIS_GAIA_GAIA_SWITCHES_H_ diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc index a7266d7..8ececeb 100644 --- a/google_apis/gaia/gaia_urls.cc +++ b/google_apis/gaia/gaia_urls.cc @@ -38,6 +38,9 @@ const char kOAuth2IssueTokenUrl[] = "https://www.googleapis.com/oauth2/v2/IssueToken"; const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin"; +const char kOAuthUserInfoUrl[] = + "https://www.googleapis.com/oauth2/v1/userinfo"; + void GetSwitchValueWithDefault(const char* switch_value, const char* default_value, @@ -96,7 +99,6 @@ GaiaUrls::GaiaUrls() { // TODO(joaodasilva): these aren't configurable for now, but are managed here // so that users of Gaia URLs don't have to use static constants. // http://crbug.com/97126 - oauth_user_info_url_ = "https://www.googleapis.com/oauth2/v1/userinfo"; oauth_wrap_bridge_user_info_scope_ = "https://www.googleapis.com/auth/userinfo.email"; client_oauth_url_ = "https://accounts.google.com/ClientOAuth"; @@ -115,6 +117,9 @@ GaiaUrls::GaiaUrls() { GetSwitchValueWithDefault(switches::kOAuth2IssueTokenUrl, kOAuth2IssueTokenUrl, &oauth2_issue_token_url_); + GetSwitchValueWithDefault(switches::kOAuthUserInfoUrl, + kOAuthUserInfoUrl, + &oauth_user_info_url_); gaia_login_form_realm_ = "https://accounts.google.com/"; } |