public interface OAuth1Operations
Modifier and Type | Method and Description |
---|---|
String |
buildAuthenticateUrl(String requestToken,
OAuth1Parameters parameters)
Construct the URL to redirect the user to for authentication.
|
String |
buildAuthorizeUrl(String requestToken,
OAuth1Parameters parameters)
Construct the URL to redirect the user to for authorization.
|
OAuthToken |
exchangeForAccessToken(AuthorizedRequestToken requestToken,
MultiValueMap<String,String> additionalParameters)
Exchange the authorized request token for an access token.
|
OAuthToken |
fetchRequestToken(String callbackUrl,
MultiValueMap<String,String> additionalParameters)
Begin a new authorization flow by fetching a new request token from this service provider.
|
OAuth1Version |
getVersion()
The version of OAuth1 implemented by this operations instance.
|
OAuth1Version getVersion()
OAuth1Version.CORE_10
,
OAuth1Version.CORE_10_REVISION_A
OAuthToken fetchRequestToken(String callbackUrl, MultiValueMap<String,String> additionalParameters)
access token
.callbackUrl
- the URL the provider should redirect to after the member authorizes the connection. Ignored for OAuth 1.0 providers.additionalParameters
- any additional query parameters to be sent when fetching the request token. Should not be encoded.String buildAuthorizeUrl(String requestToken, OAuth1Parameters parameters)
requestToken
- the request token value, to be encoded in the authorize URL.parameters
- parameters to pass to the provider in the authorize URL. Should never be null; if there are no parameters to pass, set this argument value to OAuth1Parameters.NONE
.String buildAuthenticateUrl(String requestToken, OAuth1Parameters parameters)
requestToken
- the request token value, to be encoded in the authorize URL.parameters
- parameters to pass to the provider in the authenticate URL. Should never be null; if there are no parameters to pass, set this argument value to OAuth1Parameters.NONE
.OAuthToken exchangeForAccessToken(AuthorizedRequestToken requestToken, MultiValueMap<String,String> additionalParameters)
requestToken
- an authorized request token and verifier. The verifier will be ignored for OAuth 1.0 providers.additionalParameters
- any additional query parameters to be sent when fetching the access token. Should not be encoded.