public final class JavaNetAuthenticator extends java.lang.Object implements Authenticator
Authenticator
to Authenticator
. Configure OkHttp to use Authenticator
with OkHttpClient.Builder.authenticator
or OkHttpClient.Builder.proxyAuthenticator(Authenticator)
.NONE
Constructor and Description |
---|
JavaNetAuthenticator() |
Modifier and Type | Method and Description |
---|---|
Request |
authenticate(Route route,
Response response)
Returns a request that includes a credential to satisfy an authentication challenge in
response . |
private java.net.InetAddress |
getConnectToInetAddress(java.net.Proxy proxy,
HttpUrl url) |
public Request authenticate(Route route, Response response) throws java.io.IOException
Authenticator
response
. Returns null if the challenge cannot be satisfied.authenticate
in interface Authenticator
java.io.IOException
private java.net.InetAddress getConnectToInetAddress(java.net.Proxy proxy, HttpUrl url) throws java.io.IOException
java.io.IOException