|Modifier and Type||Method and Description|
Returns a new OAuth
Whether or not to allow non-users to sign up for a Dropbox account via the authorization page.
Whether or not to force the user to approve the app again if they've already done so.
Do not redirect the user after authorization has completed (default).
Where to redirect the user after authorization has completed.
Request the user authorize with the particular type of Dropbox account.
Up to 476 bytes of arbitrary data that will be passed back to your redirect URI.
public DbxWebAuth.Request.Builder withNoRedirect()
After a user authorizes the app using the authorization URL, a code will be
displayed that they must copy and paste into your app. If you want users to be
redirected after authorization back to your app, use
instead. Websites should always provide a redirect URI.
public DbxWebAuth.Request.Builder withRedirectUri(String redirectUri, DbxSessionStore sessionStore)
This must be the exact URI registered in the App Console;
"localhost" must be listed if it is used for testing. All redirect URIs must be
HTTPS except for localhost URIs. If the redirect URI is omitted, the code will be
presented directly to the user and they will be invited to enter the information in
The given session store will be used for storing the Cross-Site Request Forgery
(CSRF) nonce generated during the authorization flow. To prevent CSRF attacks,
DbxWebAuth appends a nonce to each authorization request. When the authorization
flow is complete, the returned nonce is compared with the one in the store to ensure
the response is valid. A session store must be specified if a redirect URI is
redirectUri- URI to redirect authorization response, never
sessionStore- Session store to use for storing CSRF nonces across requests, never
NullPointerException- if either redirectUri or sessionStore is
public DbxWebAuth.Request.Builder withState(String state)
DbxWebAuth will always automatically append a nonce to the
state to protect against cross-site request forgery. This is true even if no state is
state- additional state to pass back to the redirect URI, or
nullto pass back no additional state.
IllegalArgumentException- if state is greater than 476 bytes
public DbxWebAuth.Request.Builder withRequireRole(String requireRole)
public DbxWebAuth.Request.Builder withForceReapprove(Boolean forceReapprove)
false (default), a user who has already approved the application may
be automatically redirected to the URI specified by
withRedirectUri(java.lang.String, com.dropbox.core.DbxSessionStore). If
true, the user will not be automatically redirected and will have to approve
the app again.
forceReapprove- whether to force a user to re-approve this app, or
nullfor default behavior
public DbxWebAuth.Request.Builder withDisableSignup(Boolean disableSignup)
true (default is
false) users will not be able to sign up
for a Dropbox account via the authorization page. Instead, the authorization page
will show a link to install Dropbox (typically through a mobile app store). This is
only intended for use when necessary for compliance with App Store policies.
disableSignup- whether or not to allow users to sign up in the authorization flow, or
nullfor default behavior
public DbxWebAuth.Request build()
DbxWebAuth.Requestthat can be used in
DbxWebAuth.DbxWebAuth(DbxRequestConfig,DbxAppInfo)to authorize a user.