Package org.scribe.oauth
Class OAuth10aServiceImpl
- java.lang.Object
-
- org.scribe.oauth.OAuth10aServiceImpl
-
- All Implemented Interfaces:
OAuthService
public class OAuth10aServiceImpl extends java.lang.Object implements OAuthService
OAuth 1.0a implementation ofOAuthService
-
-
Constructor Summary
Constructors Constructor Description OAuth10aServiceImpl(DefaultApi10a api, OAuthConfig config)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
getAccessToken(Token requestToken, Verifier verifier)
Retrieve the access tokenToken
getAccessToken(Token requestToken, Verifier verifier, int timeout, java.util.concurrent.TimeUnit unit)
Token
getAccessToken(Token requestToken, Verifier verifier, RequestTuner tuner)
java.lang.String
getAuthorizationUrl(Token requestToken)
Returns the URL where you should redirect your users to authenticate your application.Token
getRequestToken()
Retrieve the request token.Token
getRequestToken(int timeout, java.util.concurrent.TimeUnit unit)
Token
getRequestToken(RequestTuner tuner)
java.lang.String
getVersion()
Returns the OAuth version of the service.void
signRequest(Token token, OAuthRequest request)
Signs am OAuth request
-
-
-
Constructor Detail
-
OAuth10aServiceImpl
public OAuth10aServiceImpl(DefaultApi10a api, OAuthConfig config)
Default constructor- Parameters:
api
- OAuth1.0a api informationconfig
- OAuth 1.0a configuration param object
-
-
Method Detail
-
getRequestToken
public Token getRequestToken(int timeout, java.util.concurrent.TimeUnit unit)
-
getRequestToken
public Token getRequestToken()
Description copied from interface:OAuthService
Retrieve the request token.- Specified by:
getRequestToken
in interfaceOAuthService
- Returns:
- request token
-
getRequestToken
public Token getRequestToken(RequestTuner tuner)
-
getAccessToken
public Token getAccessToken(Token requestToken, Verifier verifier, int timeout, java.util.concurrent.TimeUnit unit)
-
getAccessToken
public Token getAccessToken(Token requestToken, Verifier verifier)
Description copied from interface:OAuthService
Retrieve the access token- Specified by:
getAccessToken
in interfaceOAuthService
- Parameters:
requestToken
- request token (obtained previously)verifier
- verifier code- Returns:
- access token
-
getAccessToken
public Token getAccessToken(Token requestToken, Verifier verifier, RequestTuner tuner)
-
signRequest
public void signRequest(Token token, OAuthRequest request)
Signs am OAuth request- Specified by:
signRequest
in interfaceOAuthService
- Parameters:
token
- access token (obtained previously)request
- request to sign
-
getVersion
public java.lang.String getVersion()
Returns the OAuth version of the service.- Specified by:
getVersion
in interfaceOAuthService
- Returns:
- oauth version as string
-
getAuthorizationUrl
public java.lang.String getAuthorizationUrl(Token requestToken)
Returns the URL where you should redirect your users to authenticate your application.- Specified by:
getAuthorizationUrl
in interfaceOAuthService
- Parameters:
requestToken
- the request token you need to authorize- Returns:
- the URL where you should redirect your users
-
-