gaia_constants.cc revision f8ee788a64d60abd8f2d742a5fdedde054ecd910
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Constants definitions 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "google_apis/gaia/gaia_constants.h" 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace GaiaConstants { 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Gaia uses this for accounting where login is coming from. 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeOSSource[] = "chromeos"; 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kChromeSource[] = "ChromiumBrowser"; 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service name for Gaia. Used to convert to cookie auth. 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaService[] = "gaia"; 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service name for Picasa API. API is used to get user's image. 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kPicasaService[] = "lh2"; 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service/scope names for sync. 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kSyncService[] = "chromiumsync"; 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service name for remoting. 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kRemotingService[] = "chromoting"; 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 26a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// OAuth scopes. 27a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin"; 28a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)const char kOAuthWrapBridgeUserInfoScope[] = 29a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) "https://www.googleapis.com/auth/userinfo.email"; 30a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service/scope names for device management (cloud-based policy) server. 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDeviceManagementServiceOAuth[] = 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) "https://www.googleapis.com/auth/chromeosdevicemanagement"; 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 35c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// OAuth2 scope for access to all Google APIs. 36c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)const char kAnyApiOAuth2Scope[] = "https://www.googleapis.com/auth/any-api"; 37c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 387d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// OAuth2 scope for access to Chrome sync APIs 397d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)const char kChromeSyncOAuth2Scope[] = 407d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) "https://www.googleapis.com/auth/chromesync"; 41eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// OAuth2 scope for access to the Chrome Sync APIs for managed profiles. 42f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)const char kChromeSyncSupervisedOAuth2Scope[] = 43eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch "https://www.googleapis.com/auth/chromesync_playpen"; 447d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// OAuth2 scope for access to Google Talk APIs (XMPP). 457d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)const char kGoogleTalkOAuth2Scope[] = 467d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) "https://www.googleapis.com/auth/googletalk"; 477d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 485c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liuconst char kGoogleUserInfoEmail[] = 495c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu "https://www.googleapis.com/auth/userinfo.email"; 505c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liuconst char kGoogleUserInfoProfile[] = 515c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu "https://www.googleapis.com/auth/userinfo.profile"; 525c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to mint uber auth tokens when needed. 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaSid[] = "sid"; 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaLsid[] = "lsid"; 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthToken[] = "oauthToken"; 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthSecret[] = "oauthSecret"; 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthDuration[] = "3600"; 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuth2LoginRefreshToken[] = "oauth2LoginRefreshToken"; 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to construct a channel ID for push messaging. 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kObfuscatedGaiaId[] = "obfuscatedGaiaId"; 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to build ClientOAuth requests. These are the names of keys used when 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// building base::DictionaryValue that represent the json data that makes up 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the ClientOAuth endpoint protocol. The comment above each constant explains 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// what value is associated with that key. 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 69c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Canonical email of the account to sign in. 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kClientOAuthEmailKey[] = "email"; 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace GaiaConstants 73