A - the service provider's API type.public class OAuth1ConnectionFactory<A> extends ConnectionFactory<A>
| Constructor and Description |
|---|
OAuth1ConnectionFactory(String providerId,
OAuth1ServiceProvider<A> serviceProvider,
ApiAdapter<A> apiAdapter)
Create a
OAuth1ConnectionFactory. |
| Modifier and Type | Method and Description |
|---|---|
Connection<A> |
createConnection(ConnectionData data)
Create a OAuth1-based
Connection from the connection data. |
Connection<A> |
createConnection(OAuthToken accessToken)
Create a OAuth1-based Connection from the access token response returned after
completing the OAuth1 flow. |
protected String |
extractProviderUserId(OAuthToken accessToken)
Hook for extracting the providerUserId from the returned access token response, if it is available.
|
OAuth1Operations |
getOAuthOperations() |
getApiAdapter, getProviderId, getServiceProviderpublic OAuth1ConnectionFactory(String providerId, OAuth1ServiceProvider<A> serviceProvider, ApiAdapter<A> apiAdapter)
OAuth1ConnectionFactory.providerId - the provider id e.g. "twitter"serviceProvider - the ServiceProvider model for conducting the authorization flow and obtaining a native service API instance.apiAdapter - the ApiAdapter for mapping the provider-specific service API model to the uniform Connection interface.public OAuth1Operations getOAuthOperations()
OAuth1Operations that allows the client application to conduct the OAuth1 flow with the provider.public Connection<A> createConnection(OAuthToken accessToken)
completing the OAuth1 flow.accessToken - the access tokenOAuth1Operations.exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken, org.springframework.util.MultiValueMap)public Connection<A> createConnection(ConnectionData data)
Connection from the connection data.createConnection in class ConnectionFactory<A>protected String extractProviderUserId(OAuthToken accessToken)
accessToken - an access token