public class MakeRequestClient extends Object
| Constructor and Description |
|---|
MakeRequestClient(SecurityToken securityToken,
org.apache.shindig.gadgets.oauth.OAuthFetcherConfig fetcherConfig,
FakeOAuthServiceProvider serviceProvider,
String serviceName)
Create a make request client with the given security token, sending requests through an
OAuth fetcher to an OAuth service provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
approveToken(String params)
Simulate the user visiting the service provider and approved access to their data.
|
void |
clearState() |
org.apache.shindig.gadgets.oauth.OAuthArguments |
getBaseArgs() |
org.apache.shindig.gadgets.oauth.OAuthArguments |
makeNonSocialOAuthArguments()
Create arguments simulating authz=OAUTH.
|
org.apache.shindig.gadgets.oauth.OAuthArguments |
makeSignedFetchArguments()
Create arguments simulating authz=SIGNED.
|
org.apache.shindig.gadgets.http.HttpResponse |
sendFormPost(String target,
String body)
Send an OAuth POST request to the given URL.
|
org.apache.shindig.gadgets.http.HttpResponse |
sendGet(String target)
Send an OAuth GET request to the given URL.
|
org.apache.shindig.gadgets.http.HttpResponse |
sendGetWithBody(String target,
String type,
byte[] body) |
org.apache.shindig.gadgets.http.HttpResponse |
sendRawPost(String target,
String type,
byte[] body)
Send an OAuth POST with binary data in the binary.
|
void |
setBaseArgs(org.apache.shindig.gadgets.oauth.OAuthArguments baseArgs)
Set the arguments to the OAuth fetch.
|
void |
setIgnoreCache(boolean ignoreCache) |
void |
setNextFetcher(org.apache.shindig.gadgets.http.HttpFetcher nextFetcher) |
void |
setReceivedCallbackUrl(String receivedCallbackUrl) |
void |
setTrustedParam(String name,
String value) |
public MakeRequestClient(SecurityToken securityToken, org.apache.shindig.gadgets.oauth.OAuthFetcherConfig fetcherConfig, FakeOAuthServiceProvider serviceProvider, String serviceName)
securityToken - identity of the user.fetcherConfig - configuration for the OAuthRequestserviceProvider - service provider being targeted.serviceName - nickname for the service being accessed.public void setBaseArgs(org.apache.shindig.gadgets.oauth.OAuthArguments baseArgs)
public org.apache.shindig.gadgets.oauth.OAuthArguments getBaseArgs()
public void setIgnoreCache(boolean ignoreCache)
public void setNextFetcher(org.apache.shindig.gadgets.http.HttpFetcher nextFetcher)
public org.apache.shindig.gadgets.http.HttpResponse sendGet(String target) throws Exception
Exceptionpublic org.apache.shindig.gadgets.http.HttpResponse sendGetWithBody(String target, String type, byte[] body)
public org.apache.shindig.gadgets.http.HttpResponse sendFormPost(String target, String body) throws Exception
Exceptionpublic org.apache.shindig.gadgets.http.HttpResponse sendRawPost(String target, String type, byte[] body) throws Exception
Exceptionpublic org.apache.shindig.gadgets.oauth.OAuthArguments makeNonSocialOAuthArguments()
public org.apache.shindig.gadgets.oauth.OAuthArguments makeSignedFetchArguments()
public void approveToken(String params) throws Exception
Exceptionpublic void setReceivedCallbackUrl(String receivedCallbackUrl)
public void clearState()
Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.