gaia_constants.cc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. #include "google_apis/gaia/gaia_constants.h"
  7. namespace GaiaConstants {
  8. // Gaia uses this for accounting where login is coming from.
  9. const char kChromeOSSource[] = "chromeos";
  10. const char kChromeSource[] = "ChromiumBrowser";
  11. const char kUnexpectedServiceResponse[] = "UnexpectedServiceResponse";
  12. // Service name for Gaia. Used to convert to cookie auth.
  13. const char kGaiaService[] = "gaia";
  14. // OAuth scopes.
  15. const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin";
  16. // Service/scope names for device management (cloud-based policy) server.
  17. const char kDeviceManagementServiceOAuth[] =
  18. "https://www.googleapis.com/auth/chromeosdevicemanagement";
  19. // OAuth2 scope for access to all Google APIs.
  20. const char kAnyApiOAuth2Scope[] = "https://www.googleapis.com/auth/any-api";
  21. // OAuth2 scope for access to Chrome sync APIs
  22. const char kChromeSyncOAuth2Scope[] =
  23. "https://www.googleapis.com/auth/chromesync";
  24. // OAuth2 scope for access to the Chrome Sync APIs for managed profiles.
  25. const char kChromeSyncSupervisedOAuth2Scope[] =
  26. "https://www.googleapis.com/auth/chromesync_playpen";
  27. // OAuth2 scope for parental consent logging for secondary account addition.
  28. const char kKidManagementPrivilegedOAuth2Scope[] =
  29. "https://www.googleapis.com/auth/kid.management.privileged";
  30. // OAuth2 scope for access to Google Family Link Supervision Setup.
  31. const char kKidsSupervisionSetupChildOAuth2Scope[] =
  32. "https://www.googleapis.com/auth/kids.supervision.setup.child";
  33. // OAuth2 scope for access to Google Talk APIs (XMPP).
  34. const char kGoogleTalkOAuth2Scope[] =
  35. "https://www.googleapis.com/auth/googletalk";
  36. // OAuth2 scope for access to Google account information.
  37. const char kGoogleUserInfoEmail[] =
  38. "https://www.googleapis.com/auth/userinfo.email";
  39. const char kGoogleUserInfoProfile[] =
  40. "https://www.googleapis.com/auth/userinfo.profile";
  41. // OAuth2 scope for access to the parent approval widget.
  42. const char kParentApprovalOAuth2Scope[] =
  43. "https://www.googleapis.com/auth/kids.parentapproval";
  44. // OAuth2 scope for access to the people API (read-only).
  45. const char kPeopleApiReadOnlyOAuth2Scope[] =
  46. "https://www.googleapis.com/auth/peopleapi.readonly";
  47. // OAuth2 scope for access to the programmatic challenge API (read-only).
  48. const char kProgrammaticChallengeOAuth2Scope[] =
  49. "https://www.googleapis.com/auth/accounts.programmaticchallenge";
  50. // OAuth2 scope for access to the Reauth flow.
  51. const char kAccountsReauthOAuth2Scope[] =
  52. "https://www.googleapis.com/auth/accounts.reauth";
  53. // OAuth2 scope for access to audit recording (ARI).
  54. const char kAuditRecordingOAuth2Scope[] =
  55. "https://www.googleapis.com/auth/auditrecording-pa";
  56. // OAuth2 scope for access to clear cut logs.
  57. const char kClearCutOAuth2Scope[] = "https://www.googleapis.com/auth/cclog";
  58. // OAuth2 scope for FCM, the Firebase Cloud Messaging service.
  59. const char kFCMOAuthScope[] =
  60. "https://www.googleapis.com/auth/firebase.messaging";
  61. // OAuth2 scope for access to Tachyon api.
  62. const char kTachyonOAuthScope[] = "https://www.googleapis.com/auth/tachyon";
  63. // OAuth2 scope for access to the Photos API.
  64. const char kPhotosOAuth2Scope[] = "https://www.googleapis.com/auth/photos";
  65. // OAuth2 scope for access to the SecureConnect API.
  66. extern const char kSecureConnectOAuth2Scope[] =
  67. "https://www.googleapis.com/auth/bce.secureconnect";
  68. // OAuth2 scope for access to Cast backdrop API.
  69. const char kCastBackdropOAuth2Scope[] =
  70. "https://www.googleapis.com/auth/cast.backdrop";
  71. // OAuth scope for access to Cloud Translation API.
  72. const char kCloudTranslationOAuth2Scope[] =
  73. "https://www.googleapis.com/auth/cloud-translation";
  74. // OAuth2 scope for access to passwords leak checking API.
  75. const char kPasswordsLeakCheckOAuth2Scope[] =
  76. "https://www.googleapis.com/auth/identity.passwords.leak.check";
  77. // OAuth2 scope for access to Chrome safe browsing API.
  78. const char kChromeSafeBrowsingOAuth2Scope[] =
  79. "https://www.googleapis.com/auth/chrome-safe-browsing";
  80. // OAuth2 scope for access to kid permissions by URL.
  81. const char kClassifyUrlKidPermissionOAuth2Scope[] =
  82. "https://www.googleapis.com/auth/kid.permission";
  83. const char kKidFamilyReadonlyOAuth2Scope[] =
  84. "https://www.googleapis.com/auth/kid.family.readonly";
  85. // OAuth2 scope for access to payments.
  86. const char kPaymentsOAuth2Scope[] =
  87. "https://www.googleapis.com/auth/wallet.chrome";
  88. const char kCryptAuthOAuth2Scope[] =
  89. "https://www.googleapis.com/auth/cryptauth";
  90. // OAuth2 scope for access to Drive.
  91. const char kDriveOAuth2Scope[] = "https://www.googleapis.com/auth/drive";
  92. // The scope required for an access token in order to query ItemSuggest.
  93. const char kDriveReadOnlyOAuth2Scope[] =
  94. "https://www.googleapis.com/auth/drive.readonly";
  95. // OAuth2 scope for access to Assistant SDK.
  96. const char kAssistantOAuth2Scope[] =
  97. "https://www.googleapis.com/auth/assistant-sdk-prototype";
  98. // OAuth2 scope for access to nearby devices (fast pair) APIs.
  99. const char kCloudPlatformProjectsOAuth2Scope[] =
  100. "https://www.googleapis.com/auth/cloudplatformprojects";
  101. // OAuth2 scope for access to nearby sharing.
  102. const char kNearbyShareOAuth2Scope[] =
  103. "https://www.googleapis.com/auth/nearbysharing-pa";
  104. // OAuth2 scopes for access to GCM account tracker.
  105. const char kGCMGroupServerOAuth2Scope[] = "https://www.googleapis.com/auth/gcm";
  106. const char kGCMCheckinServerOAuth2Scope[] =
  107. "https://www.googleapis.com/auth/android_checkin";
  108. // OAuth2 scope for access to readonly Chrome web store.
  109. const char kChromeWebstoreOAuth2Scope[] =
  110. "https://www.googleapis.com/auth/chromewebstore.readonly";
  111. // OAuth2 scope for access to Account Capabilities API.
  112. const char kAccountCapabilitiesOAuth2Scope[] =
  113. "https://www.googleapis.com/auth/account.capabilities";
  114. // OAuth2 scope for support content API.
  115. const char kSupportContentOAuth2Scope[] =
  116. "https://www.googleapis.com/auth/supportcontent";
  117. // OAuth 2 scope for NTP Photos module API.
  118. const char kPhotosModuleOAuth2Scope[] =
  119. "https://www.googleapis.com/auth/photos.firstparty.readonly";
  120. // OAuth 2 scope for NTP Photos module image API.
  121. const char kPhotosModuleImageOAuth2Scope[] =
  122. "https://www.googleapis.com/auth/photos.image.readonly";
  123. // OAuth 2 scope for the Discover feed.
  124. const char kFeedOAuth2Scope[] = "https://www.googleapis.com/auth/googlenow";
  125. // Used to mint uber auth tokens when needed.
  126. const char kGaiaSid[] = "sid";
  127. const char kGaiaLsid[] = "lsid";
  128. const char kGaiaOAuthToken[] = "oauthToken";
  129. const char kGaiaOAuthSecret[] = "oauthSecret";
  130. const char kGaiaOAuthDuration[] = "3600";
  131. // Used to construct a channel ID for push messaging.
  132. const char kObfuscatedGaiaId[] = "obfuscatedGaiaId";
  133. // Used to build ClientOAuth requests. These are the names of keys used when
  134. // building base::DictionaryValue that represent the json data that makes up
  135. // the ClientOAuth endpoint protocol. The comment above each constant explains
  136. // what value is associated with that key.
  137. // Canonical email of the account to sign in.
  138. const char kClientOAuthEmailKey[] = "email";
  139. // Used as an Invalid refresh token.
  140. const char kInvalidRefreshToken[] = "invalid_refresh_token";
  141. // Name of the Google authentication cookie.
  142. const char kGaiaSigninCookieName[] = "SAPISID";
  143. } // namespace GaiaConstants