Package org.scribe.oauth
Interface OAuthService
-
- All Known Implementing Classes:
OAuth10aServiceImpl,OAuth20ServiceImpl
public interface OAuthServiceThe main Scribe object. A facade responsible for the retrieval of request and access tokens and for the signing of HTTP requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TokengetAccessToken(Token requestToken, Verifier verifier)Retrieve the access tokenjava.lang.StringgetAuthorizationUrl(Token requestToken)Returns the URL where you should redirect your users to authenticate your application.TokengetRequestToken()Retrieve the request token.java.lang.StringgetVersion()Returns the OAuth version of the service.voidsignRequest(Token accessToken, OAuthRequest request)Signs am OAuth request
-
-
-
Method Detail
-
getRequestToken
Token getRequestToken()
Retrieve the request token.- Returns:
- request token
-
getAccessToken
Token getAccessToken(Token requestToken, Verifier verifier)
Retrieve the access token- Parameters:
requestToken- request token (obtained previously)verifier- verifier code- Returns:
- access token
-
signRequest
void signRequest(Token accessToken, OAuthRequest request)
Signs am OAuth request- Parameters:
accessToken- access token (obtained previously)request- request to sign
-
getVersion
java.lang.String getVersion()
Returns the OAuth version of the service.- Returns:
- oauth version as string
-
getAuthorizationUrl
java.lang.String getAuthorizationUrl(Token requestToken)
Returns the URL where you should redirect your users to authenticate your application.- Parameters:
requestToken- the request token you need to authorize- Returns:
- the URL where you should redirect your users
-
-