public class DefaultAuthorizationCodeGrantType extends AbstractGrantType implements org.mule.runtime.api.lifecycle.Initialisable, AuthorizationCodeGrantType, org.mule.runtime.api.lifecycle.Startable, MuleContextAware
| Constructor and Description |
|---|
DefaultAuthorizationCodeGrantType() |
buildAuthorizationHeaderContentpublic void setClientId(String clientId)
public void setClientSecret(String clientSecret)
public void setAuthorizationRequestHandler(AuthorizationRequestHandler authorizationRequestHandler)
public void setTokenRequestHandler(AbstractAuthorizationCodeTokenRequestHandler tokenRequestHandler)
public void setLocalCallbackConfig(HttpListenerConfig localCallbackConfig)
public void setLocalCallbackConfigPath(String localCallbackConfigPath)
public void setLocalCallbackUrl(String localCallbackUrl)
public void setExternalCallbackUrl(String externalCallbackUrl)
public HttpListenerConfig getLocalCallbackConfig()
getLocalCallbackConfig in interface AuthorizationCodeGrantTypepublic String getLocalCallbackConfigPath()
getLocalCallbackConfigPath in interface AuthorizationCodeGrantTypepublic String getLocalCallbackUrl()
getLocalCallbackUrl in interface AuthorizationCodeGrantTypepublic String getExternalCallbackUrl()
getExternalCallbackUrl in interface AuthorizationCodeGrantTypepublic ConfigOAuthContext getConfigOAuthContext()
public String getRefreshTokenWhen()
getRefreshTokenWhen in interface AuthorizationCodeGrantTypepublic AttributeEvaluator getLocalAuthorizationUrlResourceOwnerIdEvaluator()
getLocalAuthorizationUrlResourceOwnerIdEvaluator in interface AuthorizationCodeGrantTypepublic AttributeEvaluator getResourceOwnerIdEvaluator()
getResourceOwnerIdEvaluator in interface AuthorizationCodeGrantTypepublic void refreshToken(Event currentFlowEvent, String resourceOwnerId) throws org.mule.runtime.api.exception.MuleException
AuthorizationCodeGrantTyperefreshToken in interface AuthorizationCodeGrantTypecurrentFlowEvent - event from the flow that requires a new access token.resourceOwnerId - the id of the oauth context to refresh.org.mule.runtime.api.exception.MuleExceptionpublic ConfigOAuthContext getUserOAuthContext()
getUserOAuthContext in interface AuthorizationCodeGrantTypepublic String getClientSecret()
getClientSecret in interface ApplicationCredentialspublic String getClientId()
getClientId in interface ApplicationCredentialspublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic org.mule.runtime.api.tls.TlsContextFactory getTlsContext()
getTlsContext in interface AuthorizationCodeGrantTypepublic void setTlsContext(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void authenticate(Event muleEvent, HttpRequestBuilder builder) throws org.mule.runtime.api.exception.MuleException
authenticate in interface HttpAuthenticationorg.mule.runtime.api.exception.MuleExceptionpublic boolean shouldRetry(Event firstAttemptResponseEvent) throws org.mule.runtime.api.exception.MuleException
shouldRetry in interface HttpAuthenticationorg.mule.runtime.api.exception.MuleExceptionpublic void setLocalAuthorizationUrlResourceOwnerId(String resourceOwnerId)
public void setResourceOwnerId(String resourceOwnerId)
public void setTokenManager(TokenManagerConfig tokenManagerConfig)
public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.