gaia_constants.cc revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
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)// Service name for cloud print.
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kCloudPrintService[] = "cloudprint";
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service/scope names for device management (cloud-based policy) server.
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kDeviceManagementServiceOAuth[] =
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    "https://www.googleapis.com/auth/chromeosdevicemanagement";
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
32c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// OAuth2 scope for access to all Google APIs.
33c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)const char kAnyApiOAuth2Scope[] = "https://www.googleapis.com/auth/any-api";
34c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Service for LSO endpoint of Google that exposes OAuth APIs.
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kLSOService[] = "lso";
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to mint uber auth tokens when needed.
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaSid[] = "sid";
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaLsid[] = "lsid";
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthToken[] = "oauthToken";
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthSecret[] = "oauthSecret";
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuthDuration[] = "3600";
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kGaiaOAuth2LoginRefreshToken[] = "oauth2LoginRefreshToken";
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to construct a channel ID for push messaging.
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kObfuscatedGaiaId[] = "obfuscatedGaiaId";
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Used to build ClientOAuth requests.  These are the names of keys used when
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// building base::DictionaryValue that represent the json data that makes up
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the ClientOAuth endpoint protocol.  The comment above each constant explains
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// what value is associated with that key.
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
54c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Canonical email of the account to sign in.
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)const char kClientOAuthEmailKey[] = "email";
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace GaiaConstants
58