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
6 
7 #include "google_apis/gaia/gaia_constants.h"
8 
9 namespace GaiaConstants {
10 
11 // Gaia uses this for accounting where login is coming from.
12 const char kChromeOSSource[] = "chromeos";
13 const char kChromeSource[] = "ChromiumBrowser";
14 const char kUnexpectedServiceResponse[] = "UnexpectedServiceResponse";
15 
16 // Service name for Gaia.  Used to convert to cookie auth.
17 const char kGaiaService[] = "gaia";
18 // Service name for Picasa API. API is used to get user's image.
19 const char kPicasaService[] = "lh2";
20 
21 // Service/scope names for sync.
22 const char kSyncService[] = "chromiumsync";
23 
24 // Service name for remoting.
25 const char kRemotingService[] = "chromoting";
26 
27 // OAuth scopes.
28 const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin";
29 const char kOAuthWrapBridgeUserInfoScope[] =
30     "https://www.googleapis.com/auth/userinfo.email";
31 
32 // Service/scope names for device management (cloud-based policy) server.
33 const char kDeviceManagementServiceOAuth[] =
34     "https://www.googleapis.com/auth/chromeosdevicemanagement";
35 
36 // OAuth2 scope for access to all Google APIs.
37 const char kAnyApiOAuth2Scope[] = "https://www.googleapis.com/auth/any-api";
38 
39 // OAuth2 scope for access to Chrome sync APIs
40 const char kChromeSyncOAuth2Scope[] =
41     "https://www.googleapis.com/auth/chromesync";
42 // OAuth2 scope for access to the Chrome Sync APIs for managed profiles.
43 const char kChromeSyncSupervisedOAuth2Scope[] =
44     "https://www.googleapis.com/auth/chromesync_playpen";
45 
46 // OAuth2 scope for parental consent logging for secondary account addition.
47 const char kKidManagementPrivilegedOAuth2Scope[] =
48     "https://www.googleapis.com/auth/kid.management.privileged";
49 
50 // OAuth2 scope for access to Google Family Link Supervision Setup.
51 const char kKidsSupervisionSetupChildOAuth2Scope[] =
52     "https://www.googleapis.com/auth/kids.supervision.setup.child";
53 
54 // OAuth2 scope for access to Google Talk APIs (XMPP).
55 const char kGoogleTalkOAuth2Scope[] =
56     "https://www.googleapis.com/auth/googletalk";
57 
58 const char kGoogleUserInfoEmail[] =
59     "https://www.googleapis.com/auth/userinfo.email";
60 const char kGoogleUserInfoProfile[] =
61     "https://www.googleapis.com/auth/userinfo.profile";
62 
63 // OAuth scope for access to the people API (read-only).
64 const char kPeopleApiReadOnlyOAuth2Scope[] =
65     "https://www.googleapis.com/auth/peopleapi.readonly";
66 
67 // OAuth scope for access to the Reauth flow.
68 const char kAccountsReauthOAuth2Scope[] =
69     "https://www.googleapis.com/auth/accounts.reauth";
70 
71 // OAuth scope for access to audit recording (ARI).
72 const char kAuditRecordingOAuth2Scope[] =
73     "https://www.googleapis.com/auth/auditrecording-pa";
74 
75 // OAuth scope for access to clear cut logs.
76 const char kClearCutOAuth2Scope[] = "https://www.googleapis.com/auth/cclog";
77 
78 // Used to mint uber auth tokens when needed.
79 const char kGaiaSid[] = "sid";
80 const char kGaiaLsid[] = "lsid";
81 const char kGaiaOAuthToken[] = "oauthToken";
82 const char kGaiaOAuthSecret[] = "oauthSecret";
83 const char kGaiaOAuthDuration[] = "3600";
84 const char kGaiaOAuth2LoginRefreshToken[] = "oauth2LoginRefreshToken";
85 
86 // Used to construct a channel ID for push messaging.
87 const char kObfuscatedGaiaId[] = "obfuscatedGaiaId";
88 
89 // Used to build ClientOAuth requests.  These are the names of keys used when
90 // building base::DictionaryValue that represent the json data that makes up
91 // the ClientOAuth endpoint protocol.  The comment above each constant explains
92 // what value is associated with that key.
93 
94 // Canonical email of the account to sign in.
95 const char kClientOAuthEmailKey[] = "email";
96 
97 // Used as an Invalid refresh token.
98 const char kInvalidRefreshToken[] = "invalid_refresh_token";
99 }  // namespace GaiaConstants
100