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 |