groovyx.net.http
Class AuthConfig

java.lang.Object
  extended by groovyx.net.http.AuthConfig

public class AuthConfig
extends Object

Encapsulates all configuration related to HTTP authentication methods.

Author:
Tom Nichols
See Also:
HTTPBuilder.getAuth()

Field Summary
protected  HTTPBuilder builder
           
 
Constructor Summary
AuthConfig(HTTPBuilder builder)
           
 
Method Summary
 void basic(String host, int port, String user, String pass)
          Set authentication credentials to be used for the given host and port.
 void basic(String user, String pass)
          Set authentication credentials to be used for the current default host.
 void certificate(String certURL, String password)
          Sets a certificate to be used for SSL authentication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builder

protected HTTPBuilder builder
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 -

certificate

public void certificate(String certURL,
                        String password)
                 throws GeneralSecurityException,
                        MalformedURLException,
                        IOException
Sets a certificate to be used for SSL authentication.

Parameters:
certURL - URL to a JKS keystore where the certificate is stored
password - password to decrypt the keystore
Throws:
GeneralSecurityException
MalformedURLException
IOException


Copyright © 2008-2009. All Rights Reserved.