public interface OAuth1Adapter extends OAuthAdapter, OAuth1Connector
Modifier and Type | Method and Description |
---|---|
String |
authorize(Map<String,String> extraParameters,
String requestTokenUrl,
String accessTokenUrl,
String authorizationUrl,
String redirectUri)
Builds the authorization url to initiate the OAuth dance
|
void |
fetchAccessToken(String requestTokenUrl,
String accessTokenUrl,
String authorizationUrl,
String redirectUri)
Fetches an access token and stores it into this adapter
|
String |
getAccessTokenSecret()
Retrieves the accessTokenSecret
|
oauth.signpost.OAuthConsumer |
getConsumer()
Returns an OAuthConsumer for this adapter
|
OAuth1Manager |
getOauth1Manager()
Gets an instance of
OAuth1Manager serving this
adapter |
RestoreAccessTokenCallback |
getOauthRestoreAccessToken()
Get the callback to be called when the access token and secret need to be
restored
|
SaveAccessTokenCallback |
getOauthSaveAccessToken()
Get the callback to be called when the access token and secret need to be
saved for later restoration
|
String |
getRequestToken()
Returns the request token
|
String |
getRequestTokenSecret()
Gets the request token secret
|
String |
getRequestTokenUrl()
Retrieves requestTokenUrl
|
void |
reset()
Sets the adapter to a blank unauthorized state
|
void |
setAccessTokenSecret(String value)
Sets access token secret
|
void |
setConsumer(oauth.signpost.OAuthConsumer consumer)
Sets the OAuthConsumer
|
void |
setOauthRestoreAccessToken(RestoreAccessTokenCallback restoreCallback)
Set the callback to be called when the access token and secret need to be
restored
|
void |
setOauthSaveAccessToken(SaveAccessTokenCallback saveCallback)
Set the callback to be called when the access token and secret need to be
saved for later restoration
|
void |
setRequestToken(String requestToken)
Sets the request token
|
void |
setRequestTokenSecret(String requestTokenSecret)
Sets the request token secret
|
void |
setRequestTokenUrl(String value)
Sets requestTokenUrl
|
getOauthVerifier, hasBeenAuthorized, setAccessToken, setAccessTokenUrl, setAuthorizationUrl, setOauthVerifier
getOnNoTokenPolicy, setOnNoTokenPolicy
getAccessToken, getAccessTokenUrl, getAuthorizationUrl, getConsumerKey, getConsumerSecret, getMessageSigner, getScope, getSigningStrategy, getVerifierRegex
void setRequestTokenUrl(String value)
value
- a request token urlString getRequestTokenUrl()
String authorize(Map<String,String> extraParameters, String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
extraParameters
- provider specific extra parametersrequestTokenUrl
- the url of the request token serveraccessTokenUrl
- the url of the access token serverauthorizationUrl
- the url of the authorization serverredirectUri
- the redirection uriorg.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
void fetchAccessToken(String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
requestTokenUrl
- the url of the request token serveraccessTokenUrl
- the url of the access token serverauthorizationUrl
- the url of the authorization serverredirectUri
- the redirection uriorg.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
void setOauthSaveAccessToken(SaveAccessTokenCallback saveCallback)
saveCallback
- Callback to be calledvoid setOauthRestoreAccessToken(RestoreAccessTokenCallback restoreCallback)
restoreCallback
- Callback to be calledSaveAccessTokenCallback getOauthSaveAccessToken()
RestoreAccessTokenCallback getOauthRestoreAccessToken()
String getAccessTokenSecret()
void setAccessTokenSecret(String value)
value
- an accessTokenSecretString getRequestToken()
void setRequestToken(String requestToken)
requestToken
- a request tokenString getRequestTokenSecret()
void setRequestTokenSecret(String requestTokenSecret)
oauth.signpost.OAuthConsumer getConsumer()
OAuthConsumer
void setConsumer(oauth.signpost.OAuthConsumer consumer)
consumer
- an instance of OAuthConsumer
void reset()
OAuth1Manager getOauth1Manager()
OAuth1Manager
serving this
adapterOAuth1Manager
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.