BUG-1769: Fix for credentials & when the denied is selected when the authorize is shown in the browser.

This commit is contained in:
Robin 2015-04-14 17:26:02 +02:00
parent ea4631af3d
commit 2b6e7d14cd
2 changed files with 10 additions and 2 deletions

View file

@ -25,7 +25,7 @@ namespace GreenshotPicasaPlugin {
/// You can set your own values here
/// </summary>
public static class PicasaCredentials {
public static string ConsumerKey = "@credentials_picasa_consumer_key@";
public static string ConsumerSecret = "@credentials_picasa_consumer_secret@";
public static string ClientId = "@credentials_picasa_consumer_key@";
public static string ClientSecret = "@credentials_picasa_consumer_secret@";
}
}

View file

@ -51,6 +51,14 @@ namespace GreenshotPicasaPlugin {
if (result.TryGetValue("code", out code)) {
GenerateToken(code, settings);
}
string error;
if (result.TryGetValue("error", out error)) {
if ("access_denied" == error) {
throw new UnauthorizedAccessException("Access denied");
} else {
throw new Exception(error);
}
}
}
/// <summary>