public class DefaultPlatformManagedDancer
extends org.mule.service.oauth.internal.AbstractOAuthDancer
implements org.mule.runtime.oauth.api.PlatformManagedOAuthDancer
PlatformManagedOAuthDancer.clientCredentialsLocation, clientId, clientSecret, customParametersExtractorsExprs, encoding, name, resourceOwnerIdTransformer, responseAccessTokenExpr, responseExpiresInExpr, responseRefreshTokenExpr, scopes, TOKEN_REQUEST_TIMEOUT_MILLIS, tokenUrl| Constructor and Description |
|---|
DefaultPlatformManagedDancer(String name,
String connectionUri,
String organizationId,
String platformUrl,
OCSClient.OCSClientFactory ocsClientFactory,
org.mule.runtime.oauth.api.OAuthService oauthService,
String clientId,
String clientSecret,
String tokenUrl,
String scopes,
org.mule.runtime.oauth.api.builder.ClientCredentialsLocation clientCredentialsLocation,
Charset encoding,
String responseAccessTokenExpr,
String responseRefreshTokenExpr,
String responseExpiresInExpr,
Map<String,String> customParametersExtractorsExprs,
Function<String,String> resourceOwnerIdTransformer,
org.mule.runtime.api.scheduler.SchedulerService schedulerService,
org.mule.runtime.api.lock.LockFactory lockProvider,
Map<String,org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext> tokensStore,
org.mule.runtime.http.api.client.HttpClient httpClient,
org.mule.runtime.api.el.MuleExpressionLanguage expressionEvaluator,
List<? extends org.mule.runtime.oauth.api.listener.OAuthStateListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<String> |
accessToken() |
void |
addListener(org.mule.runtime.oauth.api.listener.PlatformManagedOAuthStateListener listener) |
CompletableFuture<org.mule.runtime.oauth.api.PlatformManagedConnectionDescriptor> |
getConnectionDescriptor() |
org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext |
getContext() |
void |
invalidateContext() |
protected org.mule.service.oauth.internal.state.TokenResponse |
parseTokenResponse(org.mule.runtime.http.api.domain.message.response.HttpResponse response,
String tokenUrl,
boolean retrieveRefreshToken) |
CompletableFuture<Void> |
refreshToken() |
void |
removeListener(org.mule.runtime.oauth.api.listener.PlatformManagedOAuthStateListener listener) |
void |
start() |
doAddListener, doRefreshToken, doRefreshTokenRequest, doRemoveListener, getContextForResourceOwner, getListenersToNotifyInvalidation, getLockProvider, handleClientCredentials, invalidateContext, invokeTokenUrl, onEachListener, onEachListener, resolveExpression, resolveExpression, startHttpClient, stop, stopHttpClient, tokenUrlExceptionHandler, updateOAuthContextAfterTokenResponse, updateResourceOwnerOAuthContextpublic DefaultPlatformManagedDancer(String name, String connectionUri, String organizationId, String platformUrl, OCSClient.OCSClientFactory ocsClientFactory, org.mule.runtime.oauth.api.OAuthService oauthService, String clientId, String clientSecret, String tokenUrl, String scopes, org.mule.runtime.oauth.api.builder.ClientCredentialsLocation clientCredentialsLocation, Charset encoding, String responseAccessTokenExpr, String responseRefreshTokenExpr, String responseExpiresInExpr, Map<String,String> customParametersExtractorsExprs, Function<String,String> resourceOwnerIdTransformer, org.mule.runtime.api.scheduler.SchedulerService schedulerService, org.mule.runtime.api.lock.LockFactory lockProvider, Map<String,org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext> tokensStore, org.mule.runtime.http.api.client.HttpClient httpClient, org.mule.runtime.api.el.MuleExpressionLanguage expressionEvaluator, List<? extends org.mule.runtime.oauth.api.listener.OAuthStateListener> listeners)
public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startablestart in class org.mule.service.oauth.internal.AbstractOAuthDancerorg.mule.runtime.api.exception.MuleExceptionpublic CompletableFuture<String> accessToken()
accessToken in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerpublic CompletableFuture<Void> refreshToken()
refreshToken in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerpublic CompletableFuture<org.mule.runtime.oauth.api.PlatformManagedConnectionDescriptor> getConnectionDescriptor()
getConnectionDescriptor in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerprotected org.mule.service.oauth.internal.state.TokenResponse parseTokenResponse(org.mule.runtime.http.api.domain.message.response.HttpResponse response,
String tokenUrl,
boolean retrieveRefreshToken)
parseTokenResponse in class org.mule.service.oauth.internal.AbstractOAuthDancerpublic void addListener(org.mule.runtime.oauth.api.listener.PlatformManagedOAuthStateListener listener)
addListener in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerpublic void removeListener(org.mule.runtime.oauth.api.listener.PlatformManagedOAuthStateListener listener)
removeListener in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerpublic void invalidateContext()
invalidateContext in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerpublic org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext getContext()
getContext in interface org.mule.runtime.oauth.api.PlatformManagedOAuthDancerCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.