mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Changes for Box Plugin so it can re-use the OAuthLoginForm. Also fixed a startup issue with some plug-ins.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2143 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
dc8a160c7f
commit
69d29992a2
8 changed files with 74 additions and 54 deletions
|
@ -295,11 +295,20 @@ namespace GreenshotPlugin.Core {
|
|||
Exception e = new Exception("The request token is not set");
|
||||
throw e;
|
||||
}
|
||||
Token = null;
|
||||
Verifier = null;
|
||||
LOG.DebugFormat("Opening AuthorizationLink: {0}", authorizationLink);
|
||||
OAuthLoginForm oAuthLoginForm = new OAuthLoginForm(this, LoginTitle, BrowserSize, authorizationLink, CallbackUrl);
|
||||
oAuthLoginForm.ShowDialog();
|
||||
Token = oAuthLoginForm.Token;
|
||||
Verifier = oAuthLoginForm.Verifier;
|
||||
OAuthLoginForm oAuthLoginForm = new OAuthLoginForm(LoginTitle, BrowserSize, authorizationLink, CallbackUrl);
|
||||
if (oAuthLoginForm.isOk) {
|
||||
if (oAuthLoginForm.CallbackParameters != null) {
|
||||
if (oAuthLoginForm.CallbackParameters.ContainsKey(OAUTH_TOKEN_KEY)) {
|
||||
Token = oAuthLoginForm.CallbackParameters[OAUTH_TOKEN_KEY];
|
||||
}
|
||||
if (oAuthLoginForm.CallbackParameters.ContainsKey(OAUTH_VERIFIER_KEY)) {
|
||||
Verifier = oAuthLoginForm.CallbackParameters[OAUTH_VERIFIER_KEY];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CheckVerifier) {
|
||||
if (!string.IsNullOrEmpty(Verifier)) {
|
||||
return Token;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue