BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultOAuthApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultOAuthApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
ObtainTokenResponse |
obtainToken(ObtainTokenRequest body)
Returns an OAuth access token and a refresh token unless the `short_lived` parameter is set
to `true`, in which case the endpoint returns only an access token.
|
CompletableFuture<ObtainTokenResponse> |
obtainTokenAsync(ObtainTokenRequest body)
Returns an OAuth access token and a refresh token unless the `short_lived` parameter is set
to `true`, in which case the endpoint returns only an access token.
|
RenewTokenResponse |
renewToken(String clientId,
RenewTokenRequest body,
String authorization)
Deprecated.
|
CompletableFuture<RenewTokenResponse> |
renewTokenAsync(String clientId,
RenewTokenRequest body,
String authorization)
Deprecated.
|
RevokeTokenResponse |
revokeToken(RevokeTokenRequest body,
String authorization)
Revokes an access token generated with the OAuth flow.
|
CompletableFuture<RevokeTokenResponse> |
revokeTokenAsync(RevokeTokenRequest body,
String authorization)
Revokes an access token generated with the OAuth flow.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultOAuthApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultOAuthApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.@Deprecated public RenewTokenResponse renewToken(String clientId, RenewTokenRequest body, String authorization) throws ApiException, IOException
renewToken in interface OAuthApiclientId - Required parameter: Your application ID, which is available in the OAuth
page in the [Developer Dashboard](https://developer.squareup.com/apps).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.authorization - Required parameter: Client APPLICATION_SECRETApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.@Deprecated public CompletableFuture<RenewTokenResponse> renewTokenAsync(String clientId, RenewTokenRequest body, String authorization)
renewTokenAsync in interface OAuthApiclientId - Required parameter: Your application ID, which is available in the OAuth
page in the [Developer Dashboard](https://developer.squareup.com/apps).body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.authorization - Required parameter: Client APPLICATION_SECRETpublic RevokeTokenResponse revokeToken(RevokeTokenRequest body, String authorization) throws ApiException, IOException
revokeToken in interface OAuthApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.authorization - Required parameter: Client APPLICATION_SECRETApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RevokeTokenResponse> revokeTokenAsync(RevokeTokenRequest body, String authorization)
revokeTokenAsync in interface OAuthApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.authorization - Required parameter: Client APPLICATION_SECRETpublic ObtainTokenResponse obtainToken(ObtainTokenRequest body) throws ApiException, IOException
obtainToken in interface OAuthApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ObtainTokenResponse> obtainTokenAsync(ObtainTokenRequest body)
obtainTokenAsync in interface OAuthApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2022. All rights reserved.