Interface OkAuthenticator


public interface OkAuthenticator
Responds to authentication challenges from the remote web or proxy server by returning credentials.
  • Method Details

    • authenticate

      OkAuthenticator.Credential authenticate​(Proxy proxy, URL url, List<OkAuthenticator.Challenge> challenges) throws IOException
      Returns a credential that satisfies the authentication challenge made by url. Returns null if the challenge cannot be satisfied. This method is called in response to an HTTP 401 unauthorized status code sent by the origin server.
      Parameters:
      challenges - parsed "WWW-Authenticate" challenge headers from the HTTP response.
      Throws:
      IOException
    • authenticateProxy

      OkAuthenticator.Credential authenticateProxy​(Proxy proxy, URL url, List<OkAuthenticator.Challenge> challenges) throws IOException
      Returns a credential that satisfies the authentication challenge made by proxy. Returns null if the challenge cannot be satisfied. This method is called in response to an HTTP 401 unauthorized status code sent by the proxy server.
      Parameters:
      challenges - parsed "Proxy-Authenticate" challenge headers from the HTTP response.
      Throws:
      IOException