9cfcf83f53
the live SDK method had been deprecated quite a while ago and has been turned off a while back. Notes: While you can access and save existing files using the remote files dialog, creating new files or using "save as" requires using the LibreOffice open/save dialogs. Authentication is clunky: username and password you're asked when creating a new connection is not used at all for connecting, so only fill out a username to label your onedrive entry. Actual authentication is done in browser - copy'n'paste the URL from the dialog into the browser, login and approve access for LibreOffice (approving access only necessary once), then you get redirected to localhost, ignore that there is nothing to display. The important part is the code from the URL-bar. Copy and paste that into the LibreOffice dialog and LO can request an authentication token for API access. Testing this feature requires compiling with corresponding api-keys specified in configure/having an app registered with microsoft. Change-Id: I2db11ac09f9fdc354a10d6c749b2bec84b5d34a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107646 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
48 lines
1.8 KiB
C
48 lines
1.8 KiB
C
/* -*- 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 CONFIG_OAUTH2_H
|
|
#define CONFIG_OAUTH2_H
|
|
|
|
|
|
/* Google Drive settings */
|
|
#define GDRIVE_BASE_URL "https://www.googleapis.com/drive/v2"
|
|
#define GDRIVE_CLIENT_ID ""
|
|
#define GDRIVE_CLIENT_SECRET ""
|
|
#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"
|
|
|
|
|
|
/* Alfresco Cloud */
|
|
#define ALFRESCO_CLOUD_BASE_URL "https://api.alfresco.com/"
|
|
#define ALFRESCO_CLOUD_CLIENT_ID ""
|
|
#define ALFRESCO_CLOUD_CLIENT_SECRET ""
|
|
#define ALFRESCO_CLOUD_AUTH_URL "https://api.alfresco.com/auth/oauth/versions/2/authorize"
|
|
#define ALFRESCO_CLOUD_TOKEN_URL "https://api.alfresco.com/auth/oauth/versions/2/token"
|
|
#define ALFRESCO_CLOUD_REDIRECT_URI "http://127.0.0.1/Callback"
|
|
#define ALFRESCO_CLOUD_SCOPE "public_api"
|
|
|
|
|
|
/* OneDrive */
|
|
#define ONEDRIVE_BASE_URL "https://graph.microsoft.com/v1.0"
|
|
#define ONEDRIVE_CLIENT_ID ""
|
|
#define ONEDRIVE_CLIENT_SECRET ""
|
|
#define ONEDRIVE_AUTH_URL "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
|
|
#define ONEDRIVE_TOKEN_URL "https://login.microsoftonline.com/common/oauth2/v2.0/token"
|
|
#define ONEDRIVE_REDIRECT_URI "http://localhost/LibreOffice"
|
|
#define ONEDRIVE_SCOPE "Files.ReadWrite offline_access"
|
|
|
|
#endif
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|