public class OAuth2LeggedScheme extends Object implements AuthScheme
| Modifier and Type | Field and Description |
|---|---|
protected String |
consumerKey |
protected String |
consumerSecret |
| Constructor and Description |
|---|
OAuth2LeggedScheme(String consumerKey,
String consumerSecret)
Creates and returns a new
OAuth2LeggedScheme configured with the
passed key and secret, leaving the requester ID field null. |
OAuth2LeggedScheme(String consumerKey,
String consumerSecret,
String requesterId)
Creates and returns a new
OAuth2LeggedScheme configured with the
passed key, secret, and requester ID. |
| Modifier and Type | Method and Description |
|---|---|
protected InputStream |
byteArrayToStream(byte[] bytes) |
String |
getConsumerKey() |
String |
getConsumerSecret() |
protected net.oauth.http.HttpMessage |
getHttpMessage(net.oauth.OAuthMessage message,
net.oauth.OAuthAccessor accessor,
byte[] body,
boolean signBodyHash) |
net.oauth.http.HttpMessage |
getHttpMessage(Provider provider,
String method,
String url,
Map<String,String> headers,
byte[] body) |
String |
getRequesterId() |
protected String consumerKey
protected String consumerSecret
public OAuth2LeggedScheme(String consumerKey, String consumerSecret)
OAuth2LeggedScheme configured with the
passed key and secret, leaving the requester ID field null.consumerKey - key provided by an OpenSocial container after
registering a new OpenSocial gadgetconsumerSecret - secret provided by an OpenSocial container after
registering a new OpenSocial gadgetpublic OAuth2LeggedScheme(String consumerKey, String consumerSecret, String requesterId)
OAuth2LeggedScheme configured with the
passed key, secret, and requester ID.consumerKey - key provided by an OpenSocial container after
registering a new OpenSocial gadgetconsumerSecret - secret provided by an OpenSocial container after
registering a new OpenSocial gadgetrequesterId - OpenSocial ID of user on whose behalf the OpenSocial
calls are being madepublic net.oauth.http.HttpMessage getHttpMessage(Provider provider, String method, String url, Map<String,String> headers, byte[] body) throws RequestException, IOException
getHttpMessage in interface AuthSchemeRequestExceptionIOExceptionpublic String getRequesterId()
public String getConsumerKey()
public String getConsumerSecret()
protected InputStream byteArrayToStream(byte[] bytes)
protected net.oauth.http.HttpMessage getHttpMessage(net.oauth.OAuthMessage message,
net.oauth.OAuthAccessor accessor,
byte[] body,
boolean signBodyHash)
throws IOException,
RequestException
IOExceptionRequestExceptionCopyright © 2012. All Rights Reserved.