Class HttpAuthenticator
java.lang.Object
com.squareup.okhttp.internal.http.HttpAuthenticator
public final class HttpAuthenticator extends Object
Handles HTTP authentication headers from origin and proxy servers.
-
Field Summary
Fields Modifier and Type Field Description static OkAuthenticatorSYSTEM_DEFAULTUses the global authenticator to get the password. -
Method Summary
Modifier and Type Method Description static booleanprocessAuthHeader(OkAuthenticator authenticator, int responseCode, RawHeaders responseHeaders, RawHeaders successorRequestHeaders, Proxy proxy, URL url)React to a failed authorization response by looking up new credentials.
-
Field Details
-
SYSTEM_DEFAULT
Uses the global authenticator to get the password.
-
-
Method Details
-
processAuthHeader
public static boolean processAuthHeader(OkAuthenticator authenticator, int responseCode, RawHeaders responseHeaders, RawHeaders successorRequestHeaders, Proxy proxy, URL url) throws IOExceptionReact to a failed authorization response by looking up new credentials.- Returns:
- true if credentials have been added to successorRequestHeaders and another request should be attempted.
- Throws:
IOException
-