Open
Description
Hi.
I'm using the library to call but the company I work for has a proxy that requires credentials.
How do I set up the credentials?
I already set up the default ProxySelector, which the library is using:
ProxySelector.setDefault(ProxySelector.of(new InetSocketAddress("host", 9999)));
I also set up the default Authenticator, but its method is not executed when I try to interact with the API using the library methods, which results in HTTP error 407 Proxy Authentication Required:
Authenticator.setDefault(
new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
if (getRequestorType() == RequestorType.PROXY) {
return new PasswordAuthentication("proxyUsername", "proxyPassword".toCharArray());
}
return null;
}
});
Thanks for your attention.
Metadata
Metadata
Assignees
Labels
No labels