-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return Authorization Code -- PATCH FILE #3
Comments
Gerst20051
changed the title
How To Got Authorization Code Back?
How To Get Authorization Code Back?
Aug 18, 2014
Gerst20051
changed the title
How To Get Authorization Code Back?
How To Get Authorization Code Back? PATCH
Aug 18, 2014
From 9360ee7a97edbfd175919f94098475584aa6b0ae Mon Sep 17 00:00:00 2001 From: Andrew Gerst <[email protected]> Date: Mon, 18 Aug 2014 19:16:51 -0400 Subject: [PATCH] fixed dialog to return authorization code --- src/io/oauth/OAuthData.java | 3 ++- src/io/oauth/OAuthDialog.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/io/oauth/OAuthData.java b/src/io/oauth/OAuthData.java index 7106682..878e080 100644 --- a/src/io/oauth/OAuthData.java +++ b/src/io/oauth/OAuthData.java @@ -16,9 +16,10 @@ public class OAuthData { public String provider; /** name of the provider */ public String state; /** state send */ + public String code; /** authorization code */ public String token; /** token received */ public String secret; /** secret received (only in oauth1) */ - public String status; /** status of the request (succes, error, ....) */ + public String status; /** status of the request (success, error, ....) */ public String expires_in; /** if the token expires */ public String error; /** error encountered */ public JSONObject request; /** API request description */ diff --git a/src/io/oauth/OAuthDialog.java b/src/io/oauth/OAuthDialog.java index 69ad7f4..ce25804 100644 --- a/src/io/oauth/OAuthDialog.java +++ b/src/io/oauth/OAuthDialog.java @@ -146,6 +146,8 @@ public class OAuthDialog extends Dialog { mdata.provider = jsonObj.getString("provider"); mdata.state = jsonObj.getString("state"); JSONObject data = jsonObj.getJSONObject("data"); + if (data.has("code")) + mdata.code = data.getString("code"); if (data.has("access_token")) mdata.token = data.getString("access_token"); else if (data.has("oauth_token")) -- 2.0.0 |
Gerst20051
changed the title
How To Get Authorization Code Back? PATCH
Return Authorization Code -- PATCH FILE
Aug 18, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please advise me? @bumpmann @thyb @william26
This Is How You Do It With JavaScript.
What I'm Trying To Do With Android
The text was updated successfully, but these errors were encountered: