public abstract class AbstractGrantType extends Object implements org.mule.extension.http.api.request.authentication.HttpRequestAuthentication, org.mule.runtime.api.lifecycle.Lifecycle
| Modifier and Type | Field and Description |
|---|---|
protected List<ParameterExtractor> |
customParameterExtractors |
protected org.mule.runtime.api.el.MuleExpressionLanguage |
expressionEvaluator |
protected org.mule.runtime.api.lock.LockFactory |
lockFactory |
protected org.mule.runtime.core.api.MuleContext |
muleContext |
protected org.mule.runtime.oauth.api.OAuthService |
oAuthService |
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() |
boolean |
equals(Object obj) |
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() |
int |
hashCode() |
void |
initialise() |
protected void |
initTokenManager() |
boolean |
isDefaultTokenManager() |
abstract boolean |
isEncodeClientCredentialsInBody() |
void |
start() |
void |
stop() |
@Inject protected org.mule.runtime.core.api.MuleContext muleContext
@Inject protected org.mule.runtime.api.lock.LockFactory lockFactory
@Inject protected org.mule.runtime.api.el.MuleExpressionLanguage expressionEvaluator
protected DeferredExpressionResolver resolver
@Parameter @Optional @Expression(value=NOT_SUPPORTED) 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 @Optional protected List<ParameterExtractor> customParameterExtractors
@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 initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic 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 String getClientSecret()
public String getClientId()
public abstract boolean isEncodeClientCredentialsInBody()
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()
public boolean isDefaultTokenManager()
Copyright © 2020 MuleSoft, Inc.. All rights reserved.