public abstract class BaseOAuth1Manager extends DefaultHttpCallbackAdapter implements OAuth1Manager
PHASE_NAME| Constructor and Description |
|---|
BaseOAuth1Manager() |
| Modifier and Type | Method and Description |
|---|---|
String |
buildAuthorizeUrl(OAuth1Adapter adapter,
Map<String,String> extraParameters,
String requestTokenUrl,
String accessTokenUrl,
String authorizationUrl,
String redirectUri)
Builds the authorization url to initiate the OAuth dance
|
void |
fetchAccessToken(OAuth1Adapter adapter,
String requestTokenUrl,
String accessTokenUrl,
String authorizationUrl,
String redirectUri)
Retrieves the access token for the given adapter with the given parameters.
|
Connector |
getConnector()
Retrieves connector
|
protected oauth.signpost.OAuthConsumer |
getConsumer(OAuth1Adapter adapter) |
protected abstract org.slf4j.Logger |
getLogger() |
void |
hasBeenAuthorized(OAuth1Adapter adapter)
Determines if the adapter has been authorized or not by checking its access token
|
void |
reset(OAuth1Adapter adapter)
Sets the adapter to a blank, unatuhorized state
|
boolean |
restoreAccessToken(OAuth1Adapter adapter)
Restores the access token that belongs to the given adapter and sets its value
into it.
|
getAsync, getDomain, getLocalPort, getPath, getRemotePort, initialise, setAsync, setConnector, setDomain, setLocalPort, setPath, setRemotePortclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsync, getDomain, getLocalPort, getPath, getRemotePort, setAsync, setConnector, setDomain, setLocalPort, setPath, setRemotePortprotected abstract org.slf4j.Logger getLogger()
public String buildAuthorizeUrl(OAuth1Adapter adapter, Map<String,String> extraParameters, String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
buildAuthorizeUrl in interface OAuth1Manageradapter - the adapter that is going to be authorizedextraParameters - 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.UnableToAcquireRequestTokenExceptionpublic boolean restoreAccessToken(OAuth1Adapter adapter)
restoreAccessToken in interface OAuth1Manageradapter - the adapter which access token is to be restoredtrue if the access token was succesfully restored.
false otherwise.public void fetchAccessToken(OAuth1Adapter adapter, String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
fetchAccessToken in interface OAuth1Manageradapter - the adapter which access token you wantrequestTokenUrl - 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.UnableToAcquireAccessTokenExceptionpublic void hasBeenAuthorized(OAuth1Adapter adapter) throws org.mule.common.security.oauth.exception.NotAuthorizedException
hasBeenAuthorized in interface OAuth1Manageradapter - the adapter to be checkedorg.mule.common.security.oauth.exception.NotAuthorizedException - if the adapter hasn't been authorizedpublic Connector getConnector()
DefaultHttpCallbackAdaptergetConnector in interface HttpCallbackAdaptergetConnector in interface OAuth1ManagergetConnector in class DefaultHttpCallbackAdapterpublic void reset(OAuth1Adapter adapter)
reset in interface OAuth1Manageradapter - the adapter to be resetprotected oauth.signpost.OAuthConsumer getConsumer(OAuth1Adapter adapter)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.