diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-08 14:46:18 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-09-08 14:46:18 +0200 |
commit | a5eea6c200431aef2a87474ac9042ea3062f0230 (patch) | |
tree | db8dc08eee99e960d9ec7e816601c202c41153ca /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui | |
parent | 79f6ade24049bc745cc6a3a3e08336cde06081bf (diff) | |
download | open-keychain-a5eea6c200431aef2a87474ac9042ea3062f0230.tar.gz open-keychain-a5eea6c200431aef2a87474ac9042ea3062f0230.tar.bz2 open-keychain-a5eea6c200431aef2a87474ac9042ea3062f0230.zip |
linked: move client id and secret into static vars (build vars later)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/linked/LinkedIdCreateGithubFragment.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/linked/LinkedIdCreateGithubFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/linked/LinkedIdCreateGithubFragment.java index eeb2ad116..5e8d60b8d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/linked/LinkedIdCreateGithubFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/linked/LinkedIdCreateGithubFragment.java @@ -78,6 +78,9 @@ import org.sufficientlysecure.keychain.util.Log; public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKeyringParcel,EditKeyResult> { + public static final String GITHUB_CLIENT_ID = "7a011b66275f244d3f21"; + public static final String GITHUB_CLIENT_SECRET = "eaced8a6655719d8c6848396de97b3f5d7a89fec"; + ViewAnimator mButtonContainer; StatusIndicator mStatus1, mStatus2, mStatus3; @@ -154,7 +157,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe new Handler().postDelayed(new Runnable() { @Override public void run() { - oAuthRequest("github.com/login/oauth/authorize", "7a011b66275f244d3f21", "gist"); + oAuthRequest("github.com/login/oauth/authorize", GITHUB_CLIENT_ID, "gist"); } }, 300); @@ -185,8 +188,8 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe try { JSONObject params = new JSONObject(); - params.put("client_id", "7a011b66275f244d3f21"); - params.put("client_secret", "eaced8a6655719d8c6848396de97b3f5d7a89fec"); + params.put("client_id", GITHUB_CLIENT_ID); + params.put("client_secret", GITHUB_CLIENT_SECRET); params.put("code", oAuthCode); params.put("state", oAuthState); @@ -285,6 +288,7 @@ public class LinkedIdCreateGithubFragment extends CryptoOperationFragment<SaveKe linkedItem.setTransitionName(resource.toUri().toString()); } + // we only need authorization for this one operation, drop it afterwards revokeToken(accessToken); mStatus2.setDisplayedChild(2); |