public class DefaultAuthorizationCodeGrantType extends AbstractGrantType implements Initialisable, AuthorizationCodeGrantType, Startable, MuleContextAware
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTERNAL_REDIRECT_URL_PROPERTY |
PHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
DefaultAuthorizationCodeGrantType() |
buildAuthorizationHeaderContentpublic static final String EXTERNAL_REDIRECT_URL_PROPERTY
public void setClientId(String clientId)
public void setClientSecret(String clientSecret)
public void setRedirectionUrl(String redirectionUrl)
public void setExternalRedirectionUrl(String externalRedirectionUrl)
public void setAuthorizationRequestHandler(AuthorizationRequestHandler authorizationRequestHandler)
public void setTokenRequestHandler(AbstractAuthorizationCodeTokenRequestHandler tokenRequestHandler)
public ConfigOAuthContext getConfigOAuthContext()
public String getRedirectionUrl()
getRedirectionUrl in interface AuthorizationCodeGrantTypepublic String getExternalRedirectionUrl()
getExternalRedirectionUrl in interface AuthorizationCodeGrantTypepublic String getRefreshTokenWhen()
getRefreshTokenWhen in interface AuthorizationCodeGrantTypepublic AttributeEvaluator getLocalAuthorizationUrlResourceOwnerIdEvaluator()
getLocalAuthorizationUrlResourceOwnerIdEvaluator in interface AuthorizationCodeGrantTypepublic AttributeEvaluator getResourceOwnerIdEvaluator()
getResourceOwnerIdEvaluator in interface AuthorizationCodeGrantTypepublic void refreshToken(MuleEvent currentFlowEvent, String resourceOwnerId) throws MuleException
AuthorizationCodeGrantTyperefreshToken in interface AuthorizationCodeGrantTypecurrentFlowEvent - event from the flow that requires a new access token.resourceOwnerId - the id of the oauth context to refresh.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 TlsContextFactory getTlsContext()
getTlsContext in interface AuthorizationCodeGrantTypepublic void setTlsContext(TlsContextFactory tlsContextFactory)
public void initialise()
throws InitialisationException
initialise in interface InitialisableInitialisationExceptionpublic void authenticate(MuleEvent muleEvent, org.mule.module.http.internal.domain.request.HttpRequestBuilder builder) throws MuleException
authenticate in interface org.mule.module.http.api.HttpAuthenticationMuleExceptionpublic boolean shouldRetry(MuleEvent firstAttemptResponseEvent) throws MuleException
shouldRetry in interface org.mule.module.http.api.HttpAuthenticationMuleExceptionpublic void setLocalAuthorizationUrlResourceOwnerId(String resourceOwnerId)
public void setResourceOwnerId(String resourceOwnerId)
public void setTokenManager(TokenManagerConfig tokenManagerConfig)
public void start()
throws MuleException
start in interface StartableMuleExceptionCopyright © 2003–2021 MuleSoft, Inc.. All rights reserved.