1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Constants definitions
7 #include "google_apis/gaia/gaia_constants.h"
9 namespace GaiaConstants
{
11 // Gaia uses this for accounting where login is coming from.
12 const char kChromeOSSource
[] = "chromeos";
13 const char kChromeSource
[] = "ChromiumBrowser";
15 // Service name for Gaia. Used to convert to cookie auth.
16 const char kGaiaService
[] = "gaia";
17 // Service name for Picasa API. API is used to get user's image.
18 const char kPicasaService
[] = "lh2";
20 // Service/scope names for sync.
21 const char kSyncService
[] = "chromiumsync";
23 // Service name for remoting.
24 const char kRemotingService
[] = "chromoting";
25 // Service name for cloud print.
26 const char kCloudPrintService
[] = "cloudprint";
28 // Service/scope names for device management (cloud-based policy) server.
29 const char kDeviceManagementService
[] = "mobilesync";
30 const char kDeviceManagementServiceOAuth
[] =
31 "https://www.googleapis.com/auth/chromeosdevicemanagement";
33 // OAuth scopes for chrome web store.
34 const char kCWSNotificationScope
[] =
35 "https://www.googleapis.com/auth/chromewebstore.notification";
37 // Service for LSO endpoint of Google that exposes OAuth APIs.
38 const char kLSOService
[] = "lso";
40 // Used to mint uber auth tokens when needed.
41 const char kGaiaSid
[] = "sid";
42 const char kGaiaLsid
[] = "lsid";
43 const char kGaiaOAuthToken
[] = "oauthToken";
44 const char kGaiaOAuthSecret
[] = "oauthSecret";
45 const char kGaiaOAuthDuration
[] = "3600";
46 const char kGaiaOAuth2LoginRefreshToken
[] = "oauth2LoginRefreshToken";
47 const char kGaiaOAuth2LoginAccessToken
[] = "oauth2LoginAccessToken";
49 // Used to construct a channel ID for push messaging.
50 const char kObfuscatedGaiaId
[] = "obfuscatedGaiaId";
52 // Used to build ClientOAuth requests. These are the names of keys used when
53 // building base::DictionaryValue that represent the json data that makes up
54 // the ClientOAuth endpoint protocol. The comment above each constant explains
55 // what value is associated with that key.
57 // Canonical email and password of the account to sign in.
58 const char kClientOAuthEmailKey
[] = "email";
59 const char kClientOAuthPasswordKey
[] = "password";
61 // Scopes required for the returned oauth2 token. For GaiaAuthFetcher, the
62 // value is the OAuthLogin scope.
63 const char kClientOAuthScopesKey
[] = "scopes";
65 // Chrome's client id from the API console.
66 const char kClientOAuthOAuth2ClientIdKey
[] = "oauth2_client_id";
68 // A friendly name to describe this instance of chrome to the user.
69 const char kClientOAuthFriendlyDeviceNameKey
[] = "friendly_device_name";
71 // A list of challenge types that chrome accepts. At a minimum this must
72 // include Captcha. To support OTPs should also include TwoFactor.
73 const char kClientOAuthAcceptsChallengesKey
[] = "accepts_challenges";
75 // The locale of the browser, so that ClientOAuth can return localized error
77 const char kClientOAuthLocaleKey
[] = "locale";
79 // The name of the web-based fallback method to use if ClientOAuth decides it
80 // cannot continue otherwise. Note that this name has a dot because its in
82 const char kClientOAuthFallbackNameKey
[] = "fallback.name";
84 // The following three key names are used with ClientOAuth challenge responses.
86 // The type of response. Must match the name given in the response to the
87 // original ClientOAuth request and is a subset of the challenge types listed
88 // in kClientOAuthAcceptsChallengesKey from that original request.
89 const char kClientOAuthNameKey
[] = "name";
91 // The challenge token received in the original ClientOAuth request.
92 const char kClientOAuthChallengeTokenKey
[] = "challenge_token";
94 // The dictionary that contains the challenge response.
95 const char kClientOAuthchallengeReplyKey
[] = "challenge_reply";
97 } // namespace GaiaConstants