@NoImplement
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. |
void |
addListener(AuthorizationCodeListener listener)
Deprecated.
since 4.3.1
|
default void |
addListener(String resourceOwnerId,
AuthorizationCodeListener listener)
Adds the
listener. |
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.
|
default CompletableFuture<Void> |
refreshToken(String resourceOwner,
boolean useQueryParameters)
Performs the refresh of the access token.
|
void |
removeListener(AuthorizationCodeListener listener)
Deprecated.
since 4.3.1
|
default void |
removeListener(String resourceOwnerId,
AuthorizationCodeListener listener)
Removes the
listener. |
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.default CompletableFuture<Void> refreshToken(String resourceOwner, boolean useQueryParameters)
resourceOwner - The resource owner to get the token for.useQueryParameters - If the parameters needed to refresh the token should be sent as query parameters. If false, they will be sent encoded in the body of the message.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 sent@Deprecated void addListener(AuthorizationCodeListener listener)
listener. Listeners will be invoked in the same order as they were addedlistener - the AuthorizationCodeListener to be addedIllegalArgumentException - if the listener is null@Deprecated void removeListener(AuthorizationCodeListener listener)
listener. Nothing happens if it wasn't part of this dancer.listener - the AuthorizationCodeListener to be removedIllegalArgumentException - if the listener is nulldefault void addListener(String resourceOwnerId, AuthorizationCodeListener listener)
listener. Listeners will be invoked in the same order as they were addedresourceOwnerId - id of the user who the listener corresponds tolistener - the AuthorizationCodeListener to be addedIllegalArgumentException - if the listener is nulldefault void removeListener(String resourceOwnerId, AuthorizationCodeListener listener)
listener. Nothing happens if it wasn't part of this dancer.resourceOwnerId - id of the user who the listener corresponds tolistener - the AuthorizationCodeListener to be removedIllegalArgumentException - if the listener is nullCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.