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

Unified Diff: google_apis/gaia/gaia_auth_fetcher.h

Issue 11649055: OAuth2 sign-in flow for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix Created 7 years, 11 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
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..942bb7b297906df1c098b67a0e9ea53e333419f2 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -69,7 +69,7 @@ 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.
@@ -77,6 +77,22 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
const std::string& lsid,
const char* const service);
+ // Start a request to obtain |service| token for the the account identified by
+ // |uber_token|.
+ //
+ // Either OnIssueAuthTokenSuccess or OnIssueAuthTokenFailure will be
+ // called on the consumer on the original thread.
+ void StartTokenAuth(const std::string& uber_token,
+ 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.
//
@@ -156,7 +172,8 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
// challenges are never issued.
//
// Either OnClientLoginSuccess or OnClientLoginFailure will be
- // called on the consumer on the original thread.
+ // called on the consumer on the original thread. If |service| is empty,
+ // the call will attempt to fetch uber auth token.
void StartOAuthLogin(const std::string& access_token,
const std::string& service);
@@ -225,6 +242,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[];

Powered by Google App Engine
This is Rietveld 408576698