Package org.scribe.oauth
Class OAuth20ServiceImpl
- java.lang.Object
-
- org.scribe.oauth.OAuth20ServiceImpl
-
- All Implemented Interfaces:
OAuthService
public class OAuth20ServiceImpl extends java.lang.Object implements OAuthService
-
-
Constructor Summary
Constructors Constructor Description OAuth20ServiceImpl(DefaultApi20 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 tokenjava.lang.String
getAuthorizationUrl(Token requestToken)
Returns the URL where you should redirect your users to authenticate your application.Token
getRequestToken()
Retrieve the request token.java.lang.String
getVersion()
Returns the OAuth version of the service.void
signRequest(Token accessToken, OAuthRequest request)
Signs am OAuth request
-
-
-
Constructor Detail
-
OAuth20ServiceImpl
public OAuth20ServiceImpl(DefaultApi20 api, OAuthConfig config)
Default constructor- Parameters:
api
- OAuth2.0 api informationconfig
- OAuth 2.0 configuration param object
-
-
Method Detail
-
getAccessToken
public Token getAccessToken(Token requestToken, Verifier verifier)
Retrieve the access token- Specified by:
getAccessToken
in interfaceOAuthService
- Parameters:
requestToken
- request token (obtained previously)verifier
- verifier code- Returns:
- access token
-
getRequestToken
public Token getRequestToken()
Retrieve the request token.- Specified by:
getRequestToken
in interfaceOAuthService
- Returns:
- request token
-
getVersion
public java.lang.String getVersion()
Returns the OAuth version of the service.- Specified by:
getVersion
in interfaceOAuthService
- Returns:
- oauth version as string
-
signRequest
public void signRequest(Token accessToken, OAuthRequest request)
Signs am OAuth request- Specified by:
signRequest
in interfaceOAuthService
- Parameters:
accessToken
- access token (obtained previously)request
- request to sign
-
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
-
-