diff options
author | aunsane <aunsane@gmail.com> | 2018-03-09 19:04:44 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-03-09 19:05:45 +0300 |
commit | 303dd9297732fc943ed3e20ab37587f0c009dfe5 (patch) | |
tree | 20957f3c2d2f724dabd3074819a6405c805766fa /plugins/CloudFile/src/Services/microsoft_api.h | |
parent | 1f71ad2141a4c7d41f806cc4cbaa25cbf321dd73 (diff) |
CloudFile: bugfix
- GDrive: fixed authentication
- GDrive: fixed upload for small files
- Dropbox: increase "create folder" api method version
Diffstat (limited to 'plugins/CloudFile/src/Services/microsoft_api.h')
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_api.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_api.h b/plugins/CloudFile/src/Services/microsoft_api.h index 2545708a45..3dcb34e2ba 100644 --- a/plugins/CloudFile/src/Services/microsoft_api.h +++ b/plugins/CloudFile/src/Services/microsoft_api.h @@ -3,17 +3,19 @@ namespace OneDriveAPI { -#define MS_OAUTH "https://login.microsoftonline.com/common/oauth2/v2.0" +#define MICROSOFT_OAUTH "https://login.microsoftonline.com/common/oauth2/v2.0" #define ONEDRIVE_API "https://graph.microsoft.com/v1.0/drive" #define MS_APP_ID "72b87ac7-42eb-4a97-a620-91a7f8d8b5ae" #include "../../../miranda-private-keys/Microsoft/client_secret.h" +#define MICROSOFT_AUTH MICROSOFT_OAUTH "/authorize?response_type=code&scope=offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Ffiles.readWrite&redirect_uri=https%3A%2F%2Foauth.miranda-ng.org%2Fverification&client_id=" MS_APP_ID + class GetAccessTokenRequest : public HttpRequest { public: GetAccessTokenRequest(const char *code) : - HttpRequest(REQUEST_POST, MS_OAUTH "/token") + HttpRequest(REQUEST_POST, MICROSOFT_OAUTH "/token") { AddHeader("Content-Type", "application/x-www-form-urlencoded"); @@ -29,7 +31,7 @@ namespace OneDriveAPI { public: RefreshTokenRequest(const char *refreshToken) : - HttpRequest(REQUEST_POST, MS_OAUTH "/token") + HttpRequest(REQUEST_POST, MICROSOFT_OAUTH "/token") { AddHeader("Content-Type", "application/x-www-form-urlencoded"); |