public interface OAuth
| Modifier and Type | Interface and Description |
|---|---|
static class |
OAuth.Method
HTTP request methods
|
| Modifier and Type | Method and Description |
|---|---|
Response |
request(URL url,
OAuth.Method method,
Token token)
Sends a request to the server and returns an input stream from which
the response can be read.
|
Response |
request(URL url,
OAuth.Method method,
Token token,
Map<String,String> additionalHeaders)
Sends a request to the server and returns an input stream from which
the response can be read.
|
Token |
requestTemporaryCredentials(URL url,
OAuth.Method method)
Requests temporary credentials.
|
Token |
requestTokenCredentials(URL url,
OAuth.Method method,
Token temporaryCredentials,
String verifier)
Requests token credentials.
|
Token requestTemporaryCredentials(URL url, OAuth.Method method) throws IOException
url - the URL from which the temporary credentials should be requestedmethod - the HTTP request methodIOException - if the request was not successfulRequestException - if the server returned an errorUnauthorizedException - if the request is not authorizedToken requestTokenCredentials(URL url, OAuth.Method method, Token temporaryCredentials, String verifier) throws IOException
requestTemporaryCredentials(URL, Method)url - the URL from which the token credentials should be requestedmethod - the HTTP request methodtemporaryCredentials - the temporary credentialsverifier - the verification code returned by the OAuth serverIOException - if the request was not successfulRequestException - if the server returned an errorUnauthorizedException - if the request is not authorizedResponse request(URL url, OAuth.Method method, Token token) throws IOException
url - the URL to send the request tomethod - the HTTP request methodtoken - a token used for authorization (may be null if the
authorization is not required for this request)IOException - if the request was not successfulRequestException - if the server returned an errorUnauthorizedException - if the request is not authorizedResponse request(URL url, OAuth.Method method, Token token, Map<String,String> additionalHeaders) throws IOException
url - the URL to send the request tomethod - the HTTP request methodtoken - a token used for authorization (may be null if the
authorization is not required for this request)additionalHeaders - additional HTTP headers (may be null)IOException - if the request was not successfulRequestException - if the server returned an errorUnauthorizedException - if the request is not authorized