}
// Generate a valid requestToken for the given consumerKey
public OAuthEntry generateRequestToken(String consumerKey, String oauthVersion,
String signedCallbackUrl) {
OAuthEntry entry = new OAuthEntry();
entry.setAppId(consumerKey);
entry.setConsumerKey(consumerKey);
entry.setDomain("samplecontainer.com");
entry.setContainer("default");
entry.setToken(UUID.randomUUID().toString());
entry.setTokenSecret(UUID.randomUUID().toString());
entry.setType(OAuthEntry.Type.REQUEST);
entry.setIssueTime(new Date());
entry.setOauthVersion(oauthVersion);
if (signedCallbackUrl != null) {
entry.setCallbackUrlSigned(true);
entry.setCallbackUrl(signedCallbackUrl);
}
oauthEntries.put(entry.getToken(), entry);
return entry;
}