public final class ResourceOwnerOAuthContextUtils extends Object
ResourceOwnerOAuthContext implementations in the OAuth service api
regardless of the changes introduced in 4.2.2.| Modifier and Type | Method and Description |
|---|---|
static Lock |
createRefreshUserOAuthContextLock(String lockNamePrefix,
org.mule.runtime.api.lock.LockFactory lockProvider,
String resourceOwnerId) |
static org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext |
createResourceOwnerOAuthContext(Lock refreshUserOAuthContextLock,
String resourceOwnerId) |
static Lock |
getRefreshUserOAuthContextLock(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String name,
org.mule.runtime.api.lock.LockFactory lockFactory) |
static boolean |
isDancerStateHasToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext) |
static boolean |
isDancerStateNoToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext) |
static boolean |
isDancerStateRefreshingToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext) |
static org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext |
migrateContextIfNeeded(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String name,
org.mule.runtime.api.lock.LockFactory lockFactory) |
static void |
setAccessToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String accessToken)
Sets the access token of the oauth context retrieved by the token request into the provided context.
|
static void |
setDancerStateHasToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
There is a token present and it is valid to use.
|
static void |
setDancerStateNoToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
The owner has not fetched a token yet, or a previous attempt to fetch it has failed.
|
static void |
setDancerStateRefreshingToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
CompletableFuture<Void> refreshFuture)
There is already a request executing to refresh the token.
|
static void |
setExpiresIn(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String expiresIn)
Sets the expires in value retrieved by the token request into the provided context.
|
static void |
setRefreshToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String refreshToken)
Sets the refresh token of the oauth context retrieved by the token request into the provided context.
|
static void |
setState(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String state)
Sets the state of the oauth context send in the authorization request into the provided context.
|
public static org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext createResourceOwnerOAuthContext(Lock refreshUserOAuthContextLock, String resourceOwnerId)
public static org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext migrateContextIfNeeded(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String name,
org.mule.runtime.api.lock.LockFactory lockFactory)
public static Lock getRefreshUserOAuthContextLock(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext, String name, org.mule.runtime.api.lock.LockFactory lockFactory)
public static Lock createRefreshUserOAuthContextLock(String lockNamePrefix, org.mule.runtime.api.lock.LockFactory lockProvider, String resourceOwnerId)
public static void setAccessToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String accessToken)
public static void setRefreshToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String refreshToken)
public static void setExpiresIn(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String expiresIn)
public static void setState(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
String state)
public static void setDancerStateRefreshingToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext,
CompletableFuture<Void> refreshFuture)
public static boolean isDancerStateRefreshingToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
true if there is already a request executing to refresh the token.public static void setDancerStateHasToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
public static boolean isDancerStateHasToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
true if there is a token present and it is valid to use.public static void setDancerStateNoToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
public static boolean isDancerStateNoToken(org.mule.runtime.oauth.api.state.ResourceOwnerOAuthContext resourceOwnerOAuthContext)
true if the owner has not fetched a token yet, or a previous attempt to fetch it has failed.Copyright © 2003–2019 MuleSoft, Inc.. All rights reserved.