Class AuthConfig

    • Constructor Detail

      • AuthConfig

        public AuthConfig​(HTTPBuilder builder)
    • Method Detail

      • basic

        public void basic​(String user,
                          String pass)
        Set authentication credentials to be used for the current default host. This method name is a bit of a misnomer, since these credentials will actually work for "digest" authentication as well.
        Parameters:
        user -
        pass -
      • basic

        public void basic​(String host,
                          int port,
                          String user,
                          String pass)
        Set authentication credentials to be used for the given host and port.
        Parameters:
        host -
        port -
        user -
        pass -
      • ntlm

        public void ntlm​(String user,
                         String pass,
                         String workstation,
                         String domain)
        Set NTLM authentication credentials to be used for the current default host.
        Parameters:
        user -
        pass -
        workstation -
        domain -
      • ntlm

        public void ntlm​(String host,
                         int port,
                         String user,
                         String pass,
                         String workstation,
                         String domain)
        Set NTLM authentication credentials to be used for the given host and port.
        Parameters:
        host -
        port -
        user -
        pass -
        workstation -
        domain -
      • oauth

        public void oauth​(String consumerKey,
                          String consumerSecret,
                          String accessToken,
                          String secretToken)

        OAuth sign all requests. Note that this currently does not wait for a WWW-Authenticate challenge before sending the the OAuth header. All requests to all domains will be signed for this instance.

        This assumes you've already generated an accessToken and secretToken for the site you're targeting. For More information on how to achieve this, see the Signpost documentation.

        Parameters:
        consumerKey - null if you want to unset OAuth handling and stop signing requests.
        consumerSecret -
        accessToken -
        secretToken -
        Since:
        0.5.1