public class DefaultAuthorizationCodeOAuthDancer extends AbstractOAuthDancer implements org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancer, org.mule.runtime.api.lifecycle.Lifecycle
clientCredentialsLocation, clientId, clientSecret, customParametersExtractorsExprs, encoding, name, resourceOwnerIdTransformer, responseAccessTokenExpr, responseExpiresInExpr, responseRefreshTokenExpr, scopes, tokenUrl| Constructor and Description |
|---|
DefaultAuthorizationCodeOAuthDancer(Optional<org.mule.runtime.http.api.server.HttpServer> httpServer,
String name,
String clientId,
String clientSecret,
String tokenUrl,
String scopes,
org.mule.runtime.oauth.api.builder.ClientCredentialsLocation clientCredentialsLocation,
String externalCallbackUrl,
Charset encoding,
String localCallbackUrlPath,
String localAuthorizationUrlPath,
String localAuthorizationUrlResourceOwnerId,
String state,
String authorizationUrl,
String responseAccessTokenExpr,
String responseRefreshTokenExpr,
String responseExpiresInExpr,
Supplier<Map<String,String>> customParameters,
Supplier<Map<String,String>> customHeaders,
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,
Function<org.mule.runtime.oauth.api.AuthorizationCodeRequest,org.mule.runtime.oauth.api.builder.AuthorizationCodeDanceCallbackContext> beforeDanceCallback,
BiConsumer<org.mule.runtime.oauth.api.builder.AuthorizationCodeDanceCallbackContext,org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext> afterDanceCallback,
List<org.mule.runtime.oauth.api.listener.AuthorizationCodeListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<String> |
accessToken(String resourceOwner) |
void |
addListener(org.mule.runtime.oauth.api.listener.AuthorizationCodeListener listener) |
void |
dispose() |
protected CompletableFuture<Void> |
doRefreshTokenRequest(boolean useQueryParameters,
org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext) |
void |
handleLocalAuthorizationRequest(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.server.async.HttpResponseReadyCallback responseCallback) |
void |
initialise() |
CompletableFuture<Void> |
refreshToken(String resourceOwner) |
CompletableFuture<Void> |
refreshToken(String resourceOwner,
boolean useQueryParameters) |
void |
removeListener(org.mule.runtime.oauth.api.listener.AuthorizationCodeListener listener) |
void |
start() |
void |
stop() |
doAddListener, doRefreshToken, doRefreshTokenRequest, doRemoveListener, getContextForResourceOwner, getLockProvider, handleClientCredentials, invalidateContext, invokeTokenUrl, onEachListener, resolveExpression, resolveExpression, tokenUrlExceptionHandler, updateOAuthContextAfterTokenResponse, updateResourceOwnerOAuthContextpublic DefaultAuthorizationCodeOAuthDancer(Optional<org.mule.runtime.http.api.server.HttpServer> httpServer, String name, String clientId, String clientSecret, String tokenUrl, String scopes, org.mule.runtime.oauth.api.builder.ClientCredentialsLocation clientCredentialsLocation, String externalCallbackUrl, Charset encoding, String localCallbackUrlPath, String localAuthorizationUrlPath, String localAuthorizationUrlResourceOwnerId, String state, String authorizationUrl, String responseAccessTokenExpr, String responseRefreshTokenExpr, String responseExpiresInExpr, Supplier<Map<String,String>> customParameters, Supplier<Map<String,String>> customHeaders, 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, Function<org.mule.runtime.oauth.api.AuthorizationCodeRequest,org.mule.runtime.oauth.api.builder.AuthorizationCodeDanceCallbackContext> beforeDanceCallback, BiConsumer<org.mule.runtime.oauth.api.builder.AuthorizationCodeDanceCallbackContext,org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext> afterDanceCallback, List<org.mule.runtime.oauth.api.listener.AuthorizationCodeListener> listeners)
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 addListener(org.mule.runtime.oauth.api.listener.AuthorizationCodeListener listener)
addListener in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerpublic void removeListener(org.mule.runtime.oauth.api.listener.AuthorizationCodeListener listener)
removeListener in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerpublic void handleLocalAuthorizationRequest(org.mule.runtime.http.api.domain.message.request.HttpRequest request,
org.mule.runtime.http.api.server.async.HttpResponseReadyCallback responseCallback)
handleLocalAuthorizationRequest in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startablestart in class AbstractOAuthDancerorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppablestop in class AbstractOAuthDancerorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic CompletableFuture<String> accessToken(String resourceOwner) throws org.mule.runtime.oauth.api.exception.RequestAuthenticationException
accessToken in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerorg.mule.runtime.oauth.api.exception.RequestAuthenticationExceptionpublic CompletableFuture<Void> refreshToken(String resourceOwner)
refreshToken in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerpublic CompletableFuture<Void> refreshToken(String resourceOwner, boolean useQueryParameters)
refreshToken in interface org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancerprotected CompletableFuture<Void> doRefreshTokenRequest(boolean useQueryParameters, org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.