public abstract class AbstractGrantType extends Object implements org.mule.extension.http.api.request.authentication.HttpRequestAuthentication, org.mule.runtime.core.api.context.MuleContextAware, org.mule.runtime.api.lifecycle.Lifecycle
| Modifier and Type | Field and Description |
|---|---|
protected org.mule.runtime.core.api.MuleContext |
muleContext |
protected org.mule.runtime.oauth.api.OAuthService |
oAuthService |
protected List<ParameterExtractor> |
parameterExtractors |
protected DeferredExpressionResolver |
resolver |
protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
responseAccessToken
Expression to extract the access token parameter from the response of the call to tokenUrl.
|
protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
responseExpiresIn
Expression to extract the expiresIn parameter from the response of the call to tokenUrl.
|
protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
responseRefreshToken |
protected TokenManagerConfig |
tokenManager
The token manager configuration to use for this grant type.
|
| Constructor and Description |
|---|
AbstractGrantType() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildAuthorizationHeaderContent(String accessToken) |
protected org.mule.runtime.oauth.api.builder.OAuthDancerBuilder |
configureBaseDancer(org.mule.runtime.oauth.api.builder.OAuthDancerBuilder dancerBuilder) |
void |
dispose() |
String |
getClientId() |
String |
getClientSecret() |
List<ParameterExtractor> |
getCustomParameterExtractors() |
abstract Object |
getDancer() |
org.mule.runtime.extension.api.runtime.parameter.Literal<Boolean> |
getRefreshTokenWhen() |
org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
getResponseAccessToken() |
org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
getResponseExpiresIn() |
org.mule.runtime.extension.api.runtime.parameter.Literal<String> |
getResponseRefreshToken() |
String |
getScopes() |
org.mule.runtime.api.tls.TlsContextFactory |
getTlsContextFactory() |
String |
getTokenUrl() |
protected void |
initTokenManager() |
void |
setMuleContext(org.mule.runtime.core.api.MuleContext muleContext) |
void |
start() |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected org.mule.runtime.core.api.MuleContext muleContext
protected DeferredExpressionResolver resolver
@Parameter @Optional protected TokenManagerConfig tokenManager
@Parameter @Optional(defaultValue="#[payload.access_token]") protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> responseAccessToken
@Parameter @Optional(defaultValue="#[payload.refresh_token]") protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> responseRefreshToken
@Parameter @Optional(defaultValue="#[payload.expires_in]") protected org.mule.runtime.extension.api.runtime.parameter.Literal<String> responseExpiresIn
@Parameter @Alias(value="custom-parameter-extractors") @Optional protected List<ParameterExtractor> parameterExtractors
@Inject protected org.mule.runtime.oauth.api.OAuthService oAuthService
protected void initTokenManager()
throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionprotected org.mule.runtime.oauth.api.builder.OAuthDancerBuilder configureBaseDancer(org.mule.runtime.oauth.api.builder.OAuthDancerBuilder dancerBuilder)
throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionpublic abstract Object getDancer()
public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposableprotected String buildAuthorizationHeaderContent(String accessToken)
accessToken - an oauth access tokenpublic void setMuleContext(org.mule.runtime.core.api.MuleContext muleContext)
setMuleContext in interface org.mule.runtime.core.api.context.MuleContextAwarepublic String getClientSecret()
public String getClientId()
public String getScopes()
public String getTokenUrl()
public org.mule.runtime.extension.api.runtime.parameter.Literal<Boolean> getRefreshTokenWhen()
public org.mule.runtime.extension.api.runtime.parameter.Literal<String> getResponseAccessToken()
public org.mule.runtime.extension.api.runtime.parameter.Literal<String> getResponseRefreshToken()
public org.mule.runtime.extension.api.runtime.parameter.Literal<String> getResponseExpiresIn()
public List<ParameterExtractor> getCustomParameterExtractors()
public org.mule.runtime.api.tls.TlsContextFactory getTlsContextFactory()
Copyright © 2017 MuleSoft, Inc.. All rights reserved.