Class WechatService

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class WechatService
    extends com.github.scribejava.core.oauth.OAuth20Service
    As of scribejava 5.3, the enumeration class ClientAuthenticationType does not support inheritance, and can not complete the client authentication of wechat.
    Since:
    3.1.0
    Author:
    zhangzhenli
    • Constructor Summary

      Constructors 
      Constructor Description
      WechatService​(com.github.scribejava.core.builder.api.DefaultApi20 api, java.lang.String apiKey, java.lang.String apiSecret, java.lang.String callback, java.lang.String scope, java.lang.String responseType, java.lang.String userAgent, com.github.scribejava.core.httpclient.HttpClientConfig httpClientConfig, com.github.scribejava.core.httpclient.HttpClient httpClient)
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.github.scribejava.core.model.Response execute​(com.github.scribejava.core.model.OAuthRequest request)  
      <R> java.util.concurrent.Future<R> execute​(com.github.scribejava.core.model.OAuthRequest request, com.github.scribejava.core.model.OAuthAsyncRequestCallback<R> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<R> converter)  
      • Methods inherited from class com.github.scribejava.core.oauth.OAuth20Service

        createAccessTokenClientCredentialsGrantRequest, createAccessTokenDeviceAuthorizationGrantRequest, createAccessTokenPasswordGrantRequest, createAccessTokenRequest, createAuthorizationUrlBuilder, createDeviceAuthorizationCodesRequest, createRefreshTokenRequest, createRevokeTokenRequest, extractAuthorization, getAccessToken, getAccessToken, getAccessToken, getAccessToken, getAccessTokenAsync, getAccessTokenAsync, getAccessTokenClientCredentialsGrant, getAccessTokenClientCredentialsGrant, getAccessTokenClientCredentialsGrant, getAccessTokenClientCredentialsGrant, getAccessTokenClientCredentialsGrantAsync, getAccessTokenClientCredentialsGrantAsync, getAccessTokenDeviceAuthorizationGrant, getAccessTokenDeviceAuthorizationGrant, getAccessTokenDeviceAuthorizationGrantAsync, getAccessTokenPasswordGrant, getAccessTokenPasswordGrant, getAccessTokenPasswordGrantAsync, getAccessTokenPasswordGrantAsync, getAccessTokenPasswordGrantAsync, getAccessTokenPasswordGrantAsync, getApi, getAuthorizationUrl, getAuthorizationUrl, getAuthorizationUrl, getAuthorizationUrl, getDefaultScope, getDeviceAuthorizationCodes, getDeviceAuthorizationCodes, getDeviceAuthorizationCodes, getDeviceAuthorizationCodes, getDeviceAuthorizationCodesAsync, getDeviceAuthorizationCodesAsync, getResponseType, getVersion, logRequestWithParams, pollAccessTokenDeviceAuthorizationGrant, refreshAccessToken, refreshAccessToken, refreshAccessToken, refreshAccessToken, refreshAccessTokenAsync, refreshAccessTokenAsync, revokeToken, revokeToken, revokeToken, revokeToken, revokeTokenAsync, revokeTokenAsync, sendAccessTokenRequestAsync, sendAccessTokenRequestAsync, sendAccessTokenRequestSync, signRequest, signRequest
      • Methods inherited from class com.github.scribejava.core.oauth.OAuthService

        close, execute, executeAsync, getApiKey, getApiSecret, getCallback, isDebug, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WechatService

        public WechatService​(com.github.scribejava.core.builder.api.DefaultApi20 api,
                             java.lang.String apiKey,
                             java.lang.String apiSecret,
                             java.lang.String callback,
                             java.lang.String scope,
                             java.lang.String responseType,
                             java.lang.String userAgent,
                             com.github.scribejava.core.httpclient.HttpClientConfig httpClientConfig,
                             com.github.scribejava.core.httpclient.HttpClient httpClient)
        Default constructor
        Parameters:
        api - OAuth2.0 api information
        apiKey - the API key
        apiSecret - the API secret
        callback - the callback URL
        scope - the scope
        responseType - the response type
        userAgent - the user agent
        httpClientConfig - the HTTP client configuration
        httpClient - the HTTP client
    • Method Detail

      • execute

        public <R> java.util.concurrent.Future<R> execute​(com.github.scribejava.core.model.OAuthRequest request,
                                                          com.github.scribejava.core.model.OAuthAsyncRequestCallback<R> callback,
                                                          com.github.scribejava.core.model.OAuthRequest.ResponseConverter<R> converter)
        Overrides:
        execute in class com.github.scribejava.core.oauth.OAuthService
      • execute

        public com.github.scribejava.core.model.Response execute​(com.github.scribejava.core.model.OAuthRequest request)
                                                          throws java.lang.InterruptedException,
                                                                 java.util.concurrent.ExecutionException,
                                                                 java.io.IOException
        Overrides:
        execute in class com.github.scribejava.core.oauth.OAuthService
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.io.IOException