AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultOAuthApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
| 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.
|
RetrieveTokenStatusResponse |
retrieveTokenStatus(String authorization)
Returns information about an [OAuth access
token](https://developer.squareup.com/docs/build-basics/access-tokens#get-an-oauth-access-token) or
an application’s [personal access
token](https://developer.squareup.com/docs/build-basics/access-tokens#get-a-personal-access-token).
|
CompletableFuture<RetrieveTokenStatusResponse> |
retrieveTokenStatusAsync(String authorization)
Returns information about an [OAuth access
token](https://developer.squareup.com/docs/build-basics/access-tokens#get-an-oauth-access-token) or
an application’s [personal access
token](https://developer.squareup.com/docs/build-basics/access-tokens#get-a-personal-access-token).
|
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, getGlobalConfiguration, getHttpCallbackpublic DefaultOAuthApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.@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 on 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 on 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.public RetrieveTokenStatusResponse retrieveTokenStatus(String authorization) throws ApiException, IOException
retrieveTokenStatus in interface OAuthApiauthorization - 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<RetrieveTokenStatusResponse> retrieveTokenStatusAsync(String authorization)
retrieveTokenStatusAsync in interface OAuthApiauthorization - Required parameter: Client APPLICATION_SECRETCopyright © 2023. All rights reserved.