我在令牌请求中使用Google API(Google Firebase)时需要设置代理服务器
下面是我的Java代码。我需要将代理服务器合并到其中
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.xyz.com", 8080));
GoogleCredential googleCredential = GoogleCredential.fromStream(new FileInputStream("serviceaccount.json")).createScoped(Arrays.asList(SCOPES));
googleCredential.refreshToken();
log.info("Token2 "+googleCredential.getAccessToken());
return googleCredential.getAccessToken();