summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authordavidroche@chromium.org <davidroche@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-22 13:38:22 +0000
committerdavidroche@chromium.org <davidroche@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-22 13:38:22 +0000
commitf29f42b92d789486366cdcd0e26ff9fefb9f3ce6 (patch)
tree89f81fc034f7cd6cd016d913c1ce0b70365ec663 /chrome/service
parentd95cbbf84a22d12d599cf3573cc13141748fcc26 (diff)
downloadchromium_src-f29f42b92d789486366cdcd0e26ff9fefb9f3ce6.zip
chromium_src-f29f42b92d789486366cdcd0e26ff9fefb9f3ce6.tar.gz
chromium_src-f29f42b92d789486366cdcd0e26ff9fefb9f3ce6.tar.bz2
Device robot refresh token integrity validation.
Before using the robot account refresh token stored in an enterprise device's Local State, verify that the token is owned by the service account id found in the device policy. BUG=245121 Review URL: https://chromiumcodereview.appspot.com/17109006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/cloud_print/cloud_print_auth.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/service/cloud_print/cloud_print_auth.cc b/chrome/service/cloud_print/cloud_print_auth.cc
index 9bc820c..5abfb99 100644
--- a/chrome/service/cloud_print/cloud_print_auth.cc
+++ b/chrome/service/cloud_print/cloud_print_auth.cc
@@ -62,7 +62,6 @@ void CloudPrintAuth::AuthenticateWithRobotAuthCode(
robot_email_ = robot_email;
// Now that we have an auth code we need to get the refresh and access tokens.
oauth_client_.reset(new gaia::GaiaOAuthClient(
- GaiaUrls::GetInstance()->oauth2_token_url(),
g_service_process->GetServiceURLRequestContextGetter()));
oauth_client_->GetTokensFromAuthCode(oauth_client_info_,
robot_oauth_auth_code,
@@ -72,10 +71,11 @@ void CloudPrintAuth::AuthenticateWithRobotAuthCode(
void CloudPrintAuth::RefreshAccessToken() {
oauth_client_.reset(new gaia::GaiaOAuthClient(
- GaiaUrls::GetInstance()->oauth2_token_url(),
g_service_process->GetServiceURLRequestContextGetter()));
+ std::vector<std::string> empty_scope_list; // (Use scope from refresh token.)
oauth_client_->RefreshToken(oauth_client_info_,
refresh_token_,
+ empty_scope_list,
kCloudPrintAuthMaxRetryCount,
this);
}
@@ -139,7 +139,6 @@ CloudPrintURLFetcher::ResponseAction CloudPrintAuth::HandleJSONData(
json_data->GetString(kXMPPJidValue, &robot_email_);
// Now that we have an auth code we need to get the refresh and access tokens.
oauth_client_.reset(new gaia::GaiaOAuthClient(
- GaiaUrls::GetInstance()->oauth2_token_url(),
g_service_process->GetServiceURLRequestContextGetter()));
oauth_client_->GetTokensFromAuthCode(oauth_client_info_,
auth_code,