diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 04:26:37 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-07 04:26:37 +0000 |
commit | 6386cf58a85361fa20bba6ecfc23502e922b9a90 (patch) | |
tree | 06f9a9aa7e6bb8db149b53bc7489e69fa87c07fb /google_apis/gaia/gaia_constants.cc | |
parent | f2857ecf6c8da488feeca9b05cf2c046ea43e02f (diff) | |
download | chromium_src-6386cf58a85361fa20bba6ecfc23502e922b9a90.zip chromium_src-6386cf58a85361fa20bba6ecfc23502e922b9a90.tar.gz chromium_src-6386cf58a85361fa20bba6ecfc23502e922b9a90.tar.bz2 |
Moving google_apis and GaiaClient to src/google_apis.
TBR=mechanicalowners@chromium.org
BUG=145584
Review URL: https://chromiumcodereview.appspot.com/10928017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia/gaia_constants.cc')
-rw-r--r-- | google_apis/gaia/gaia_constants.cc | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/google_apis/gaia/gaia_constants.cc b/google_apis/gaia/gaia_constants.cc new file mode 100644 index 0000000..8a5910c --- /dev/null +++ b/google_apis/gaia/gaia_constants.cc @@ -0,0 +1,95 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Constants definitions + +#include "google_apis/gaia/gaia_constants.h" + +namespace GaiaConstants { + +// Gaia uses this for accounting where login is coming from. +const char kChromeOSSource[] = "chromeos"; +const char kChromeSource[] = "ChromiumBrowser"; + +// Service name for Gaia. Used to convert to cookie auth. +const char kGaiaService[] = "gaia"; +// Service name for Picasa API. API is used to get user's image. +const char kPicasaService[] = "lh2"; + +// Service/scope names for sync. +const char kSyncService[] = "chromiumsync"; + +// Service name for remoting. +const char kRemotingService[] = "chromoting"; +// Service name for cloud print. +const char kCloudPrintService[] = "cloudprint"; + +// Service/scope names for device management (cloud-based policy) server. +const char kDeviceManagementService[] = "mobilesync"; +const char kDeviceManagementServiceOAuth[] = + "https://www.googleapis.com/auth/chromeosdevicemanagement"; + +// OAuth scopes for chrome web store. +const char kCWSNotificationScope[] = + "https://www.googleapis.com/auth/chromewebstore.notification"; + +// Service for LSO endpoint of Google that exposes OAuth APIs. +const char kLSOService[] = "lso"; + +// Used to mint uber auth tokens when needed. +const char kGaiaSid[] = "sid"; +const char kGaiaLsid[] = "lsid"; +const char kGaiaOAuthToken[] = "oauthToken"; +const char kGaiaOAuthSecret[] = "oauthSecret"; +const char kGaiaOAuthDuration[] = "3600"; +const char kGaiaOAuth2LoginRefreshToken[] = "oauth2LoginRefreshToken"; +const char kGaiaOAuth2LoginAccessToken[] = "oauth2LoginAccessToken"; + + +// Used to build ClientOAuth requests. These are the names of keys used when +// building base::DictionaryValue that represent the json data that makes up +// the ClientOAuth endpoint protocol. The comment above each constant explains +// what value is associated with that key. + +// Canonical email and password of the account to sign in. +const char kClientOAuthEmailKey[] = "email"; +const char kClientOAuthPasswordKey[] = "password"; + +// Scopes required for the returned oauth2 token. For GaiaAuthFetcher, the +// value is the OAuthLogin scope. +const char kClientOAuthScopesKey[] = "scopes"; + +// Chrome's client id from the API console. +const char kClientOAuthOAuth2ClientIdKey[] = "oauth2_client_id"; + +// A friendly name to describe this instance of chrome to the user. +const char kClientOAuthFriendlyDeviceNameKey[] = "friendly_device_name"; + +// A list of challenge types that chrome accepts. At a minimum this must +// include Captcha. To support OTPs should also include TwoFactor. +const char kClientOAuthAcceptsChallengesKey[] = "accepts_challenges"; + +// The locale of the browser, so that ClientOAuth can return localized error +// messages. +const char kClientOAuthLocaleKey[] = "locale"; + +// The name of the web-based fallback method to use if ClientOAuth decides it +// cannot continue otherwise. Note that this name has a dot because its in +// sub dictionary. +const char kClientOAuthFallbackNameKey[] = "fallback.name"; + +// The following three key names are used with ClientOAuth challenge responses. + +// The type of response. Must match the name given in the response to the +// original ClientOAuth request and is a subset of the challenge types listed +// in kClientOAuthAcceptsChallengesKey from that original request. +const char kClientOAuthNameKey[] = "name"; + +// The challenge token received in the original ClientOAuth request. +const char kClientOAuthChallengeTokenKey[] = "challenge_token"; + +// The dictionary that contains the challenge response. +const char kClientOAuthchallengeReplyKey[] = "challenge_reply"; + +} // namespace GaiaConstants |