|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OAuthConsumerSupport
Consumer-side support for OAuth.
| Method Summary | |
|---|---|
URL |
configureURLForProtectedAccess(URL url,
OAuthConsumerToken accessToken,
String httpMethod,
Map<String,String> additionalParameters)
Create a configured URL. |
OAuthConsumerToken |
getAccessToken(OAuthConsumerToken requestToken,
String verifier)
Get an access token for a protected resource. |
OAuthConsumerToken |
getAccessToken(ProtectedResourceDetails resource,
OAuthConsumerToken requestToken,
String verifier)
Get an access token for a protected resource. |
String |
getAuthorizationHeader(ProtectedResourceDetails details,
OAuthConsumerToken accessToken,
URL url,
String httpMethod,
Map<String,String> additionalParameters)
Get the authorization header using the given access token that should be applied to the specified URL. |
String |
getOAuthQueryString(ProtectedResourceDetails details,
OAuthConsumerToken accessToken,
URL url,
String httpMethod,
Map<String,String> additionalParameters)
Get the query string that is to be used in the given request. |
OAuthConsumerToken |
getUnauthorizedRequestToken(ProtectedResourceDetails resource,
String callback)
Get an unauthorized request token for a protected resource. |
OAuthConsumerToken |
getUnauthorizedRequestToken(String resourceId,
String callback)
Get an unauthorized request token for a protected resource. |
InputStream |
readProtectedResource(URL url,
OAuthConsumerToken accessToken,
String httpMethod)
Read a protected resource from the given URL using the specified access token and HTTP method. |
| Method Detail |
|---|
OAuthConsumerToken getUnauthorizedRequestToken(String resourceId,
String callback)
throws OAuthRequestFailedException
resourceId - The id of the protected resource for which to get a consumer token.callback - The callback URL.
OAuthRequestFailedException
OAuthConsumerToken getUnauthorizedRequestToken(ProtectedResourceDetails resource,
String callback)
throws OAuthRequestFailedException
resource - The protected resource for which to get a consumer token.callback - The callback URL.
OAuthRequestFailedException
OAuthConsumerToken getAccessToken(OAuthConsumerToken requestToken,
String verifier)
throws OAuthRequestFailedException
requestToken - The (presumably authorized) request token.verifier - The token verifier.
OAuthRequestFailedException
OAuthConsumerToken getAccessToken(ProtectedResourceDetails resource,
OAuthConsumerToken requestToken,
String verifier)
resource - The resource for which to get the access token.requestToken - The (presumably authorized) request token.verifier - The token verifier.
InputStream readProtectedResource(URL url,
OAuthConsumerToken accessToken,
String httpMethod)
throws OAuthRequestFailedException
url - The URL.accessToken - The access token.httpMethod - The HTTP method.
OAuthRequestFailedException
URL configureURLForProtectedAccess(URL url,
OAuthConsumerToken accessToken,
String httpMethod,
Map<String,String> additionalParameters)
throws OAuthRequestFailedException
url - The base URL.accessToken - The access token.httpMethod - The HTTP method.additionalParameters - Any additional request parameters.
OAuthRequestFailedException
String getAuthorizationHeader(ProtectedResourceDetails details,
OAuthConsumerToken accessToken,
URL url,
String httpMethod,
Map<String,String> additionalParameters)
details - The details of the protected resource.accessToken - The access token.url - The URL of the request.httpMethod - The http method for the protected resource.additionalParameters - Any additional request parameters.
String getOAuthQueryString(ProtectedResourceDetails details,
OAuthConsumerToken accessToken,
URL url,
String httpMethod,
Map<String,String> additionalParameters)
details - The resource details.accessToken - The access token.url - The URLhttpMethod - The http method.additionalParameters - Any additional OAuth request parameters.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||