Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3351)

Unified Diff: chrome/common/net/gaia/gaia_urls.cc

Issue 8632005: Part 1 of work to do user sign in based on OAuth2: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/net/gaia/gaia_urls.cc
===================================================================
--- chrome/common/net/gaia/gaia_urls.cc (revision 110361)
+++ chrome/common/net/gaia/gaia_urls.cc (working copy)
@@ -24,6 +24,20 @@
const char kOAuth1LoginUrlSuffix[] = "/accounts/OAuthLogin";
const char kOAuthRevokeTokenUrlSuffix[] = "/accounts/AuthSubRevokeToken";
+// OAuth2 client id for Google Chrome which is registered as an
+// installed application.
+static const char kOAuth2ChromeClientId[] =
+ "77185425430.apps.googleusercontent.com";
+// For an installed application, client secret is not really a secret since
+// it is expected to be embeeded in the application.
+// See documentation at
+// http://code.google.com/apis/accounts/docs/OAuth2InstalledApp.html
+static const char kOAuth2ChromeClientSecret[] =
+ "OTJgUOQcT7lO7GsGZq2G4IlT";
+const char kClientLoginToOAuth2Url[] =
+ "https://accounts.google.com/o/oauth2/programmatic_auth";
+const char kOAuth2TokenUrl[] =
+ "https://accounts.google.com/o/oauth2/token";
} // namespacce
GaiaUrls* GaiaUrls::GetInstance() {
@@ -61,6 +75,11 @@
oauth_user_info_url_ = "https://www.googleapis.com/oauth2/v1/userinfo";
oauth_wrap_bridge_user_info_scope_ =
"https://www.googleapis.com/auth/userinfo.email";
+
+ oauth2_chrome_client_id_ = kOAuth2ChromeClientId;
+ oauth2_chrome_client_secret_ = kOAuth2ChromeClientSecret;
+ client_login_to_oauth2_url_ = kClientLoginToOAuth2Url;
+ oauth2_token_url_ = kOAuth2TokenUrl;
}
GaiaUrls::~GaiaUrls() {
@@ -125,3 +144,19 @@
const std::string& GaiaUrls::oauth_wrap_bridge_user_info_scope() {
return oauth_wrap_bridge_user_info_scope_;
}
+
+const std::string& GaiaUrls::oauth2_chrome_client_id() {
+ return oauth2_chrome_client_id_;
+}
+
+const std::string& GaiaUrls::oauth2_chrome_client_secret() {
+ return oauth2_chrome_client_secret_;
+}
+
+const std::string& GaiaUrls::client_login_to_oauth2_url() {
+ return client_login_to_oauth2_url_;
+}
+
+const std::string& GaiaUrls::oauth2_token_url() {
+ return oauth2_token_url_;
+}

Powered by Google App Engine
This is Rietveld 408576698