org.springframework.social.oauth1
Class OAuth1RequestSignerFactory
java.lang.Object
org.springframework.social.oauth1.OAuth1RequestSignerFactory
public class OAuth1RequestSignerFactory
- extends java.lang.Object
Factory used by OAuth 1-based templates to choose a signer implementation.
The selection is made based on what is available on the classpath.
Spring Security for OAuth (S2OAuth) is the preferred choice. However, S2OAuth
is currently one large module and a bit hefty for deployment into a
constrained environment, such as an Android device. Scribe, on the other
hand, has a smaller footprint and is more suitable in that circumstance.
Note that aside from their respective footprints, S2OAuth and Scribe
are/should be equivalent choices. Should S2OAuth be modularized into smaller
modules, there would be no reason not to choose it exclusively and this
factory would no longer be needed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuth1RequestSignerFactory
public OAuth1RequestSignerFactory()
getRequestSigner
public static OAuth1ClientRequestSigner getRequestSigner(java.lang.String apiKey,
java.lang.String apiSecret,
java.lang.String accessToken,
java.lang.String accessTokenSecret)
- Creates an
OAuth1ClientRequestSigner
. The implementation is
chosen from what is available on the classpath, either
S2OAuth1RequestSigner
or ScribeOAuth1RequestSigner
,
depending on whether S2OAuth or Scribe is available.
- Parameters:
accessToken
- the access token valueaccessTokenSecret
- the access token secretapiKey
- the API key assigned by the providerapiSecret
- the API secret assigned by the provider
- Returns:
- an
OAuth1ClientRequestSigner