public interface OAuthService extends RestService, QualifierAware
| Modifier and Type | Method and Description |
|---|---|
OAuthToken |
getAccessToken() |
String |
getAuthorizationUrl()
Returns the url to the OAuth service to ask an authorization to access the service.
|
OAuthSession |
getSession() |
String |
getVerifier()
Access to OAuth verifier
|
void |
initAccessToken()
Initialize the OAuth access token after the service gave an authorization with the Verifier
|
void |
requireAuthorization() |
RestResponse |
sendSignedRequest(OAuthRequest request) |
RestResponse |
sendSignedRequest(RestVerb verb,
String uri)
Send an OAuth request signed without any parameter
|
RestResponse |
sendSignedRequest(RestVerb verb,
String uri,
Map<String,? extends Object> params)
Send an OAuth request signed with a list a parameter
|
RestResponse |
sendSignedRequest(RestVerb verb,
String uri,
String key,
Object value)
Send an OAuth request signed with a single parameter
|
RestResponse |
sendSignedXmlRequest(RestVerb verb,
String uri,
String payload)
Send an OAuth request signed with an XML Paylad as content
|
void |
setAccessToken(OAuthToken token)
Set the Access Token with for an OAuth access
|
void |
setAccessToken(String token,
String secret)
Initialize and set an OAuth access token from its public and private keys
|
void |
setVerifier(String verifierStr)
Used to initialize verifier code returned by OAuth service
|
delete, getForObject, getForObject, getForObject, getMyProfile, getRequestHeader, getType, isConnected, postForLocation, postForLocation, postForObject, put, resetConnection, setRequestHeadergetQualifierOAuthToken getAccessToken()
String getAuthorizationUrl()
String getVerifier()
void initAccessToken()
RestResponse sendSignedRequest(RestVerb verb, String uri)
verb - a REST verburi - the REST address of the requestRestResponse sendSignedRequest(RestVerb verb, String uri, Map<String,? extends Object> params)
verb - a REST verburi - the REST address of the requestparams - a Map of key value parameters to send in the header of the requestRestResponse sendSignedRequest(RestVerb verb, String uri, String key, Object value)
verb - a REST verburi - the REST address of the requestkey - name of the parametervalue - value of the parametervoid setVerifier(String verifierStr)
verifierStr - void setAccessToken(String token, String secret)
token - public keysecret - secret keysvoid setAccessToken(OAuthToken token)
token - the token to setRestResponse sendSignedXmlRequest(RestVerb verb, String uri, String payload)
verb - the REST verb of the requesturi - the url of the remote requestpayload - the content of the XML payload to send to the serviceOAuthSession getSession()
void requireAuthorization()
RestResponse sendSignedRequest(OAuthRequest request)
request - Copyright © 2011-2013 Seam Framework. All Rights Reserved.