Package org.scribe.oauth
Class OAuth20ServiceImpl
java.lang.Object
org.scribe.oauth.OAuth20ServiceImpl
- All Implemented Interfaces:
OAuthService
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth20ServiceImpl(DefaultApi20 api, OAuthConfig config) Default constructor -
Method Summary
Modifier and TypeMethodDescriptiongetAccessToken(Token requestToken, Verifier verifier) Retrieve the access tokengetAuthorizationUrl(Token requestToken) Returns the URL where you should redirect your users to authenticate your application.Retrieve the request token.Returns the OAuth version of the service.voidsignRequest(Token accessToken, OAuthRequest request) Signs am OAuth request
-
Constructor Details
-
OAuth20ServiceImpl
Default constructor- Parameters:
api- OAuth2.0 api informationconfig- OAuth 2.0 configuration param object
-
-
Method Details
-
getAccessToken
Retrieve the access token- Specified by:
getAccessTokenin interfaceOAuthService- Parameters:
requestToken- request token (obtained previously)verifier- verifier code- Returns:
- access token
-
getRequestToken
Retrieve the request token.- Specified by:
getRequestTokenin interfaceOAuthService- Returns:
- request token
-
getVersion
Returns the OAuth version of the service.- Specified by:
getVersionin interfaceOAuthService- Returns:
- oauth version as string
-
signRequest
Signs am OAuth request- Specified by:
signRequestin interfaceOAuthService- Parameters:
accessToken- access token (obtained previously)request- request to sign
-
getAuthorizationUrl
Returns the URL where you should redirect your users to authenticate your application.- Specified by:
getAuthorizationUrlin interfaceOAuthService- Parameters:
requestToken- the request token you need to authorize- Returns:
- the URL where you should redirect your users
-