|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OAuthServiceHandler
Implementation of this interface is used to manage a generic OAuth Service
| Method Summary | |
|---|---|
OAuthToken |
getAccessToken()
|
String |
getAuthorizationUrl()
Returns the url to the OAuth service to ask an authorization to access the service. |
String |
getServiceLogo()
Returns the logo of the service |
OAuthServiceSettings |
getSettings()
|
String |
getType()
Returns the name/type of the Social Network we're connected to |
UserProfile |
getUser()
Returns the user who performed the connection |
String |
getVerifier()
Access to OAuth verifier |
String |
getVerifierParamName()
|
void |
initAccessToken()
Initialize the OAuth access token after the service gave an authorization with the Verifier |
Boolean |
isConnected()
Returns the status of this ServiceHndler |
void |
resetConnexion()
Close connexion and reste all token (logout) |
HttpResponse |
sendSignedRequest(RestVerb verb,
String uri)
Send an OAuth request signed without any parameter |
HttpResponse |
sendSignedRequest(RestVerb verb,
String uri,
Map<String,Object> params)
Send an OAuth request signed with a list a parameter |
HttpResponse |
sendSignedRequest(RestVerb verb,
String uri,
String key,
Object value)
Send an OAuth request signed with a single parameter |
HttpResponse |
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 |
setSettings(OAuthServiceSettings settings)
Initialize OAuth settings |
void |
setVerifier(String verifierStr)
Used to initialize verifier code returned by OAuth service |
| Method Detail |
|---|
OAuthToken getAccessToken()
String getAuthorizationUrl()
OAuthServiceSettings getSettings()
String getVerifier()
void initAccessToken()
HttpResponse sendSignedRequest(RestVerb verb,
String uri)
verb - a REST verburi - the REST address of the request
HttpResponse sendSignedRequest(RestVerb verb,
String uri,
Map<String,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
request
HttpResponse 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 parameter
void setSettings(OAuthServiceSettings settings)
settings - void setVerifier(String verifierStr)
verifierStr - String getServiceLogo()
Boolean isConnected()
UserProfile getUser()
String getType()
void setAccessToken(String token,
String secret)
token - public keysecret - secret keysvoid setAccessToken(OAuthToken token)
token - the token to setvoid resetConnexion()
HttpResponse 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 service
String getVerifierParamName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||