|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jayway.restassured.internal.http.AuthConfig
public class AuthConfig
Encapsulates all configuration related to HTTP authentication methods.
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. |
void |
oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken)
OAuth sign all requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HTTPBuilder builder
| Constructor Detail |
|---|
public AuthConfig(HTTPBuilder builder)
| Method Detail |
|---|
public void basic(String user,
String pass)
default host. This method name is a bit of
a misnomer, since these credentials will actually work for "digest"
authentication as well.
user - pass -
public void basic(String host,
int port,
String user,
String pass)
host - port - user - pass -
public void certificate(String certURL,
String password)
throws GeneralSecurityException,
IOException
Class.getResource(String) for how to get a URL from a resource
on the classpath.
certURL - URL to a JKS keystore where the certificate is stored.password - password to decrypt the keystore
GeneralSecurityException
IOException
public void oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken)
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.
consumerKey - null if you want to unset
OAuth handling and stop signing requests.consumerSecret - accessToken - secretToken -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||