rest-assured/src/main/java/io/restassured/RestAssured.java
public static AuthenticationScheme oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken, OAuthSignature signature) {
        OAuthScheme scheme = new OAuthScheme();
        scheme.setConsumerKey(consumerKey);
        scheme.setConsumerSecret(consumerSecret);
        scheme.setAccessToken(accessToken);
        scheme.setSecretToken(secretToken);
        scheme.setSignature(signature);
        return scheme;
    }
public static AuthenticationScheme oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken, OAuthSignature signature) {
        OAuthScheme scheme = new OAuthScheme();
        scheme.setConsumerKey(consumerKey);
        scheme.setConsumerSecret(consumerSecret);
        scheme.setAccessToken(accessToken);
        scheme.setSecretToken(secretToken);
        scheme.setSignature(signature);
        return scheme;
    }
public static AuthenticationScheme oauth ( String consumerKey , String consumerSecret , String accessToken , String secretToken , OAuthSignature signature ) { OAuthScheme scheme = new OAuthScheme ( ) ; scheme . setConsumerKey ( consumerKey ) ; scheme . setConsumerSecret ( consumerSecret ) ; scheme . setAccessToken ( accessToken ) ; scheme . setSecretToken ( secretToken ) ; scheme . setSignature ( signature ) ; return scheme ; }
Excerpt from the HttpBuilder docs:<br>
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 <a href="https://github.com/mttkay/signpost/blob/master/docs/GettingStarted.md#using-signpost">Signpost documentation</a>.

@param consumerKey
@param consumerSecret
@param accessToken
@param secretToken
@param signature
@return The authentication scheme
Excerpt from the HttpBuilder docs : <br > 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 <a href = https : // github . com / mttkay / signpost / blob / master / docs / GettingStarted . md#using - signpost > Signpost documentation< / a > .