public class OAuth10aService extends OAuthService
OAuthService
Constructor and Description |
---|
OAuth10aService(DefaultApi10a api,
OAuthConfig config)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
OAuth1AccessToken |
getAccessToken(OAuth1RequestToken requestToken,
String oauthVerifier) |
Future<OAuth1AccessToken> |
getAccessTokenAsync(OAuth1RequestToken requestToken,
String oauthVerifier,
OAuthAsyncRequestCallback<OAuth1AccessToken> callback)
Start the request to retrieve the access token.
|
Future<OAuth1AccessToken> |
getAccessTokenAsync(OAuth1RequestToken requestToken,
String oauthVerifier,
OAuthAsyncRequestCallback<OAuth1AccessToken> callback,
com.ning.http.client.ProxyServer proxyServer) |
DefaultApi10a |
getApi() |
String |
getAuthorizationUrl(OAuth1RequestToken requestToken)
Returns the URL where you should redirect your users to authenticate your
application.
|
OAuth1RequestToken |
getRequestToken()
Retrieve the request token.
|
String |
getVersion()
Returns the OAuth version of the service.
|
protected void |
prepareAccessTokenRequest(AbstractRequest request,
OAuth1RequestToken requestToken,
String oauthVerifier) |
void |
signRequest(OAuth1AccessToken token,
AbstractRequest request) |
closeAsyncClient, getAsyncHttpClient, getConfig
public OAuth10aService(DefaultApi10a api, OAuthConfig config)
api
- OAuth1.0a api informationconfig
- OAuth 1.0a configuration param objectpublic OAuth1RequestToken getRequestToken()
public final OAuth1AccessToken getAccessToken(OAuth1RequestToken requestToken, String oauthVerifier)
public final Future<OAuth1AccessToken> getAccessTokenAsync(OAuth1RequestToken requestToken, String oauthVerifier, OAuthAsyncRequestCallback<OAuth1AccessToken> callback)
requestToken
- request token (obtained previously or null)oauthVerifier
- oauth_verifiercallback
- optional callbackpublic final Future<OAuth1AccessToken> getAccessTokenAsync(OAuth1RequestToken requestToken, String oauthVerifier, OAuthAsyncRequestCallback<OAuth1AccessToken> callback, com.ning.http.client.ProxyServer proxyServer)
protected void prepareAccessTokenRequest(AbstractRequest request, OAuth1RequestToken requestToken, String oauthVerifier)
public void signRequest(OAuth1AccessToken token, AbstractRequest request)
public String getVersion()
OAuthService
getVersion
in class OAuthService
public String getAuthorizationUrl(OAuth1RequestToken requestToken)
requestToken
- the request token you need to authorizepublic DefaultApi10a getApi()
Copyright © 2016. All rights reserved.