com.jayway.restassured.specification
Interface AuthenticationSpecification

All Known Implementing Classes:
AuthenticationSpecificationImpl

public interface AuthenticationSpecification

Specify an authentication scheme to use when sending a request.


Method Summary
 RequestSpecification basic(String userName, String password)
          Use http basic authentication.
 RequestSpecification certificate(String certURL, String password)
          Sets a certificate to be used for SSL authentication.
 RequestSpecification digest(String userName, String password)
          Use http digest authentication.
 RequestSpecification oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken)
          Excerpt from the HttpBuilder docs:
OAuth sign the request.
 

Method Detail

basic

RequestSpecification basic(String userName,
                           String password)
Use http basic authentication.

Parameters:
userName - The user name.
password - The password.
Returns:
The request builder

digest

RequestSpecification digest(String userName,
                            String password)
Use http digest authentication.

Parameters:
userName - The user name.
password - The password.
Returns:
The request builder

certificate

RequestSpecification certificate(String certURL,
                                 String password)
Sets a certificate to be used for SSL authentication. See Class.getResource(String) for how to get a URL from a resource on the classpath.

Parameters:
certURL - URL to a JKS keystore where the certificate is stored.
password - password to decrypt the keystore
Returns:
The request com.jayway.restassured.specification

oauth

RequestSpecification oauth(String consumerKey,
                           String consumerSecret,
                           String accessToken,
                           String secretToken)
Excerpt from the HttpBuilder docs:
OAuth sign the request. 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 -
consumerSecret -
accessToken -
secretToken -
Returns:
The request com.jayway.restassured.specification


Copyright © 2010-2011. All Rights Reserved.