org.mule.security.oauth
Class DefaultRefreshTokenManager

java.lang.Object
  extended by org.mule.security.oauth.DefaultRefreshTokenManager
All Implemented Interfaces:
MuleContextAware, RefreshTokenManager

public class DefaultRefreshTokenManager
extends Object
implements MuleContextAware, RefreshTokenManager

Implementation of 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 one


Constructor Summary
DefaultRefreshTokenManager()
           
 
Method Summary
 void refreshToken(OAuth2Adapter adapter, String accessTokenId)
          Refreshes the token of the given id for the given adapter.
 void setMuleContext(MuleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRefreshTokenManager

public DefaultRefreshTokenManager()
Method Detail

refreshToken

public void refreshToken(OAuth2Adapter adapter,
                         String accessTokenId)
                  throws Exception
Refreshes the token of the given id for the given adapter. This implementation uses a lock to guarantee that no refresh token is consumed more than once

Specified by:
refreshToken in interface RefreshTokenManager
Throws:
Exception
See Also:
RefreshTokenManager.refreshToken(org.mule.security.oauth.OAuth2Adapter, java.lang.String)

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.