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

Unified Diff: google_apis/gaia/gaia_oauth_client.cc

Issue 993103002: Add tokeninfo call with token identified by token_handle parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gaia/gaia_oauth_client.h ('k') | google_apis/gaia/gaia_oauth_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_oauth_client.cc
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc
index 56647f465dbe5b7457230c53d98e63f8285447e9..adb8c6fdcaf2562de8bf5ef9a111f08de57bd448 100644
--- a/google_apis/gaia/gaia_oauth_client.cc
+++ b/google_apis/gaia/gaia_oauth_client.cc
@@ -59,7 +59,8 @@ class GaiaOAuthClient::Core
void GetUserInfo(const std::string& oauth_access_token,
int max_retries,
Delegate* delegate);
- void GetTokenInfo(const std::string& oauth_access_token,
+ void GetTokenInfo(const std::string& qualifier,
+ const std::string& query,
int max_retries,
Delegate* delegate);
@@ -189,14 +190,15 @@ void GaiaOAuthClient::Core::GetUserInfoImpl(
request_->Start();
}
-void GaiaOAuthClient::Core::GetTokenInfo(const std::string& oauth_access_token,
+void GaiaOAuthClient::Core::GetTokenInfo(const std::string& qualifier,
+ const std::string& query,
int max_retries,
Delegate* delegate) {
DCHECK_EQ(request_type_, NO_PENDING_REQUEST);
DCHECK(!request_.get());
request_type_ = TOKEN_INFO;
std::string post_body =
- "access_token=" + net::EscapeUrlEncodedData(oauth_access_token, true);
+ qualifier + "=" + net::EscapeUrlEncodedData(query, true);
MakeGaiaRequest(GURL(GaiaUrls::GetInstance()->oauth2_token_info_url()),
post_body,
max_retries,
@@ -396,7 +398,15 @@ void GaiaOAuthClient::GetUserInfo(const std::string& access_token,
void GaiaOAuthClient::GetTokenInfo(const std::string& access_token,
int max_retries,
Delegate* delegate) {
- return core_->GetTokenInfo(access_token, max_retries, delegate);
+ return core_->GetTokenInfo("access_token", access_token, max_retries,
+ delegate);
+}
+
+void GaiaOAuthClient::GetTokenHandleInfo(const std::string& token_handle,
+ int max_retries,
+ Delegate* delegate) {
+ return core_->GetTokenInfo("token_handle", token_handle, max_retries,
+ delegate);
}
} // namespace gaia
« no previous file with comments | « google_apis/gaia/gaia_oauth_client.h ('k') | google_apis/gaia/gaia_oauth_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698