public abstract class AbstractAuthorizationCodeTokenRequestHandler extends AbstractTokenRequestHandler
AbstractTokenRequestHandler.TokenResponse, AbstractTokenRequestHandler.TokenUrlResponseExceptionmuleContext, parameterExtractors, responseAccessToken, responseExpiresIn, responseRefreshToken| Constructor and Description |
|---|
AbstractAuthorizationCodeTokenRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createListenerForCallbackUrl() |
protected abstract Function<org.mule.runtime.extension.api.runtime.operation.Result<Object,HttpRequestAttributes>,org.mule.runtime.extension.api.runtime.operation.Result<String,HttpResponseAttributes>> |
createRedirectUrlProcessor() |
protected abstract void |
doRefreshToken(ResourceOwnerOAuthContext resourceOwnerOAuthContext)
ThreadSafe refresh token operation to be implemented by subclasses
|
AuthorizationCodeGrantType |
getOauthConfig() |
void |
init()
initialization method after configuration.
|
void |
refreshToken(String resourceOwnerId)
Updates the access token by calling the token url with refresh token grant type
|
void |
setOauthConfig(AuthorizationCodeGrantType oauthConfig) |
void |
start() |
void |
stop() |
getMuleContext, getRefreshTokenWhen, getTokenUrl, initialise, invokeTokenUrl, isEmpty, processTokenResponse, setMuleContext, setTlsContextFactory, setTokenUrl, tokenResponseContentIsValidpublic AbstractAuthorizationCodeTokenRequestHandler()
public void refreshToken(String resourceOwnerId)
resourceOwnerId - the resource owner id to updateprotected abstract void doRefreshToken(ResourceOwnerOAuthContext resourceOwnerOAuthContext)
resourceOwnerOAuthContext - user oauth context object.public void setOauthConfig(AuthorizationCodeGrantType oauthConfig)
oauthConfig - oauth config for this token request handler.public AuthorizationCodeGrantType getOauthConfig()
public void init()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void createListenerForCallbackUrl()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic void start()
start in interface org.mule.runtime.api.lifecycle.Startablestart in class AbstractTokenRequestHandlerpublic void stop()
stop in interface org.mule.runtime.api.lifecycle.Stoppablestop in class AbstractTokenRequestHandlerprotected abstract Function<org.mule.runtime.extension.api.runtime.operation.Result<Object,HttpRequestAttributes>,org.mule.runtime.extension.api.runtime.operation.Result<String,HttpResponseAttributes>> createRedirectUrlProcessor()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.