| Index: google_apis/gaia/gaia_auth_fetcher.h
|
| diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h
|
| index 2aea05bc425168cf68b761967775d9b8db50279a..f64161170e1f2244049f69dbee8f3980e814c178 100644
|
| --- a/google_apis/gaia/gaia_auth_fetcher.h
|
| +++ b/google_apis/gaia/gaia_auth_fetcher.h
|
| @@ -69,13 +69,20 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
|
| HostedAccountsSetting allow_hosted_accounts);
|
|
|
| // Start a request to obtain service token for the the account identified by
|
| - // |sid| and |lsid| and the service|service|.
|
| + // |sid| and |lsid| and the |service|.
|
| //
|
| // Either OnIssueAuthTokenSuccess or OnIssueAuthTokenFailure will be
|
| // called on the consumer on the original thread.
|
| void StartIssueAuthToken(const std::string& sid,
|
| const std::string& lsid,
|
| const char* const service);
|
| + // Start a request to obtain service token for the the account identified by
|
| + // |oauth2_access_token| and the |service|.
|
| + //
|
| + // Either OnIssueAuthTokenSuccess or OnIssueAuthTokenFailure will be
|
| + // called on the consumer on the original thread.
|
| + void StartIssueAuthTokenForOAuth2(const std::string& oauth2_access_token,
|
| + const char* const service);
|
|
|
| // Start a request to exchange an "lso" service token given by |auth_token|
|
| // for an OAuthLogin-scoped oauth2 token.
|
| @@ -188,6 +195,8 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
|
| static const char kClientLoginCaptchaFormat[];
|
| // The format of the POST body for IssueAuthToken.
|
| static const char kIssueAuthTokenFormat[];
|
| + // The format of the POST body for IssueAuthToken with OAuth2 access token.
|
| + static const char kIssueAuthTokenFormatForOAuth2[];
|
| // 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 token pair from auth code.
|
| @@ -225,6 +234,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
|
| // Constants for request/response for OAuth2 requests.
|
| static const char kAuthHeaderFormat[];
|
| static const char kOAuthHeaderFormat[];
|
| + static const char kOAuth2BearerHeaderFormat[];
|
| static const char kClientLoginToOAuth2CookiePartSecure[];
|
| static const char kClientLoginToOAuth2CookiePartHttpOnly[];
|
| static const char kClientLoginToOAuth2CookiePartCodePrefix[];
|
| @@ -309,6 +319,12 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
|
| static std::string MakeIssueAuthTokenBody(const std::string& sid,
|
| const std::string& lsid,
|
| const char* const service);
|
| + // Request a long lived auth token for a service when authentication is based
|
| + // on OAuth2 access token.
|
| + static std::string MakeIssueAuthTokenBodyForOAuth2(const char* const service);
|
| + // Supply the OAuth2 access token in order to request a long lived
|
| + // auth token for a service.
|
| + static std::string StartIssueAuthTokenForOAuth2(const char* const service);
|
| // Create body to get OAuth2 auth code.
|
| static std::string MakeGetAuthCodeBody();
|
| // Given auth code, create body to get OAuth2 token pair.
|
|
|