public class DefaultAuthorizationCodeOAuthDancer extends AbstractOAuthDancer implements org.mule.runtime.oauth.api.AuthorizationCodeOAuthDancer, org.mule.runtime.api.lifecycle.Lifecycle
clientId, clientSecret, customParametersExtractorsExprs, encodeClientCredentialsInBody, encoding, resourceOwnerIdTransformer, responseAccessTokenExpr, responseExpiresInExpr, responseRefreshTokenExpr, scopes, tokenUrl| Constructor and Description |
|---|
DefaultAuthorizationCodeOAuthDancer(Optional<org.mule.runtime.http.api.server.HttpServer> httpServer,
String clientId,
String clientSecret,
String tokenUrl,
String scopes,
boolean encodeClientCredentialsInBody,
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,
Map<String,String> customParametersExtractorsExprs,
Function<String,String> resourceOwnerIdTransformer,
org.mule.runtime.api.lock.LockFactory lockProvider,
Map<String,org.mule.runtime.oauth.api.state.DefaultResourceOwnerOAuthContext> 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) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<String> |
accessToken(String resourceOwner) |
void |
dispose() |
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) |
void |
start() |
void |
stop() |
getContextForResourceOwner, handleClientCredentials, invalidateContext, invokeTokenUrl, resolveExpression, resolveExpression, updateResourceOwnerOAuthContextpublic DefaultAuthorizationCodeOAuthDancer(Optional<org.mule.runtime.http.api.server.HttpServer> httpServer, String clientId, String clientSecret, String tokenUrl, String scopes, boolean encodeClientCredentialsInBody, 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, Map<String,String> customParametersExtractorsExprs, Function<String,String> resourceOwnerIdTransformer, org.mule.runtime.api.lock.LockFactory lockProvider, Map<String,org.mule.runtime.oauth.api.state.DefaultResourceOwnerOAuthContext> 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)
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 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.AuthorizationCodeOAuthDancerCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.