package io.vertx.ext.auth.oauth2.providers;

import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.ext.auth.oauth2.OAuth2Auth;
import io.vertx.ext.auth.oauth2.OAuth2ClientOptions;
import io.vertx.ext.auth.oauth2.OAuth2FlowType;

Simplified factory to create an OAuth2Auth for Dropbox.
Author:Paulo Lopes
/** * Simplified factory to create an {@link OAuth2Auth} for Dropbox. * * @author <a href="mailto:plopes@redhat.com">Paulo Lopes</a> */
@VertxGen public interface DropboxAuth {
Create a OAuth2Auth provider for Dropbox
Params:
  • clientId – the client id given to you by Dropbox
  • clientSecret – the client secret given to you by Dropbox
/** * Create a OAuth2Auth provider for Dropbox * * @param clientId the client id given to you by Dropbox * @param clientSecret the client secret given to you by Dropbox */
static OAuth2Auth create(Vertx vertx, String clientId, String clientSecret) { return create(vertx, clientId, clientSecret, new HttpClientOptions()); }
Create a OAuth2Auth provider for Dropbox
Params:
  • clientId – the client id given to you by Dropbox
  • clientSecret – the client secret given to you by Dropbox
  • httpClientOptions – custom http client options
/** * Create a OAuth2Auth provider for Dropbox * * @param clientId the client id given to you by Dropbox * @param clientSecret the client secret given to you by Dropbox * @param httpClientOptions custom http client options */
static OAuth2Auth create(Vertx vertx, String clientId, String clientSecret, HttpClientOptions httpClientOptions) { return OAuth2Auth.create(vertx, OAuth2FlowType.AUTH_CODE, new OAuth2ClientOptions(httpClientOptions) .setSite("https://www.dropbox.com") .setTokenPath("/oauth2/token") .setAuthorizationPath("/oauth2/authorize") .setRevocationPath("/oauth2/token/revoke") .setUserInfoPath("/account/info") .setClientID(clientId) .setClientSecret(clientSecret)); } }