public class DefaultAuthorizationCodeGrantType extends AbstractGrantType implements Initialisable, AuthorizationCodeGrantType, Startable, MuleContextAware
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
DefaultAuthorizationCodeGrantType() |
buildAuthorizationHeaderContent
public void setClientId(String clientId)
public void setClientSecret(String clientSecret)
public void setRedirectionUrl(String redirectionUrl)
public void setAuthorizationRequestHandler(AuthorizationRequestHandler authorizationRequestHandler)
public void setTokenRequestHandler(AbstractAuthorizationCodeTokenRequestHandler tokenRequestHandler)
public ConfigOAuthContext getConfigOAuthContext()
public String getRedirectionUrl()
getRedirectionUrl
in interface AuthorizationCodeGrantType
public String getRefreshTokenWhen()
getRefreshTokenWhen
in interface AuthorizationCodeGrantType
public AttributeEvaluator getLocalAuthorizationUrlResourceOwnerIdEvaluator()
getLocalAuthorizationUrlResourceOwnerIdEvaluator
in interface AuthorizationCodeGrantType
public AttributeEvaluator getResourceOwnerIdEvaluator()
getResourceOwnerIdEvaluator
in interface AuthorizationCodeGrantType
public void refreshToken(MuleEvent currentFlowEvent, String resourceOwnerId) throws MuleException
AuthorizationCodeGrantType
refreshToken
in interface AuthorizationCodeGrantType
currentFlowEvent
- event from the flow that requires a new access token.resourceOwnerId
- the id of the oauth context to refresh.MuleException
public ConfigOAuthContext getUserOAuthContext()
getUserOAuthContext
in interface AuthorizationCodeGrantType
public String getClientSecret()
getClientSecret
in interface ApplicationCredentials
public String getClientId()
getClientId
in interface ApplicationCredentials
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public TlsContextFactory getTlsContext()
getTlsContext
in interface AuthorizationCodeGrantType
public void setTlsContext(TlsContextFactory tlsContextFactory)
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void authenticate(MuleEvent muleEvent, HttpRequestBuilder builder) throws MuleException
HttpAuthentication
authenticate
in interface HttpAuthentication
muleEvent
- The event that is being processed.builder
- The builder that is being used to create the HTTP request.MuleException
public boolean shouldRetry(MuleEvent firstAttemptResponseEvent)
HttpAuthentication
shouldRetry
in interface HttpAuthentication
firstAttemptResponseEvent
- The event with the response of the request.public void setLocalAuthorizationUrlResourceOwnerId(String resourceOwnerId)
public void setResourceOwnerId(String resourceOwnerId)
public void setTokenManager(TokenManagerConfig tokenManagerConfig)
public void start() throws MuleException
start
in interface Startable
MuleException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.