ramarao1990 / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

(Better) Proxy support required #147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Problem:
My problem is that openid4java uses Apache HttpClient, but doesn't set any 
proxy setting.
The HttpClient library requires that proxy settings are programmatically set.

Your suggestion to use HttpClientFactory.setProxyProperties(proxyProperties) is 
a bad idea, because the usage of a proxy depends on the transport protocol.

That's why the system properties http.proxyHost and https.proxyHost exist.

What do you see instead?
Depending on http.proxyHost an https.proxyHost, please set an proxy for every 
HTTP request at openid4j.

What version of the product are you using? On what operating system?
0.9.5, windows and debian linux.

Please provide any additional information below.
Example settings:
 -Dhttp.proxyHost=httpProxy.company.com \
 -Dhttp.proxyPort=1080 \
 -Dhttps.proxyHost=httpsProxy.company.com \
 -Dhttps.proxyPort=1443 \

Original issue reported on code.google.com by ingo.sie...@gmail.com on 13 Apr 2011 at 1:08

GoogleCodeExporter commented 8 years ago
Hi guys,
any update on this?

Another interesting feature is the possibility to express the option
-Dhttp.nonProxyHosts=

Original comment by andrea.c...@gmail.com on 12 Jul 2012 at 8:53

GoogleCodeExporter commented 8 years ago
Hi everyone,

We have recently faced the same issue.
Here's patch for r735 that enables support for proxy properties described in 
http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html , i.e. 
enables usage of system-wide proxy selector java.net.ProxySelector#getDefault 

Note this patch contains incompatible changes in 
org.openid4java.util.ProxyProperties (proxyHost and proxyPort fields were 
removed to avoid ambiguity). Class usage has been reduced to specify proxy 
user/pass OR Windows-related credentials as in 
org.apache.http.auth.NTCredentials javadoc. 

Next properties were manually tested on Ubuntu 12.04 with Squid:
-Dhttp.proxyHost
-Dhttp.proxyPort
-Dhttp.nonProxyHosts

Others should also work fine.

Original comment by Vasyl.Sc...@gmail.com on 19 Mar 2013 at 3:52

Attachments: