play.libs
类 OAuth

java.lang.Object
  继承者 play.libs.OAuth

public class OAuth
extends java.lang.Object

Library to access ressources protected by OAuth 1.0a. For OAuth 2.0, see play.libs.OAuth2.


嵌套类摘要
static class OAuth.Error
           
static class OAuth.Response
          Response to an OAuth 1.0 request.
static class OAuth.ServiceInfo
          Information relative to an OAuth 1.0 provider.
static class OAuth.TokenPair
          已过时。 
 
方法摘要
static boolean isVerifierResponse()
           
 java.lang.String redirectUrl(OAuth.TokenPair tokenPair)
          已过时。 
 java.lang.String redirectUrl(java.lang.String token)
           
 OAuth.TokenPair requestAccessToken(OAuth.TokenPair tokenPair)
          已过时。 use retrieveAccessToken() instead
 OAuth.TokenPair requestUnauthorizedToken()
          已过时。 use retrieveRequestToken() instead
 OAuth.Response retrieveAccessToken(OAuth.Response requestTokenResponse)
          Exchange a request token for an access token.
 OAuth.Response retrieveAccessToken(java.lang.String token, java.lang.String secret)
          Exchange a request token for an access token.
 OAuth.Response retrieveRequestToken()
          Request the request token and secret.
 OAuth.Response retrieveRequestToken(java.lang.String callbackURL)
          Request the request token and secret.
static OAuth service(OAuth.ServiceInfo info)
          Create an OAuth object for the service described in info
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

service

public static OAuth service(OAuth.ServiceInfo info)
Create an OAuth object for the service described in info

参数:
info - must contain all informations related to the service
返回:
the OAuth object

isVerifierResponse

public static boolean isVerifierResponse()

retrieveRequestToken

public OAuth.Response retrieveRequestToken()
Request the request token and secret.

返回:
a Response object holding either the result in case of a success or the error

retrieveRequestToken

public OAuth.Response retrieveRequestToken(java.lang.String callbackURL)
Request the request token and secret.

参数:
callbackURL - the URL where the provider should redirect to
返回:
a Response object holding either the result in case of a success or the error

retrieveAccessToken

public OAuth.Response retrieveAccessToken(OAuth.Response requestTokenResponse)
Exchange a request token for an access token.

参数:
requestTokenResponse - a successful response obtained from retrieveRequestToken
返回:
a Response object holding either the result in case of a success or the error

retrieveAccessToken

public OAuth.Response retrieveAccessToken(java.lang.String token,
                                          java.lang.String secret)
Exchange a request token for an access token.

参数:
token - the token obtained from a previous call
secret - your application secret
返回:
a Response object holding either the result in case of a success or the error

requestUnauthorizedToken

@Deprecated
public OAuth.TokenPair requestUnauthorizedToken()
已过时。 use retrieveRequestToken() instead

Request the unauthorized token and secret. They can then be read with getTokens()

返回:
the url to redirect the user to get the verifier and continue the process

requestAccessToken

@Deprecated
public OAuth.TokenPair requestAccessToken(OAuth.TokenPair tokenPair)
已过时。 use retrieveAccessToken() instead


redirectUrl

public java.lang.String redirectUrl(java.lang.String token)

redirectUrl

@Deprecated
public java.lang.String redirectUrl(OAuth.TokenPair tokenPair)
已过时。 



Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly