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

Side by Side Diff: google_apis/gaia/gaia_urls.cc

Issue 13599003: revoke unused OAuth2 tokens on signout and re-signin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 7 years, 8 months 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 unified diff | Download patch
« no previous file with comments | « google_apis/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/gaia/gaia_urls.h" 5 #include "google_apis/gaia/gaia_urls.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "google_apis/gaia/gaia_switches.h" 8 #include "google_apis/gaia/gaia_switches.h"
9 #include "google_apis/google_api_keys.h" 9 #include "google_apis/google_api_keys.h"
10 10
(...skipping 12 matching lines...) Expand all
23 const char kTokenAuthUrlSuffix[] = "/TokenAuth"; 23 const char kTokenAuthUrlSuffix[] = "/TokenAuth";
24 const char kMergeSessionUrlSuffix[] = "/MergeSession"; 24 const char kMergeSessionUrlSuffix[] = "/MergeSession";
25 const char kOAuthGetAccessTokenUrlSuffix[] = "/OAuthGetAccessToken"; 25 const char kOAuthGetAccessTokenUrlSuffix[] = "/OAuthGetAccessToken";
26 const char kOAuthWrapBridgeUrlSuffix[] = "/OAuthWrapBridge"; 26 const char kOAuthWrapBridgeUrlSuffix[] = "/OAuthWrapBridge";
27 const char kOAuth1LoginUrlSuffix[] = "/OAuthLogin"; 27 const char kOAuth1LoginUrlSuffix[] = "/OAuthLogin";
28 const char kOAuthRevokeTokenUrlSuffix[] = "/AuthSubRevokeToken"; 28 const char kOAuthRevokeTokenUrlSuffix[] = "/AuthSubRevokeToken";
29 29
30 // API calls from accounts.google.com (LSO) 30 // API calls from accounts.google.com (LSO)
31 const char kGetOAuthTokenUrlSuffix[] = "/o/oauth/GetOAuthToken/"; 31 const char kGetOAuthTokenUrlSuffix[] = "/o/oauth/GetOAuthToken/";
32 const char kClientLoginToOAuth2UrlSuffix[] = "/o/oauth2/programmatic_auth"; 32 const char kClientLoginToOAuth2UrlSuffix[] = "/o/oauth2/programmatic_auth";
33 const char kOAuth2RevokeUrlSuffix[] = "/o/oauth2/revoke";
33 const char kOAuth2TokenUrlSuffix[] = "/o/oauth2/token"; 34 const char kOAuth2TokenUrlSuffix[] = "/o/oauth2/token";
34 const char kClientOAuthUrlSuffix[] = "/ClientOAuth"; 35 const char kClientOAuthUrlSuffix[] = "/ClientOAuth";
35 36
36 // API calls from www.googleapis.com 37 // API calls from www.googleapis.com
37 const char kOAuth2IssueTokenUrlSuffix[] = "/oauth2/v2/IssueToken"; 38 const char kOAuth2IssueTokenUrlSuffix[] = "/oauth2/v2/IssueToken";
38 const char kOAuthUserInfoUrlSuffix[] = "/oauth2/v1/userinfo"; 39 const char kOAuthUserInfoUrlSuffix[] = "/oauth2/v1/userinfo";
39 const char kOAuthWrapBridgeUserInfoScopeUrlSuffix[] = "/auth/userinfo.email"; 40 const char kOAuthWrapBridgeUserInfoScopeUrlSuffix[] = "/auth/userinfo.email";
40 41
41 const char kOAuth1LoginScope[] = 42 const char kOAuth1LoginScope[] =
42 "https://www.google.com/accounts/OAuthLogin"; 43 "https://www.google.com/accounts/OAuthLogin";
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 oauth_wrap_bridge_url_ = gaia_url_base + kOAuthWrapBridgeUrlSuffix; 109 oauth_wrap_bridge_url_ = gaia_url_base + kOAuthWrapBridgeUrlSuffix;
109 oauth_revoke_token_url_ = gaia_url_base + kOAuthRevokeTokenUrlSuffix; 110 oauth_revoke_token_url_ = gaia_url_base + kOAuthRevokeTokenUrlSuffix;
110 oauth1_login_url_ = gaia_url_base + kOAuth1LoginUrlSuffix; 111 oauth1_login_url_ = gaia_url_base + kOAuth1LoginUrlSuffix;
111 client_oauth_url_ = gaia_url_base + kClientOAuthUrlSuffix; 112 client_oauth_url_ = gaia_url_base + kClientOAuthUrlSuffix;
112 113
113 // URLs from accounts.google.com (LSO). 114 // URLs from accounts.google.com (LSO).
114 get_oauth_token_url_ = lso_origin_url_ + kGetOAuthTokenUrlSuffix; 115 get_oauth_token_url_ = lso_origin_url_ + kGetOAuthTokenUrlSuffix;
115 std::string client_login_to_oauth2_url = lso_origin_url_ + 116 std::string client_login_to_oauth2_url = lso_origin_url_ +
116 kClientLoginToOAuth2UrlSuffix; 117 kClientLoginToOAuth2UrlSuffix;
117 std::string oauth2_token_url = lso_origin_url_ + kOAuth2TokenUrlSuffix; 118 std::string oauth2_token_url = lso_origin_url_ + kOAuth2TokenUrlSuffix;
119 oauth2_revoke_url_ = lso_origin_url_ + kOAuth2RevokeUrlSuffix;
118 120
119 // URLs from www.googleapis.com. 121 // URLs from www.googleapis.com.
120 oauth_wrap_bridge_user_info_scope_ = google_apis_origin_url_ + 122 oauth_wrap_bridge_user_info_scope_ = google_apis_origin_url_ +
121 kOAuthWrapBridgeUserInfoScopeUrlSuffix; 123 kOAuthWrapBridgeUserInfoScopeUrlSuffix;
122 std::string oauth2_issue_token_url = google_apis_origin_url_ + 124 std::string oauth2_issue_token_url = google_apis_origin_url_ +
123 kOAuth2IssueTokenUrlSuffix; 125 kOAuth2IssueTokenUrlSuffix;
124 std::string oauth_user_info_url = google_apis_origin_url_ + 126 std::string oauth_user_info_url = google_apis_origin_url_ +
125 kOAuthUserInfoUrlSuffix; 127 kOAuthUserInfoUrlSuffix;
126 128
127 // TODO(zelidrag): Get rid of all these switches since all URLs should be 129 // TODO(zelidrag): Get rid of all these switches since all URLs should be
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 229 }
228 230
229 const std::string& GaiaUrls::oauth2_token_url() { 231 const std::string& GaiaUrls::oauth2_token_url() {
230 return oauth2_token_url_; 232 return oauth2_token_url_;
231 } 233 }
232 234
233 const std::string& GaiaUrls::oauth2_issue_token_url() { 235 const std::string& GaiaUrls::oauth2_issue_token_url() {
234 return oauth2_issue_token_url_; 236 return oauth2_issue_token_url_;
235 } 237 }
236 238
239 const std::string& GaiaUrls::oauth2_revoke_url() {
240 return oauth2_revoke_url_;
241 }
237 242
238 const std::string& GaiaUrls::gaia_login_form_realm() { 243 const std::string& GaiaUrls::gaia_login_form_realm() {
239 return gaia_login_form_realm_; 244 return gaia_login_form_realm_;
240 } 245 }
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698