diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-11-07 13:15:26 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2013-11-07 18:48:55 +0100 |
commit | 39768755e8db5fb79d398373cdcde2cfd4e0f20a (patch) | |
tree | 9dfe20d6e1358fdd7296b49315e3d1278110bf1b /ucb/source | |
parent | 9c30388aa239d7c9707d31bf827a2c5322a51e27 (diff) |
OAuth2 application keys shouldn't be in the code.
The GDrive OAuth2 key is now defined at configure time. If either the
client secret or client id is missing, the Google Drive connectivity
will be disabled at runtime.
Tinderboxes can set up a GDrive key, but they need to make sure it's
not persisting in the build log.
Change-Id: I09bc748641ec14eae890f273f05bffe4ed421dbb
Diffstat (limited to 'ucb/source')
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_oauth2_providers.hxx | 32 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_url.cxx | 2 |
3 files changed, 2 insertions, 34 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index f49d9abc12c3..9809c2e5b534 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/ucb/XDynamicResultSet.hpp> #include <comphelper/processfactory.hxx> +#include <config_oauth2.h> #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/content.hxx> #include <ucbhelper/contentidentifier.hxx> @@ -47,7 +48,6 @@ #include "cmis_content.hxx" #include "cmis_provider.hxx" #include "cmis_resultset.hxx" -#include "cmis_oauth2_providers.hxx" #include "cmis_strings.hxx" #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() ) diff --git a/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx b/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx deleted file mode 100644 index 63df6a48e305..000000000000 --- a/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - */ - -#ifndef CMIS_OAUTH2_PROVIDERS_HXX -#define CMIS_OAUTH2_PROVIDERS_HXX - - -namespace cmis -{ - -#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v2" -#define GDRIVE_CLIENT_ID "457862564325.apps.googleusercontent.com" -#define GDRIVE_CLIENT_SECRET "GYWrDtzyZQZ0_g5YoBCC6F0I" -#define GDRIVE_AUTH_URL "https://accounts.google.com/o/oauth2/auth" -#define GDRIVE_TOKEN_URL "https://accounts.google.com/o/oauth2/token" -#define GDRIVE_REDIRECT_URI "urn:ietf:wg:oauth:2.0:oob" -#define GDRIVE_SCOPE "https://www.googleapis.com/auth/drive" - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx index b6dbf6c6b2ef..dd6f8610555c 100644 --- a/ucb/source/ucp/cmis/cmis_url.cxx +++ b/ucb/source/ucp/cmis/cmis_url.cxx @@ -9,10 +9,10 @@ #include <libcmis/libcmis.hxx> +#include <config_oauth2.h> #include <rtl/uri.hxx> #include "cmis_url.hxx" -#include "cmis_oauth2_providers.hxx" using namespace std; |