|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.social.oauth1.OAuth1Template
public class OAuth1Template
OAuth10Operations implementation that uses REST-template to make the OAuth calls.
Constructor Summary | |
---|---|
OAuth1Template(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String requestTokenUrl,
java.lang.String authorizeUrl,
java.lang.String accessTokenUrl)
|
|
OAuth1Template(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String requestTokenUrl,
java.lang.String authorizeUrl,
java.lang.String accessTokenUrl,
OAuth1Version version)
|
|
OAuth1Template(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String requestTokenUrl,
java.lang.String authorizeUrl,
java.lang.String authenticateUrl,
java.lang.String accessTokenUrl)
|
|
OAuth1Template(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String requestTokenUrl,
java.lang.String authorizeUrl,
java.lang.String authenticateUrl,
java.lang.String accessTokenUrl,
OAuth1Version version)
|
Method Summary | |
---|---|
java.lang.String |
buildAuthenticateUrl(java.lang.String requestToken,
OAuth1Parameters parameters)
Construct the URL to redirect the user to for authentication. |
java.lang.String |
buildAuthorizeUrl(java.lang.String requestToken,
OAuth1Parameters parameters)
Construct the URL to redirect the user to for authorization. |
protected OAuthToken |
createAccessToken(java.lang.String accessToken,
java.lang.String secret,
MultiValueMap<java.lang.String,java.lang.String> body)
|
OAuthToken |
exchangeForAccessToken(AuthorizedRequestToken requestToken,
MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
Exchange the authorized request token for an access token. |
OAuthToken |
fetchRequestToken(java.lang.String callbackUrl,
MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
Begin a new authorization flow by fetching a new request token from this service provider. |
protected java.lang.String |
getConsumerKey()
|
protected MultiValueMap<java.lang.String,java.lang.String> |
getCustomAuthorizationParameters()
|
OAuth1Version |
getVersion()
The version of OAuth1 implemented by this operations instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OAuth1Template(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String requestTokenUrl, java.lang.String authorizeUrl, java.lang.String accessTokenUrl)
public OAuth1Template(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String requestTokenUrl, java.lang.String authorizeUrl, java.lang.String accessTokenUrl, OAuth1Version version)
public OAuth1Template(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String requestTokenUrl, java.lang.String authorizeUrl, java.lang.String authenticateUrl, java.lang.String accessTokenUrl)
public OAuth1Template(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String requestTokenUrl, java.lang.String authorizeUrl, java.lang.String authenticateUrl, java.lang.String accessTokenUrl, OAuth1Version version)
Method Detail |
---|
public OAuth1Version getVersion()
OAuth1Operations
getVersion
in interface OAuth1Operations
OAuth1Version.CORE_10
,
OAuth1Version.CORE_10_REVISION_A
public OAuthToken fetchRequestToken(java.lang.String callbackUrl, MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
OAuth1Operations
access token
.
fetchRequestToken
in interface OAuth1Operations
callbackUrl
- the URL the provider should redirect to after the member authorizes the connection. Ignored for OAuth 1.0 providers.additionalParameters
- any additional query parameters to be sent when fetching the request token. Should not be encoded.
public java.lang.String buildAuthorizeUrl(java.lang.String requestToken, OAuth1Parameters parameters)
OAuth1Operations
buildAuthorizeUrl
in interface OAuth1Operations
requestToken
- the request token value, to be encoded in the authorize URL.parameters
- parameters to pass to the provider in the authorize URL. Should never be null; if there are no parameters to pass, set this argument value to OAuth1Parameters.NONE
.
public java.lang.String buildAuthenticateUrl(java.lang.String requestToken, OAuth1Parameters parameters)
OAuth1Operations
buildAuthenticateUrl
in interface OAuth1Operations
requestToken
- the request token value, to be encoded in the authorize URL.parameters
- parameters to pass to the provider in the authenticate URL. Should never be null; if there are no parameters to pass, set this argument value to OAuth1Parameters.NONE
.
public OAuthToken exchangeForAccessToken(AuthorizedRequestToken requestToken, MultiValueMap<java.lang.String,java.lang.String> additionalParameters)
OAuth1Operations
exchangeForAccessToken
in interface OAuth1Operations
requestToken
- an authorized request token and verifier. The verifier will be ignored for OAuth 1.0 providers.additionalParameters
- any additional query parameters to be sent when fetching the access token. Should not be encoded.
protected java.lang.String getConsumerKey()
protected OAuthToken createAccessToken(java.lang.String accessToken, java.lang.String secret, MultiValueMap<java.lang.String,java.lang.String> body)
protected MultiValueMap<java.lang.String,java.lang.String> getCustomAuthorizationParameters()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |