mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
BUG-1769: Fix for credentials & when the denied is selected when the authorize is shown in the browser.
This commit is contained in:
parent
ea4631af3d
commit
2b6e7d14cd
2 changed files with 10 additions and 2 deletions
|
@ -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@";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue