@Test public void testSuccessfulConsumerKey() { final OAuthConsumer consumer = new OAuthConsumer("testprovider", "gadgeturl", TEST_CONSUMER_KEY, "secret", "HMAC-SHA1"); context.checking(new Expectations() { { oneOf(actionContext).getParams(); will(returnValue(TEST_CONSUMER_KEY)); oneOf(consumerMapper).execute(TEST_CONSUMER_KEY); will(returnValue(consumer)); } }); net.oauth.OAuthConsumer results = (net.oauth.OAuthConsumer) sut.execute(actionContext); assertEquals(results.consumerKey, TEST_CONSUMER_KEY); assertEquals(results.consumerSecret, "secret"); context.assertIsSatisfied(); }
@Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String consumerKey = (String) inActionContext.getParams(); org.eurekastreams.server.domain.OAuthConsumer mappedConsumer = mapper.execute(consumerKey); net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(mappedConsumer.getCallbackURL(), consumerKey, mappedConsumer.getConsumerSecret(), serviceProvider); return consumer; }
GetOAuthConsumerByConsumerKeyExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String consumerKey = (String) inActionContext.getParams(); org.eurekastreams.server.domain.OAuthConsumer mappedConsumer = mapper.execute(consumerKey); net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(mappedConsumer.getCallbackURL(), consumerKey, mappedConsumer.getConsumerSecret(), serviceProvider); return consumer; } }
GetOAuthConsumerByConsumerKeyExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String consumerKey = (String) inActionContext.getParams(); org.eurekastreams.server.domain.OAuthConsumer mappedConsumer = mapper.execute(consumerKey); net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(mappedConsumer.getCallbackURL(), consumerKey, mappedConsumer.getConsumerSecret(), serviceProvider); return consumer; } GetOAuthConsumerByConsumerKeyExecution(final DomainMapper<String, OAuthConsumer> inMapper,
            final String inRequestTokenUrl, final String inAuthorizeUrl, final String inAccessTokenUrl); }
GetOAuthConsumerByConsumerKeyExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String consumerKey = (String) inActionContext.getParams(); org.eurekastreams.server.domain.OAuthConsumer mappedConsumer = mapper.execute(consumerKey); net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(mappedConsumer.getCallbackURL(), consumerKey, mappedConsumer.getConsumerSecret(), serviceProvider); return consumer; } GetOAuthConsumerByConsumerKeyExecution(final DomainMapper<String, OAuthConsumer> inMapper,
            final String inRequestTokenUrl, final String inAuthorizeUrl, final String inAccessTokenUrl); @Override Serializable execute(final PrincipalActionContext inActionContext); }
GetOAuthConsumerByConsumerKeyExecution implements ExecutionStrategy<PrincipalActionContext> { @Override public Serializable execute(final PrincipalActionContext inActionContext) throws ExecutionException { String consumerKey = (String) inActionContext.getParams(); org.eurekastreams.server.domain.OAuthConsumer mappedConsumer = mapper.execute(consumerKey); net.oauth.OAuthConsumer consumer = new net.oauth.OAuthConsumer(mappedConsumer.getCallbackURL(), consumerKey, mappedConsumer.getConsumerSecret(), serviceProvider); return consumer; } GetOAuthConsumerByConsumerKeyExecution(final DomainMapper<String, OAuthConsumer> inMapper,
            final String inRequestTokenUrl, final String inAuthorizeUrl, final String inAccessTokenUrl); @Override Serializable execute(final PrincipalActionContext inActionContext);  }