aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/SocialLogin.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-10-02 17:53:34 +0300
committerGravatar Vitaly Takmazov2020-10-02 17:53:34 +0300
commita62c1fda358f54bd3e7de9aea94ce63e89e06142 (patch)
treed6f4734e5150f849ae782ea35812bed139f5d029 /src/main/java/com/juick/www/controllers/SocialLogin.java
parent4eab4c56d571cbd318391c26ccb5b02aa68029e1 (diff)
Apply fixes from some IDEA code inspections
Diffstat (limited to 'src/main/java/com/juick/www/controllers/SocialLogin.java')
-rw-r--r--src/main/java/com/juick/www/controllers/SocialLogin.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/juick/www/controllers/SocialLogin.java b/src/main/java/com/juick/www/controllers/SocialLogin.java
index ffd785b7..1f99efc1 100644
--- a/src/main/java/com/juick/www/controllers/SocialLogin.java
+++ b/src/main/java/com/juick/www/controllers/SocialLogin.java
@@ -24,15 +24,13 @@ import com.github.scribejava.core.oauth.OAuth10aService;
import com.github.scribejava.core.oauth.OAuth20Service;
import com.juick.model.ext.facebook.User;
import com.juick.model.ext.vk.UsersResponse;
-import com.juick.util.HttpBadRequestException;
import com.juick.service.CrosspostService;
import com.juick.service.EmailService;
import com.juick.service.TelegramService;
import com.juick.service.UserService;
import com.juick.service.security.annotation.Visitor;
+import com.juick.util.HttpBadRequestException;
import com.juick.util.WebUtils;
-import com.nimbusds.jose.JOSEException;
-import com.nimbusds.jose.proc.BadJOSEException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.HmacAlgorithms;
import org.apache.commons.codec.digest.HmacUtils;
@@ -55,7 +53,6 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.text.ParseException;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@@ -341,7 +338,9 @@ public class SocialLogin {
throw new HttpBadRequestException();
}
@PostMapping("/_apple")
- public String doVerifyAppleResponse(HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, String> body) throws InterruptedException, ExecutionException, IOException, ParseException, JOSEException, BadJOSEException {
+ public String doVerifyAppleResponse(HttpServletRequest request, HttpServletResponse response,
+ @RequestParam Map<String, String> body)
+ throws InterruptedException, ExecutionException, IOException {
OAuth2AccessToken token = appleSignInService.getAccessToken(body.get("code"));
var jsonNode = jsonMapper.readTree(token.getRawResponse());
var idToken = jsonNode.get("id_token").textValue();