Package com.stripe.net
Class OAuth
java.lang.Object
com.stripe.net.OAuth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
authorizeUrl
(Map<String, Object> params, RequestOptions options) Generates a URL to Stripe's OAuth form.static DeauthorizedAccount
deauthorize
(Map<String, Object> params, RequestOptions options) Disconnects an account from your platform.static void
static TokenResponse
token
(Map<String, Object> params, RequestOptions options) Uses an authorization code to connect an account to your platform and fetch the user's credentials.
-
Constructor Details
-
OAuth
public OAuth()
-
-
Method Details
-
setGlobalResponseGetter
-
authorizeUrl
public static String authorizeUrl(Map<String, Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestExceptionGenerates a URL to Stripe's OAuth form.- Parameters:
params
- the parameters to include in the URL.options
- the request options.- Returns:
- the URL to Stripe's OAuth form.
- Throws:
AuthenticationException
InvalidRequestException
-
token
public static TokenResponse token(Map<String, Object> params, RequestOptions options) throws StripeExceptionUses an authorization code to connect an account to your platform and fetch the user's credentials.- Parameters:
params
- the request parameters.options
- the request options.- Returns:
- the TokenResponse instance containing the response from the OAuth API.
- Throws:
StripeException
-
deauthorize
public static DeauthorizedAccount deauthorize(Map<String, Object> params, RequestOptions options) throws StripeExceptionDisconnects an account from your platform.- Parameters:
params
- the request parameters.options
- the request options.- Returns:
- the DeauthorizedAccount instance containing the response from the OAuth API.
- Throws:
StripeException
-