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 Details

    • SYSTEM_DEFAULT

      public static final OkAuthenticator 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 IOException
      React 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