Search in sources :

Example 1 with OAuth1CredentialProvider

use of io.syndesis.server.credential.OAuth1CredentialProvider in project syndesis by syndesisio.

the class TwitterCredentialProviderFactory method createCredentialProvider.

static CredentialProvider createCredentialProvider(final SocialProperties properties) {
    final TwitterConnectionFactory twitter = new TwitterConnectionFactory(properties.getAppId(), properties.getAppSecret());
    final OAuth1Applicator applicator = new OAuth1Applicator(properties);
    applicator.setConsumerKeyProperty("consumerKey");
    applicator.setConsumerSecretProperty("consumerSecret");
    applicator.setAccessTokenSecretProperty("accessTokenSecret");
    applicator.setAccessTokenValueProperty("accessToken");
    return new OAuth1CredentialProvider<>("twitter", twitter, applicator);
}
Also used : TwitterConnectionFactory(org.springframework.social.twitter.connect.TwitterConnectionFactory) OAuth1Applicator(io.syndesis.server.credential.OAuth1Applicator) OAuth1CredentialProvider(io.syndesis.server.credential.OAuth1CredentialProvider)

Aggregations

OAuth1Applicator (io.syndesis.server.credential.OAuth1Applicator)1 OAuth1CredentialProvider (io.syndesis.server.credential.OAuth1CredentialProvider)1 TwitterConnectionFactory (org.springframework.social.twitter.connect.TwitterConnectionFactory)1