public class

DefaultFreshBooksOAuthClient

extends Object
implements FreshBooksOAuthClient
java.lang.Object
   ↳ org.mule.modules.freshbooks.api.DefaultFreshBooksOAuthClient

Summary

Fields
private String consumerKey
private String consumerSecret
private static final Logger logger
private ObjectStoreHelper objectStoreHelper
private String requestToken
private String requestTokenSecret
Public Constructors
DefaultFreshBooksOAuthClient(String consumerKey, String consumerSecret, ObjectStore objectStoreRef)
Public Methods
String authorize(String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String callbackUrl, String requestTokenId)
Retrieves a request token using requestTokenId as identifier If the app doesn't provide a requestToken the method will generate an UUID and send it as a callback parameter to the service.
OAuthCredentials getAccessToken(String verifier, String requestTokenId)
Gets an access token using the request token stored in the ObjectStore instance.
String getConsumerKey()
String getConsumerSecret()
ObjectStoreHelper getObjectStoreHelper()
String getRequestToken()
String getRequestTokenSecret()
void setConsumerKey(String consumerKey)
void setConsumerSecret(String consumerSecret)
void setObjectStoreHelper(ObjectStoreHelper objectStoreHelper)
void setRequestToken(String requestToken)
void setRequestTokenSecret(String requestTokenSecret)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.modules.freshbooks.api.FreshBooksOAuthClient

Fields

private String consumerKey

private String consumerSecret

private static final Logger logger

private ObjectStoreHelper objectStoreHelper

private String requestToken

private String requestTokenSecret

Public Constructors

public DefaultFreshBooksOAuthClient (String consumerKey, String consumerSecret, ObjectStore objectStoreRef)

Parameters
consumerKey
consumerSecret
objectStoreRef

Public Methods

public String authorize (String requestTokenUrl, String accessTokenUrl, String authorizationUrl, String callbackUrl, String requestTokenId)

Retrieves a request token using requestTokenId as identifier If the app doesn't provide a requestToken the method will generate an UUID and send it as a callback parameter to the service.

Parameters
requestTokenUrl
accessTokenUrl
authorizationUrl
callbackUrl
requestTokenId
Throws
OAuthCommunicationException
OAuthExpectationFailedException
OAuthMessageSignerException
OAuthNotAuthorizedException
ObjectStoreException

public OAuthCredentials getAccessToken (String verifier, String requestTokenId)

Gets an access token using the request token stored in the ObjectStore instance. The requestTokenId is provided by the app.

Parameters
verifier
requestTokenId
Throws
OAuthCommunicationException
OAuthExpectationFailedException
OAuthMessageSignerException
OAuthNotAuthorizedException
ObjectStoreException

public String getConsumerKey ()

public String getConsumerSecret ()

public ObjectStoreHelper getObjectStoreHelper ()

public String getRequestToken ()

public String getRequestTokenSecret ()

public void setConsumerKey (String consumerKey)

Parameters
consumerKey

public void setConsumerSecret (String consumerSecret)

Parameters
consumerSecret

public void setObjectStoreHelper (ObjectStoreHelper objectStoreHelper)

Parameters
objectStoreHelper

public void setRequestToken (String requestToken)

Parameters
requestToken

public void setRequestTokenSecret (String requestTokenSecret)

Parameters
requestTokenSecret