public class DefaultRefreshTokenManager extends Object implements MuleContextAware, RefreshTokenManager
RefreshTokenManager that guarantees that no refresh
token is used more than once. If two threads try to refresh the same token
concurrently, only one will succeed and the other one will rely on the result of
the first oneDEFAULT_MIN_REFRESH_INTERVAL| Constructor and Description |
|---|
DefaultRefreshTokenManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
refreshToken(OAuth2Adapter adapter,
String accessTokenId)
Refreshes the token of the given id for the given adapter.
|
void |
setMinRefreshIntervalInMillis(int minRefreshIntervalInMillis)
Sets the minimum interval of time in which we allow a given access token id to be refresh.
|
void |
setMuleContext(MuleContext context) |
public void refreshToken(OAuth2Adapter adapter, String accessTokenId) throws Exception
refreshToken in interface RefreshTokenManagerExceptionRefreshTokenManager.refreshToken(org.mule.security.oauth.OAuth2Adapter,
java.lang.String)public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic void setMinRefreshIntervalInMillis(int minRefreshIntervalInMillis)
RefreshTokenManagersetMinRefreshIntervalInMillis in interface RefreshTokenManagerminRefreshIntervalInMillis - a number of millisecondsCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.