summaryrefslogtreecommitdiffstats
path: root/google_apis/gaia/gaia_auth_fetcher.h
diff options
context:
space:
mode:
authorpavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 23:24:47 +0000
committerpavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-13 23:24:47 +0000
commit2558134cb64e8639d36b83b2ba55b641471dcc0a (patch)
treea68d9238f96b79fe070af5ed8136f09d7e5f2873 /google_apis/gaia/gaia_auth_fetcher.h
parentc2ef3ebaeb1dd0526efb95064842480867423fe7 (diff)
downloadchromium_src-2558134cb64e8639d36b83b2ba55b641471dcc0a.zip
chromium_src-2558134cb64e8639d36b83b2ba55b641471dcc0a.tar.gz
chromium_src-2558134cb64e8639d36b83b2ba55b641471dcc0a.tar.bz2
Pass device_id and device_type to programmatic_auth endpoint when requesting LST
I added StartCookieForOAuthLoginTokenExchangeWithDeviceId, it is not used anywhere. I'll add code that uses it in the future changes. BUG=382968 R=rogerta@chromium.org Review URL: https://codereview.chromium.org/329583002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia/gaia_auth_fetcher.h')
-rw-r--r--google_apis/gaia/gaia_auth_fetcher.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h
index 0864f18..aa66a49 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -115,6 +115,19 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
// called on the consumer on the original thread.
void StartCookieForOAuthLoginTokenExchange(const std::string& session_index);
+ // Start a request to exchange the cookies of a signed-in user session
+ // for an OAuthLogin-scoped oauth2 token. In the case of a session with
+ // multiple accounts signed in, |session_index| indicate the which of accounts
+ // within the session.
+ // Resulting refresh token is annotated on the server with |device_id|. Format
+ // of device_id on the server is at most 64 unicode characters.
+ //
+ // Either OnClientOAuthSuccess or OnClientOAuthFailure will be
+ // called on the consumer on the original thread.
+ void StartCookieForOAuthLoginTokenExchangeWithDeviceId(
+ const std::string& session_index,
+ const std::string& device_id);
+
// Start a request to exchange the authorization code for an OAuthLogin-scoped
// oauth2 token.
//
@@ -191,6 +204,9 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
static const char kIssueAuthTokenFormat[];
// The format of the POST body to get OAuth2 auth code from auth token.
static const char kClientLoginToOAuth2BodyFormat[];
+ // The format of the POST body to get OAuth2 auth code from auth token. This
+ // format is used for request annotated with device_id.
+ static const char kClientLoginToOAuth2WithDeviceTypeBodyFormat[];
// The format of the POST body to get OAuth2 token pair from auth code.
static const char kOAuth2CodeToTokenPairBodyFormat[];
// The format of the POST body to revoke an OAuth2 token.
@@ -229,6 +245,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
static const char kAuthHeaderFormat[];
static const char kOAuthHeaderFormat[];
static const char kOAuth2BearerHeaderFormat[];
+ static const char kDeviceIdHeaderFormat[];
static const char kClientLoginToOAuth2CookiePartSecure[];
static const char kClientLoginToOAuth2CookiePartHttpOnly[];
static const char kClientLoginToOAuth2CookiePartCodePrefix[];
@@ -314,7 +331,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
const std::string& lsid,
const char* const service);
// Create body to get OAuth2 auth code.
- static std::string MakeGetAuthCodeBody();
+ static std::string MakeGetAuthCodeBody(bool include_device_type);
// Given auth code, create body to get OAuth2 token pair.
static std::string MakeGetTokenPairBody(const std::string& auth_code);
// Given an OAuth2 token, create body to revoke the token.