public class OauthApi extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ApiClient |
getApiClient() |
String |
oauthAuthorize(Long clientId,
String redirectUri,
String state,
String scope,
String accountType,
Long accountDisplayNumber,
List<String> fields)
获取Authorization Code
|
com.squareup.okhttp.Call |
oauthAuthorizeAsync(Long clientId,
String redirectUri,
String state,
String scope,
String accountType,
Long accountDisplayNumber,
List<String> fields,
ApiCallback<String> callback)
获取Authorization Code (asynchronously)
|
com.squareup.okhttp.Call |
oauthAuthorizeCall(Long clientId,
String redirectUri,
String state,
String scope,
String accountType,
Long accountDisplayNumber,
List<String> fields,
ProgressResponseBody.ProgressListener progressListener,
ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for oauthAuthorize
|
ApiResponse<String> |
oauthAuthorizeWithHttpInfo(Long clientId,
String redirectUri,
String state,
String scope,
String accountType,
Long accountDisplayNumber,
List<String> fields)
获取Authorization Code
|
OauthTokenResponse |
oauthToken(Long clientId,
String clientSecret,
String grantType,
String authorizationCode,
String refreshToken,
String redirectUri)
通过Authorization Code获取Access Token或刷新Access Token
|
com.squareup.okhttp.Call |
oauthTokenAsync(Long clientId,
String clientSecret,
String grantType,
String authorizationCode,
String refreshToken,
String redirectUri,
ApiCallback<OauthTokenResponse> callback)
通过Authorization Code获取Access Token或刷新Access Token (asynchronously)
|
com.squareup.okhttp.Call |
oauthTokenCall(Long clientId,
String clientSecret,
String grantType,
String authorizationCode,
String refreshToken,
String redirectUri,
ProgressResponseBody.ProgressListener progressListener,
ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for oauthToken
|
ApiResponse<OauthTokenResponse> |
oauthTokenWithHttpInfo(Long clientId,
String clientSecret,
String grantType,
String authorizationCode,
String refreshToken,
String redirectUri)
通过Authorization Code获取Access Token或刷新Access Token
|
void |
setApiClient(ApiClient apiClient) |
public OauthApi()
public OauthApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public com.squareup.okhttp.Call oauthAuthorizeCall(Long clientId, String redirectUri, String state, String scope, String accountType, Long accountDisplayNumber, List<String> fields, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
clientId - (required)redirectUri - (required)state - (optional)scope - (optional)accountType - (optional)accountDisplayNumber - (optional)fields - 返回参数的字段列表 (optional)progressListener - Progress listenerprogressRequestListener - Progress request listenerApiException - If fail to serialize the request body objectpublic String oauthAuthorize(Long clientId, String redirectUri, String state, String scope, String accountType, Long accountDisplayNumber, List<String> fields) throws ApiException
clientId - (required)redirectUri - (required)state - (optional)scope - (optional)accountType - (optional)accountDisplayNumber - (optional)fields - 返回参数的字段列表 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodypublic ApiResponse<String> oauthAuthorizeWithHttpInfo(Long clientId, String redirectUri, String state, String scope, String accountType, Long accountDisplayNumber, List<String> fields) throws ApiException
clientId - (required)redirectUri - (required)state - (optional)scope - (optional)accountType - (optional)accountDisplayNumber - (optional)fields - 返回参数的字段列表 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodypublic com.squareup.okhttp.Call oauthAuthorizeAsync(Long clientId, String redirectUri, String state, String scope, String accountType, Long accountDisplayNumber, List<String> fields, ApiCallback<String> callback) throws ApiException
clientId - (required)redirectUri - (required)state - (optional)scope - (optional)accountType - (optional)accountDisplayNumber - (optional)fields - 返回参数的字段列表 (optional)callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body objectpublic com.squareup.okhttp.Call oauthTokenCall(Long clientId, String clientSecret, String grantType, String authorizationCode, String refreshToken, String redirectUri, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException
clientId - (required)clientSecret - (required)grantType - (required)authorizationCode - (optional)refreshToken - (optional)redirectUri - 应用回调地址,当 grant_type=authorization_code时,redirect_uri 为必传参数,仅支持 http 和
https,不支持指定端口号,且传入的地址需要与获取authorization_code时,传入的回调地址保持一致 (optional)progressListener - Progress listenerprogressRequestListener - Progress request listenerApiException - If fail to serialize the request body objectpublic OauthTokenResponse oauthToken(Long clientId, String clientSecret, String grantType, String authorizationCode, String refreshToken, String redirectUri) throws ApiException
clientId - (required)clientSecret - (required)grantType - (required)authorizationCode - (optional)refreshToken - (optional)redirectUri - 应用回调地址,当 grant_type=authorization_code时,redirect_uri 为必传参数,仅支持 http 和
https,不支持指定端口号,且传入的地址需要与获取authorization_code时,传入的回调地址保持一致 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodypublic ApiResponse<OauthTokenResponse> oauthTokenWithHttpInfo(Long clientId, String clientSecret, String grantType, String authorizationCode, String refreshToken, String redirectUri) throws ApiException
clientId - (required)clientSecret - (required)grantType - (required)authorizationCode - (optional)refreshToken - (optional)redirectUri - 应用回调地址,当 grant_type=authorization_code时,redirect_uri 为必传参数,仅支持 http 和
https,不支持指定端口号,且传入的地址需要与获取authorization_code时,传入的回调地址保持一致 (optional)ApiException - If fail to call the API, e.g. server error or cannot deserialize the
response bodypublic com.squareup.okhttp.Call oauthTokenAsync(Long clientId, String clientSecret, String grantType, String authorizationCode, String refreshToken, String redirectUri, ApiCallback<OauthTokenResponse> callback) throws ApiException
clientId - (required)clientSecret - (required)grantType - (required)authorizationCode - (optional)refreshToken - (optional)redirectUri - 应用回调地址,当 grant_type=authorization_code时,redirect_uri 为必传参数,仅支持 http 和
https,不支持指定端口号,且传入的地址需要与获取authorization_code时,传入的回调地址保持一致 (optional)callback - The callback to be executed when the API call finishesApiException - If fail to process the API call, e.g. serializing the request body objectCopyright © 2020. All rights reserved.