|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.social.connect.ConnectionFactory<A>
org.springframework.social.connect.support.OAuth1ConnectionFactory<A>
A - the service provider's API type.public class OAuth1ConnectionFactory<A>
Factory for creating OAuth1-based Connections. May be subclassed to further simplify construction e.g. TwitterConnectionFactory.
| Constructor Summary | |
|---|---|
OAuth1ConnectionFactory(java.lang.String providerId,
OAuth1ServiceProvider<A> serviceProvider,
ApiAdapter<A> apiAdapter)
Create a OAuth1ConnectionFactory. |
|
| Method Summary | |
|---|---|
Connection<A> |
createConnection(ConnectionData data)
Create a OAuth1-based ServiceProviderConnection 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 java.lang.String |
extractProviderUserId(OAuthToken accessToken)
Hook for extracting the providerUserId from the returned access token response, if it is available. |
OAuth1Operations |
getOAuthOperations()
Get the ServiceProvider's OAuth1Operations that allows the client application to conduct the OAuth1 flow with the provider. |
| Methods inherited from class org.springframework.social.connect.ConnectionFactory |
|---|
getApiAdapter, getProviderId, getServiceProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OAuth1ConnectionFactory(java.lang.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 ServiceProviderConnection interface.| Method Detail |
|---|
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 token
OAuth1Operations.exchangeForAccessToken(org.springframework.social.oauth1.AuthorizedRequestToken, org.springframework.util.MultiValueMap)public Connection<A> createConnection(ConnectionData data)
createConnection in class ConnectionFactory<A>protected java.lang.String extractProviderUserId(OAuthToken accessToken)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||