public class TestOAuth2Adapter extends Object implements OAuth2Adapter, Initialisable, Startable, Stoppable, MuleContextAware, Disposable
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
TestOAuth2Adapter(OAuth2Manager<OAuth2Adapter> manager) |
public TestOAuth2Adapter(OAuth2Manager<OAuth2Adapter> manager)
public String getOauthVerifier()
getOauthVerifier
in interface OAuthAdapter
public void setOauthVerifier(String value)
setOauthVerifier
in interface OAuthAdapter
public void setAccessTokenUrl(String url)
setAccessTokenUrl
in interface OAuthAdapter
public void setAccessToken(String accessToken)
setAccessToken
in interface OAuthAdapter
public void setAuthorizationUrl(String authorizationUrl)
setAuthorizationUrl
in interface OAuthAdapter
public void hasBeenAuthorized() throws org.mule.common.security.oauth.exception.NotAuthorizedException
hasBeenAuthorized
in interface OAuthAdapter
org.mule.common.security.oauth.exception.NotAuthorizedException
public String getAccessTokenUrl()
getAccessTokenUrl
in interface OAuth2Connector
public String getConsumerKey()
getConsumerKey
in interface OAuth2Connector
public String getConsumerSecret()
getConsumerSecret
in interface OAuth2Connector
public String getScope()
getScope
in interface OAuth2Connector
public String getAuthorizationUrl()
getAuthorizationUrl
in interface OAuth2Connector
public String getAccessTokenRegex()
getAccessTokenRegex
in interface OAuth2Connector
public String getExpirationRegex()
getExpirationRegex
in interface OAuth2Connector
public String getRefreshTokenRegex()
getRefreshTokenRegex
in interface OAuth2Connector
public String getVerifierRegex()
getVerifierRegex
in interface OAuth2Connector
public Set<org.mule.common.security.oauth.AuthorizationParameter<?>> getAuthorizationParameters()
getAuthorizationParameters
in interface OAuth2Connector
public void postAuth()
postAuth
in interface OAuth2Connector
public boolean wasPostAuthCalled()
public boolean wasDisposed()
public boolean wasInitialised()
public boolean wasStarted()
public boolean wasStopped()
public String authorize(Map<String,String> extraParameters, String accessTokenUrl, String redirectUri) throws org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
authorize
in interface OAuth2Adapter
org.mule.common.security.oauth.exception.UnableToAcquireRequestTokenException
public void fetchAccessToken(String accessTokenUrl) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
fetchAccessToken
in interface OAuth2Adapter
org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
public boolean hasTokenExpired()
hasTokenExpired
in interface OAuth2Adapter
public void refreshAccessToken(String accessTokenId) throws org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
refreshAccessToken
in interface OAuth2Adapter
org.mule.common.security.oauth.exception.UnableToAcquireAccessTokenException
public String getAccessToken()
getAccessToken
in interface OAuth2Adapter
getAccessToken
in interface OAuth2Connector
public Pattern getAccessCodePattern()
getAccessCodePattern
in interface OAuth2Adapter
public String getRefreshToken()
getRefreshToken
in interface OAuth2Adapter
public void setRefreshToken(String refreshToken)
setRefreshToken
in interface OAuth2Adapter
public Pattern getRefreshTokenPattern()
getRefreshTokenPattern
in interface OAuth2Adapter
public Pattern getExpirationTimePattern()
getExpirationTimePattern
in interface OAuth2Adapter
public void setExpiration(Date value)
setExpiration
in interface OAuth2Adapter
public void setConsumerKey(String consumerKey)
setConsumerKey
in interface OAuth2Adapter
public void setConsumerSecret(String consumerSecret)
setConsumerSecret
in interface OAuth2Adapter
public OAuth2Manager<OAuth2Adapter> getManager()
public void stop() throws MuleException
stop
in interface Stoppable
MuleException
public void start() throws MuleException
start
in interface Startable
MuleException
public void initialise() throws InitialisationException
initialise
in interface Initialisable
InitialisationException
public void dispose()
dispose
in interface Disposable
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public MuleContext getMuleContext()
public String getName()
getName
in interface NamedObject
public void setName(String name)
setName
in interface NameableObject
public OnNoTokenPolicy getOnNoTokenPolicy()
getOnNoTokenPolicy
in interface OnNoTokenPolicyAware
public void setOnNoTokenPolicy(OnNoTokenPolicy onNoTokenPolicy)
setOnNoTokenPolicy
in interface OnNoTokenPolicyAware
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.