aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-05-31 22:00:06 +0300
committerGravatar Vitaly Takmazov2023-05-31 22:24:06 +0300
commitc4c0c227205d96e436a70885611e955e6fef7746 (patch)
tree0286cf9bd1f07b5f06198135953d3067fee54fbd /src/main/java/com/juick/www
parent41d02443a7a86fec3e5cf520eabeee8cfb477ca0 (diff)
Modernize spring-security configuration and minor changes
* Clean up warnings
Diffstat (limited to 'src/main/java/com/juick/www')
-rw-r--r--src/main/java/com/juick/www/api/ApiSocialLogin.java3
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java1
-rw-r--r--src/main/java/com/juick/www/controllers/Help.java1
-rw-r--r--src/main/java/com/juick/www/controllers/SignUp.java1
-rw-r--r--src/main/java/com/juick/www/rss/MessagesView.java2
5 files changed, 0 insertions, 8 deletions
diff --git a/src/main/java/com/juick/www/api/ApiSocialLogin.java b/src/main/java/com/juick/www/api/ApiSocialLogin.java
index bf0d26bc..c8758d59 100644
--- a/src/main/java/com/juick/www/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/www/api/ApiSocialLogin.java
@@ -51,7 +51,6 @@ import org.springframework.web.util.UriComponentsBuilder;
import jakarta.annotation.PostConstruct;
import javax.inject.Inject;
import java.io.IOException;
-import java.security.GeneralSecurityException;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
@@ -72,7 +71,6 @@ public class ApiSocialLogin {
private String FACEBOOK_SECRET;
private static final String FACEBOOK_REDIRECT = "https://api.juick.com/_fblogin";
private static final String VK_REDIRECT = "https://api.juick.com/_vklogin";
- private static final String TWITTER_VERIFY_URL = "https://api.twitter.com/1.1/account/verify_credentials.json";
@Inject
private ObjectMapper jsonMapper;
private OAuth20Service facebookAuthService, vkAuthService, appleSignInService;
@@ -104,7 +102,6 @@ public class ApiSocialLogin {
@PostConstruct
public void init() {
ServiceBuilder facebookBuilder = new ServiceBuilder(FACEBOOK_APPID);
- ServiceBuilder twitterBuilder = new ServiceBuilder(twitterConsumerKey);
ServiceBuilder vkBuilder = new ServiceBuilder(VK_APPID);
facebookAuthService = facebookBuilder
.apiSecret(FACEBOOK_SECRET)
diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java
index a8ff003f..0a6726ee 100644
--- a/src/main/java/com/juick/www/api/activity/Profile.java
+++ b/src/main/java/com/juick/www/api/activity/Profile.java
@@ -74,7 +74,6 @@ import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.List;
-import java.util.NoSuchElementException;
import java.util.stream.Stream;
@RestController
diff --git a/src/main/java/com/juick/www/controllers/Help.java b/src/main/java/com/juick/www/controllers/Help.java
index ec60d7df..ae722594 100644
--- a/src/main/java/com/juick/www/controllers/Help.java
+++ b/src/main/java/com/juick/www/controllers/Help.java
@@ -27,7 +27,6 @@ import org.commonmark.renderer.html.HtmlRenderer;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import javax.inject.Inject;
diff --git a/src/main/java/com/juick/www/controllers/SignUp.java b/src/main/java/com/juick/www/controllers/SignUp.java
index 87182ebd..50ce6955 100644
--- a/src/main/java/com/juick/www/controllers/SignUp.java
+++ b/src/main/java/com/juick/www/controllers/SignUp.java
@@ -34,7 +34,6 @@ import org.springframework.security.web.authentication.rememberme.AbstractRememb
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
diff --git a/src/main/java/com/juick/www/rss/MessagesView.java b/src/main/java/com/juick/www/rss/MessagesView.java
index d6edeb28..cb4eea2e 100644
--- a/src/main/java/com/juick/www/rss/MessagesView.java
+++ b/src/main/java/com/juick/www/rss/MessagesView.java
@@ -24,8 +24,6 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
-import java.util.stream.Collectors;
-
import javax.inject.Inject;
import com.juick.model.Attachment;