Sacrosanct / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

There is no proxy authentication #190

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-http-java-client (e.g. 1.5.0-beta)?
1.13.1-beta

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Java 7

Describe the problem.
I want my application to be able to access APIs behind a proxy that requires an 
authentication, but no proxy authentication is available. It is possible to set 
the proxy, but not to authenticate to it.

How would you expect it to be fixed?
Some parameters in the (Apache|Net)HttpTransport.Builder class should be set so 
we can use a proxy with authentication along with the proxy setting.

Original issue reported on code.google.com by ogregoire on 11 Jan 2013 at 9:56

GoogleCodeExporter commented 9 years ago
For reference, here are the methods to set the proxy:

http://javadoc.google-http-java-client.googlecode.com/hg/1.13.1-beta/com/google/
api/client/http/javanet/NetHttpTransport.Builder.html#setProxy(java.net.Proxy)

http://javadoc.google-http-java-client.googlecode.com/hg/1.13.1-beta/com/google/
api/client/http/apache/ApacheHttpTransport.Builder.html#setProxy(org.apache.http
.HttpHost)

What the library lacks is a built-in way to do proxy authentication.

If you have sample Java code snippets that would be really helpful.  Here's 
what I found with a quick Google search:

http://stackoverflow.com/questions/8669726/java-proxy-authentication (looks 
very promising if it works)

http://stackoverflow.com/questions/1626549/authenticated-http-proxy-with-java 
(a good work-around for now)

Original comment by yan...@google.com on 24 Jan 2013 at 2:23

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 24 Jan 2013 at 2:30

GoogleCodeExporter commented 9 years ago
I believe you found exactly how to properly identify as the two ways you 
googled work properly on my behind-authenticated-proxy system.

Original comment by ogregoire on 25 Jan 2013 at 4:08

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 6 Feb 2013 at 11:54

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 10 Jun 2013 at 1:09

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 26 Jul 2013 at 10:12

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 27 Sep 2013 at 11:56