org.springframework.security.oauth.consumer.client
Class OAuthRestTemplate

java.lang.Object
  extended by org.springframework.http.client.support.HttpAccessor
      extended by org.springframework.http.client.support.InterceptingHttpAccessor
          extended by org.springframework.web.client.RestTemplate
              extended by org.springframework.security.oauth.consumer.client.OAuthRestTemplate
All Implemented Interfaces:
org.springframework.web.client.RestOperations

public class OAuthRestTemplate
extends org.springframework.web.client.RestTemplate

Rest template that is able to make OAuth-authenticated REST requests with the credentials of the provided resource.

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class org.springframework.http.client.support.HttpAccessor
logger
 
Constructor Summary
OAuthRestTemplate(org.springframework.http.client.ClientHttpRequestFactory requestFactory, ProtectedResourceDetails resource)
           
OAuthRestTemplate(ProtectedResourceDetails resource)
           
 
Method Summary
 ProtectedResourceDetails getResource()
           
 OAuthConsumerSupport getSupport()
          The support logic to use.
 void setRequestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory)
           
 void setSupport(OAuthConsumerSupport support)
          The support logic to use.
 
Methods inherited from class org.springframework.web.client.RestTemplate
delete, delete, delete, doExecute, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, headForHeaders, headForHeaders, headForHeaders, optionsForAllow, optionsForAllow, optionsForAllow, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, setErrorHandler, setMessageConverters
 
Methods inherited from class org.springframework.http.client.support.InterceptingHttpAccessor
getInterceptors, getRequestFactory, setInterceptors
 
Methods inherited from class org.springframework.http.client.support.HttpAccessor
createRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthRestTemplate

public OAuthRestTemplate(ProtectedResourceDetails resource)

OAuthRestTemplate

public OAuthRestTemplate(org.springframework.http.client.ClientHttpRequestFactory requestFactory,
                         ProtectedResourceDetails resource)
Method Detail

setRequestFactory

public void setRequestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory)
Overrides:
setRequestFactory in class org.springframework.http.client.support.HttpAccessor

getResource

public ProtectedResourceDetails getResource()

getSupport

public OAuthConsumerSupport getSupport()
The support logic to use.

Returns:
The support logic to use.

setSupport

public void setSupport(OAuthConsumerSupport support)
The support logic to use.

Parameters:
support - The support logic to use.


Copyright © 2012. All Rights Reserved.