org.brickred.socialauth.util
Class ProviderSupport

java.lang.Object
  extended by org.brickred.socialauth.util.ProviderSupport

public class ProviderSupport
extends Object

This provides the functionality to make OAuth specific HTTP call for a provider

Author:
tarun.nagpal

Constructor Summary
ProviderSupport(OAuthStrategyBase strategy)
           
 
Method Summary
 Response api(String url)
          Makes OAuth signed HTTP GET request to a given URL.
 Response api(String url, String methodType, Map<String,String> params, Map<String,String> headerParams, String body)
          Makes OAuth signed HTTP request to a given URL.
 AccessGrant getAccessGrant()
          Retrieves the AccessGrant object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderSupport

public ProviderSupport(OAuthStrategyBase strategy)
Parameters:
strategy - OAuth stragtegy object
Method Detail

api

public Response api(String url,
                    String methodType,
                    Map<String,String> params,
                    Map<String,String> headerParams,
                    String body)
             throws Exception
Makes OAuth signed HTTP request to a given URL.

Parameters:
url - URL to make HTTP request.
methodType - Method type can be GET, POST or PUT
params - Any additional parameters whose signature need to compute. Only used in case of "POST" and "PUT" method type.
headerParams - Any additional parameters need to pass as Header Parameters
body - Request Body
Returns:
Response object
Throws:
Exception

api

public Response api(String url)
             throws Exception
Makes OAuth signed HTTP GET request to a given URL.

Parameters:
url - URL to make HTTP request.
Returns:
Response object
Throws:
Exception

getAccessGrant

public AccessGrant getAccessGrant()
Retrieves the AccessGrant object.

Returns:
AccessGrant object.


Copyright © 2013. All Rights Reserved.