|
@@ -29,7 +29,7 @@ public class FacebookAccessTokenValidator {
|
|
|
public boolean validateAccessToken(String accessToken) {
|
|
|
// Define the proxy server details
|
|
|
String proxyHost = "127.0.0.1";
|
|
|
-// System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
|
|
|
+ System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
|
|
|
|
|
|
int proxyPort = Integer.parseInt(env.getProperty("gfw.proxy.port"));
|
|
|
// Define the target URL
|
|
@@ -41,6 +41,7 @@ public class FacebookAccessTokenValidator {
|
|
|
HttpURLConnection connection = null;
|
|
|
try {
|
|
|
URL url = new URL(targetUrl);
|
|
|
+ System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");
|
|
|
connection = (HttpURLConnection) url.openConnection(proxy);
|
|
|
connection.setRequestMethod("GET");
|
|
|
StringBuilder responseBuilder = new StringBuilder();
|