Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / google_apis / gaia / gaia_constants.cc
blob0dd5236853b80fea91353d6252e72f3f9f4943a5
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.
4 //
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 kDeviceManagementServiceOAuth[] =
30 "https://www.googleapis.com/auth/chromeosdevicemanagement";
32 // Service for LSO endpoint of Google that exposes OAuth APIs.
33 const char kLSOService[] = "lso";
35 // Used to mint uber auth tokens when needed.
36 const char kGaiaSid[] = "sid";
37 const char kGaiaLsid[] = "lsid";
38 const char kGaiaOAuthToken[] = "oauthToken";
39 const char kGaiaOAuthSecret[] = "oauthSecret";
40 const char kGaiaOAuthDuration[] = "3600";
41 const char kGaiaOAuth2LoginRefreshToken[] = "oauth2LoginRefreshToken";
43 // Used to construct a channel ID for push messaging.
44 const char kObfuscatedGaiaId[] = "obfuscatedGaiaId";
46 // Used to build ClientOAuth requests. These are the names of keys used when
47 // building base::DictionaryValue that represent the json data that makes up
48 // the ClientOAuth endpoint protocol. The comment above each constant explains
49 // what value is associated with that key.
51 // Canonical email and password of the account to sign in.
52 const char kClientOAuthEmailKey[] = "email";
53 const char kClientOAuthPasswordKey[] = "password";
55 // Scopes required for the returned oauth2 token. For GaiaAuthFetcher, the
56 // value is the OAuthLogin scope.
57 const char kClientOAuthScopesKey[] = "scopes";
59 // Chrome's client id from the API console.
60 const char kClientOAuthOAuth2ClientIdKey[] = "oauth2_client_id";
62 // A friendly name to describe this instance of chrome to the user.
63 const char kClientOAuthFriendlyDeviceNameKey[] = "friendly_device_name";
65 // A list of challenge types that chrome accepts. At a minimum this must
66 // include Captcha. To support OTPs should also include TwoFactor.
67 const char kClientOAuthAcceptsChallengesKey[] = "accepts_challenges";
69 // The locale of the browser, so that ClientOAuth can return localized error
70 // messages.
71 const char kClientOAuthLocaleKey[] = "locale";
73 // The name of the web-based fallback method to use if ClientOAuth decides it
74 // cannot continue otherwise. Note that this name has a dot because its in
75 // sub dictionary.
76 const char kClientOAuthFallbackNameKey[] = "fallback.name";
78 // The following three key names are used with ClientOAuth challenge responses.
80 // The type of response. Must match the name given in the response to the
81 // original ClientOAuth request and is a subset of the challenge types listed
82 // in kClientOAuthAcceptsChallengesKey from that original request.
83 const char kClientOAuthNameKey[] = "name";
85 // The challenge token received in the original ClientOAuth request.
86 const char kClientOAuthChallengeTokenKey[] = "challenge_token";
88 // The dictionary that contains the challenge response.
89 const char kClientOAuthchallengeReplyKey[] = "challenge_reply";
91 } // namespace GaiaConstants