*
*/
@Override
public OAuthEntry execute(final PrincipalActionContext inActionContext) throws ExecutionException
{
CreateOAuthRequestTokenRequest currentRequest = (CreateOAuthRequestTokenRequest) inActionContext.getParams();
OAuthEntry entry = new OAuthEntry();
entry.setAppId(currentRequest.getConsumerKey());
entry.setConsumerKey(currentRequest.getConsumerKey());
entry.setDomain(oauthDomain);
entry.setContainer(oauthContainer);
entry.setToken(UUID.randomUUID().toString());
entry.setTokenSecret(UUID.randomUUID().toString());
entry.setType(OAuthEntry.Type.REQUEST);
entry.setIssueTime(new Date());
entry.setOauthVersion(currentRequest.getOauthVersion());
if (currentRequest.getSignedCallbackUrl() != null)
{
entry.setCallbackUrlSigned(true);
entry.setCallbackUrl(currentRequest.getSignedCallbackUrl());
}
OAuthDomainEntry dto = oauthConversionStrat.convertToEntryDTO(entry);
insertMapper.execute(new PersistenceRequest<OAuthDomainEntry>(dto));
return entry;