org.springframework.social.oauth
Class OAuthSigningClientHttpRequest

java.lang.Object
  extended by org.springframework.http.client.AbstractClientHttpRequest
      extended by org.springframework.social.oauth.OAuthSigningClientHttpRequest
All Implemented Interfaces:
ClientHttpRequest, HttpMessage, HttpOutputMessage

public class OAuthSigningClientHttpRequest
extends AbstractClientHttpRequest

Implementation of ClientHttpRequest that wraps another ClientHttpRequest and signs it with an OAuth Authorization header before it is sent.


Constructor Summary
OAuthSigningClientHttpRequest(ClientHttpRequest delegate, OAuthClientRequestSigner signer)
          Creates an OAuthSigningClientHttpRequest.
 
Method Summary
protected  ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput)
           
 HttpMethod getMethod()
           
 java.net.URI getURI()
           
 
Methods inherited from class org.springframework.http.client.AbstractClientHttpRequest
execute, getBody, getHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthSigningClientHttpRequest

public OAuthSigningClientHttpRequest(ClientHttpRequest delegate,
                                     OAuthClientRequestSigner signer)
Creates an OAuthSigningClientHttpRequest.

Parameters:
delegate - The wrapped ClientHttpRequest that is to be signed
signer - An OAuth signer
Method Detail

executeInternal

protected ClientHttpResponse executeInternal(HttpHeaders headers,
                                             byte[] bufferedOutput)
                                      throws java.io.IOException
Specified by:
executeInternal in class AbstractClientHttpRequest
Throws:
java.io.IOException

getURI

public java.net.URI getURI()

getMethod

public HttpMethod getMethod()