org.springframework.social.facebook.connect
Class FacebookOAuth2Template

java.lang.Object
  extended by org.springframework.social.oauth2.OAuth2Template
      extended by org.springframework.social.facebook.connect.FacebookOAuth2Template
All Implemented Interfaces:
org.springframework.social.oauth2.OAuth2Operations

public class FacebookOAuth2Template
extends org.springframework.social.oauth2.OAuth2Template

Facebook-specific extension of OAuth2Template to use a RestTemplate that recognizes form-encoded responses as "text/plain". Facebook token responses are form-encoded results with a content type of "text/plain", which prevents the FormHttpMessageConverter registered by default from parsing the results.


Constructor Summary
FacebookOAuth2Template(String clientId, String clientSecret)
           
 
Method Summary
protected  RestTemplate createRestTemplate()
           
protected  org.springframework.social.oauth2.AccessGrant postForAccessGrant(String accessTokenUrl, MultiValueMap<String,String> parameters)
           
 
Methods inherited from class org.springframework.social.oauth2.OAuth2Template
authenticateClient, authenticateClient, buildAuthenticateUrl, buildAuthenticateUrl, buildAuthorizeUrl, buildAuthorizeUrl, createAccessGrant, exchangeCredentialsForAccess, exchangeForAccess, getRestTemplate, refreshAccess, refreshAccess, setRequestFactory, setUseParametersForClientAuthentication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacebookOAuth2Template

public FacebookOAuth2Template(String clientId,
                              String clientSecret)
Method Detail

createRestTemplate

protected RestTemplate createRestTemplate()
Overrides:
createRestTemplate in class org.springframework.social.oauth2.OAuth2Template

postForAccessGrant

protected org.springframework.social.oauth2.AccessGrant postForAccessGrant(String accessTokenUrl,
                                                                           MultiValueMap<String,String> parameters)
Overrides:
postForAccessGrant in class org.springframework.social.oauth2.OAuth2Template