I am using GoogleApps Directory api to access the Googleapps. I have one query regarding Proxy , how to set the proxy credentials using directory API's.
As per googleApps API's documentation i can use class "GoogleNetHttpTransport" to set the Proxy (port and host).
static HttpTransport newProxyTransport() throws GeneralSecurityException, IOException { NetHttpTransport.Builder builder = new NetHttpTransport.Builder(); builder.trustCertificates(GoogleUtils.getCertificateTrustStore()); builder.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 3128))); return builder.build(); }
But if i have credentials for proxy server then how can i set, there is no mention about setting up proxy credentials.
Is there any GoogleApps api which allow to set proxy credentials along with hostname and port?
If no , then should i go for setDefault(Authenticator) which will set the proxy credentials to system property ?
Can anyone have idea about this. Any input on this is highly appreciable!