aboutsummaryrefslogtreecommitdiff
path: root/juick-www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-01-13 23:59:01 +0300
committerGravatar Vitaly Takmazov2017-01-14 00:08:11 +0300
commit053b61f24f52a6e48a5bf51fdbe7eae64c42d001 (patch)
treeadcb0bcd1f89bea20b5d1377847ba6c3707dc984 /juick-www
parent33af2da48a51f7e6e5c98016e308c61094cf2e0e (diff)
update dependencies
Diffstat (limited to 'juick-www')
-rw-r--r--juick-www/build.gradle4
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/TwitterAuth.java8
2 files changed, 7 insertions, 5 deletions
diff --git a/juick-www/build.gradle b/juick-www/build.gradle
index 26cf61da..ae9815d5 100644
--- a/juick-www/build.gradle
+++ b/juick-www/build.gradle
@@ -6,7 +6,7 @@ buildscript {
}
plugins {
- id "com.moowork.node" version "1.0.0"
+ id "com.moowork.node" version "1.1.0"
}
task compileFrontend(type: NpmTask) {
@@ -20,7 +20,7 @@ apply plugin: 'com.github.ben-manes.versions'
dependencies {
compile project(':juick-server')
- compile 'com.github.scribejava:scribejava-apis:3.4.1'
+ compile 'com.github.scribejava:scribejava-apis:4.0.0'
compile 'net.coobird:thumbnailator:0.4.8'
compile 'com.github.ooxi:serialized-php-parser:0.5.0'
compile 'com.mitchellbosecke:pebble:2.3.0'
diff --git a/juick-www/src/main/java/com/juick/www/controllers/TwitterAuth.java b/juick-www/src/main/java/com/juick/www/controllers/TwitterAuth.java
index 901a8362..9b09539e 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/TwitterAuth.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/TwitterAuth.java
@@ -21,6 +21,7 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+import java.util.concurrent.ExecutionException;
/**
* Created by vt on 01.12.2015.
@@ -49,7 +50,7 @@ public class TwitterAuth {
@RequestMapping(value = "/_twitter", method = RequestMethod.GET)
protected void doGet(HttpServletRequest request, HttpServletResponse response)
- throws IOException {
+ throws IOException, ExecutionException, InterruptedException {
String hash = StringUtils.EMPTY, request_token = StringUtils.EMPTY, request_token_secret = StringUtils.EMPTY;
String verifier = request.getParameter("oauth_verifier");
Cookie[] cookies = request.getCookies();
@@ -87,9 +88,10 @@ public class TwitterAuth {
if (verifier != null && verifier.length() > 0) {
OAuth1RequestToken requestToken = new OAuth1RequestToken(request_token, request_token_secret);
OAuth1AccessToken accessToken = oAuthService.getAccessToken(requestToken, verifier);
- OAuthRequest oAuthRequest = new OAuthRequest(Verb.GET, VERIFY_URL, oAuthService.getConfig());
+ OAuthRequest oAuthRequest = new OAuthRequest(Verb.GET, VERIFY_URL);
oAuthService.signRequest(accessToken, oAuthRequest);
- com.juick.www.twitter.User twitterUser = mapper.readValue(oAuthRequest.send().getBody(), com.juick.www.twitter.User.class);
+ com.juick.www.twitter.User twitterUser = mapper.readValue(oAuthService.execute(oAuthRequest).getBody(),
+ com.juick.www.twitter.User.class);
if (userService.linkTwitterAccount(user, accessToken.getToken(), accessToken.getTokenSecret(),
twitterUser.getScreenName())) {
response.setStatus(HttpServletResponse.SC_FOUND);