aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api/ApiSocialLogin.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-12-12 11:28:12 +0300
committerGravatar Vitaly Takmazov2019-12-12 11:28:12 +0300
commitf462d7335567960978e16c5e042c99b54daa94b6 (patch)
treef298f3ac50ed64d0292bba0a8a6e148e8daa434c /src/main/java/com/juick/server/api/ApiSocialLogin.java
parentc0ae480bb5c07ea7b9e1b42df428e2857b0d4816 (diff)
Cleanup IDEA code issues
Diffstat (limited to 'src/main/java/com/juick/server/api/ApiSocialLogin.java')
-rw-r--r--src/main/java/com/juick/server/api/ApiSocialLogin.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/server/api/ApiSocialLogin.java
index 2d0a5c7e..efbb56f4 100644
--- a/src/main/java/com/juick/server/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/server/api/ApiSocialLogin.java
@@ -79,7 +79,6 @@ public class ApiSocialLogin {
private static final String TWITTER_VERIFY_URL = "https://api.twitter.com/1.1/account/verify_credentials.json";
@Inject
private ObjectMapper jsonMapper;
- private ServiceBuilder facebookBuilder, twitterBuilder, vkBuilder;
private OAuth20Service facebookAuthService, vkAuthService;
@Value("${twitter_consumer_key:appid}")
@@ -110,9 +109,9 @@ public class ApiSocialLogin {
@PostConstruct
public void init() {
- facebookBuilder = new ServiceBuilder(FACEBOOK_APPID);
- twitterBuilder = new ServiceBuilder(twitterConsumerKey);
- vkBuilder = new ServiceBuilder(VK_APPID);
+ ServiceBuilder facebookBuilder = new ServiceBuilder(FACEBOOK_APPID);
+ ServiceBuilder twitterBuilder = new ServiceBuilder(twitterConsumerKey);
+ ServiceBuilder vkBuilder = new ServiceBuilder(VK_APPID);
verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory)
.setAudience(Collections.singletonList(googleClientId))
.build();
@@ -260,7 +259,7 @@ public class ApiSocialLogin {
throw new HttpBadRequestException();
}
- Long vkID = NumberUtils.toLong(jsonUser.getId(), 0);
+ long vkID = NumberUtils.toLong(jsonUser.getId(), 0);
int uid = crosspostService.getUIDbyVKID(vkID);
if (uid > 0) {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(redirectUrl);