Using SSL callback URL

This commit is contained in:
Jaex 2015-01-21 02:24:22 +02:00
parent c2ae15f0fd
commit b01b762c88
2 changed files with 3 additions and 5 deletions

View file

@ -27,13 +27,11 @@ namespace ShareX.HelpersLib
{
public static class Links
{
public const string URL_WEBSITE = "http://getsharex.com";
public const string URL_WEBSITE_SSL = "https://getsharex.com";
public const string URL_WEBSITE = "https://getsharex.com";
public const string URL_PROJECT = "https://github.com/ShareX/ShareX";
public const string URL_ISSUES = URL_PROJECT + "/issues";
public const string URL_UPDATE = URL_WEBSITE + "/Update.xml";
public const string URL_CALLBACK = URL_WEBSITE + "/callback/";
public const string URL_CALLBACK_SSL = URL_WEBSITE_SSL + "/callback/";
public const string URL_VERSION_HISTORY = URL_PROJECT + "/wiki/Changelog";
public const string URL_DONATE = "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PCNWK2G6ZYJ2E";
public const string URL_BERK = "https://github.com/Jaex";

View file

@ -57,7 +57,7 @@ public string GetAuthorizationURL()
{
Dictionary<string, string> args = new Dictionary<string, string>();
//Hubic only accepts https callback URL
args.Add("redirect_uri", Links.URL_CALLBACK_SSL);
args.Add("redirect_uri", Links.URL_CALLBACK);
args.Add("client_id", AuthInfo.Client_ID);
args.Add("scope", Scope);
args.Add("response_type", "code");
@ -70,7 +70,7 @@ public bool GetAccessToken(string code)
Dictionary<string, string> args = new Dictionary<string, string>();
args.Add("code", code);
//Hubic only accepts https callback URL
args.Add("redirect_uri", Links.URL_CALLBACK_SSL);
args.Add("redirect_uri", Links.URL_CALLBACK);
args.Add("grant_type", "authorization_code");
string response = SendRequest(HttpMethod.POST, "https://api.hubic.com/oauth/token/", args, GetAuthHeaders("Basic"));