public interface AuthorizationCodeOAuthDancer
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<String> |
accessToken(String resourceOwner)
Will query the internal state (the
tokensStore parameter passed to the service to build the
AuthorizationCodeOAuthDancer) to get the appropriate accessToken. |
ResourceOwnerOAuthContext |
getContextForResourceOwner(String resourceOwnerId)
Retrieves the oauth context for a particular user.
|
void |
handleLocalAuthorizationRequest(HttpRequest request,
HttpResponseReadyCallback responseCallback)
Handles an http request that will redirect to the access page in
authorizationUrl with the configured credentials. |
void |
invalidateContext(String resourceOwnerId)
Clears the oauth context for a given user.
|
CompletableFuture<Void> |
refreshToken(String resourceOwner)
Performs the refresh of the access token.
|
CompletableFuture<String> accessToken(String resourceOwner) throws RequestAuthenticationException
tokensStore parameter passed to the service to build the
AuthorizationCodeOAuthDancer) to get the appropriate accessToken. This requires that the authorization has been
performed beforehand, otherwise, a RequestAuthenticationException will be thrown.resourceOwner - The resource owner to get the token for.RequestAuthenticationException - if called for a resourceOwner that has not yet been authorized.CompletableFuture<Void> refreshToken(String resourceOwner)
resourceOwner - The resource owner to get the token for.void invalidateContext(String resourceOwnerId)
resourceOwnerId - id of the user.ResourceOwnerOAuthContext getContextForResourceOwner(String resourceOwnerId)
resourceOwnerId - id of the user.void handleLocalAuthorizationRequest(HttpRequest request, HttpResponseReadyCallback responseCallback)
authorizationUrl with the configured credentials.request - the request from the user to login and/or authorize the applicationresponseCallback - the callback where the response with the redirection to the login/authorization page will be sentCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.