Class OAuth10aService

java.lang.Object
com.github.scribejava.core.oauth.OAuthService
com.github.scribejava.core.oauth.OAuth10aService
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public class OAuth10aService
extends OAuthService
OAuth 1.0a implementation of OAuthService
  • Constructor Details

    • OAuth10aService

      public OAuth10aService​(DefaultApi10a api, java.lang.String apiKey, java.lang.String apiSecret, java.lang.String callback, java.lang.String scope, java.io.OutputStream debugStream, java.lang.String userAgent, HttpClientConfig httpClientConfig, HttpClient httpClient)
  • Method Details

    • getRequestToken

      public OAuth1RequestToken getRequestToken() throws java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException
      Throws:
      java.io.IOException
      java.lang.InterruptedException
      java.util.concurrent.ExecutionException
    • getRequestTokenAsync

      public java.util.concurrent.Future<OAuth1RequestToken> getRequestTokenAsync()
    • getRequestTokenAsync

      public java.util.concurrent.Future<OAuth1RequestToken> getRequestTokenAsync​(OAuthAsyncRequestCallback<OAuth1RequestToken> callback)
    • prepareRequestTokenRequest

      protected OAuthRequest prepareRequestTokenRequest()
    • addOAuthParams

      protected void addOAuthParams​(OAuthRequest request, java.lang.String tokenSecret)
    • getAccessToken

      public OAuth1AccessToken getAccessToken​(OAuth1RequestToken requestToken, java.lang.String oauthVerifier) throws java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException
      Throws:
      java.io.IOException
      java.lang.InterruptedException
      java.util.concurrent.ExecutionException
    • getAccessTokenAsync

      public java.util.concurrent.Future<OAuth1AccessToken> getAccessTokenAsync​(OAuth1RequestToken requestToken, java.lang.String oauthVerifier)
    • getAccessTokenAsync

      public java.util.concurrent.Future<OAuth1AccessToken> getAccessTokenAsync​(OAuth1RequestToken requestToken, java.lang.String oauthVerifier, OAuthAsyncRequestCallback<OAuth1AccessToken> callback)
      Start the request to retrieve the access token. The optionally provided callback will be called with the Token when it is available.
      Parameters:
      requestToken - request token (obtained previously or null)
      oauthVerifier - oauth_verifier
      callback - optional callback
      Returns:
      Future
    • prepareAccessTokenRequest

      protected OAuthRequest prepareAccessTokenRequest​(OAuth1RequestToken requestToken, java.lang.String oauthVerifier)
    • signRequest

      public void signRequest​(OAuth1AccessToken token, OAuthRequest request)
    • getVersion

      public java.lang.String getVersion()
      Description copied from class: OAuthService
      Returns the OAuth version of the service.
      Specified by:
      getVersion in class OAuthService
      Returns:
      OAuth version as string
    • getAuthorizationUrl

      public java.lang.String getAuthorizationUrl​(OAuth1RequestToken requestToken)
      Returns the URL where you should redirect your users to authenticate your application.
      Parameters:
      requestToken - the request token you need to authorize
      Returns:
      the URL where you should redirect your users
    • appendSignature

      protected void appendSignature​(OAuthRequest request)
    • getApi

      public DefaultApi10a getApi()