public interface OAuthApi
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.
|
@Deprecated RenewTokenResponse renewToken(String clientId, RenewTokenRequest body, String authorization) throws ApiException, IOException
clientId
- 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 CompletableFuture<RenewTokenResponse> renewTokenAsync(String clientId, RenewTokenRequest body, String authorization)
clientId
- 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_SECRETRevokeTokenResponse revokeToken(RevokeTokenRequest body, String authorization) throws ApiException, IOException
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.CompletableFuture<RevokeTokenResponse> revokeTokenAsync(RevokeTokenRequest body, String authorization)
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_SECRETObtainTokenResponse obtainToken(ObtainTokenRequest body) throws ApiException, IOException
body
- 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.CompletableFuture<ObtainTokenResponse> obtainTokenAsync(ObtainTokenRequest body)
body
- 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.