}
}
catch (Exception ex)
{
log.error("An error occurred authorizing the OAuth token.", ex);
throw new ExecutionException(ex);
}
OAuthDomainEntry currentEntry = entryMapper.execute(tokenEntry.getToken());
log.trace("Authorization for user: " + accountId + " complete.");
String callbackUrl = "";
if (currentEntry.getCallbackUrl() != null && currentEntry.getCallbackUrl().length() > 0)
{
try
{
callbackUrl = OAuth.addParameters(currentEntry.getCallbackUrl(), "oauth_verifier", currentEntry
.getCallbackToken());
callbackUrl = OAuth.addParameters(callbackUrl, OAuth.OAUTH_TOKEN, currentEntry.getToken());
}
catch (IOException ioe)
{
log.error("An IO exception has occured.", ioe);
throw new ExecutionException(ioe);
}
}
log.debug("return the callback url with the oauth_token added " + callbackUrl);
return callbackUrl;
}