summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/Services
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-03-11 22:59:22 +0300
committeraunsane <aunsane@gmail.com>2018-03-11 22:59:22 +0300
commit8d0758286e5d0220647355a218a4c94f70591e6f (patch)
tree3c03ff78e0300fbd04309183592ba5505921ff2d /plugins/CloudFile/src/Services
parent5532fd4e1374c15c13e203a89b7cd060c7e15499 (diff)
CloudFile: Dropbox OAuth with miranda-ng redirect uri
Diffstat (limited to 'plugins/CloudFile/src/Services')
-rw-r--r--plugins/CloudFile/src/Services/dropbox_api.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_api.h b/plugins/CloudFile/src/Services/dropbox_api.h
index 50e5d44cab..a4ebe5910d 100644
--- a/plugins/CloudFile/src/Services/dropbox_api.h
+++ b/plugins/CloudFile/src/Services/dropbox_api.h
@@ -13,19 +13,19 @@ namespace DropboxAPI
#define DROPBOX_APP_KEY "fa8du7gkf2q8xzg"
#include "../../../miranda-private-keys/Dropbox/secret_key.h"
-#define DROPBOX_API_AUTH "https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=" DROPBOX_APP_KEY
+#define DROPBOX_API_AUTH "https://www.dropbox.com/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Foauth.miranda-ng.org%2Fverification&client_id=" DROPBOX_APP_KEY
class GetAccessTokenRequest : public HttpRequest
{
public:
- GetAccessTokenRequest(const char *requestToken) :
+ GetAccessTokenRequest(const char *code) :
HttpRequest(REQUEST_POST, DROPBOX_API_OAUTH "/token")
{
AddHeader("Content-Type", "application/x-www-form-urlencoded");
- CMStringA data(CMStringDataFormat::FORMAT,
- "client_id=%s&client_secret=%s&grant_type=authorization_code&code=%s",
- DROPBOX_APP_KEY, DROPBOX_API_SECRET, requestToken);
+ CMStringA data = "redirect_uri=https://oauth.miranda-ng.org/verification";
+ data.AppendFormat("&client_id=%s&client_secret=%s", DROPBOX_APP_KEY, DROPBOX_API_SECRET);
+ data.AppendFormat("&grant_type=authorization_code&code=%s", code);
SetData(data.GetBuffer(), data.GetLength());
}
};