pub struct AuthorizeUrlBuilder<'a> { /* private fields */ }
Expand description

Builds a URL that can be given to the user to visit to have Dropbox authorize your app.

If this app is a server-side app, you should redirect the user’s browser to this URL to begin the authorization, and set the redirect_uri to bring the user back to your site when done.

If this app is a client-side app, you should open a web browser with this URL to begin the authorization, and set the redirect_uri to bring the user back to your app.

As a special case, if your app is a command-line application, you can skip setting the redirect_uri and print this URL and instruct the user to open it in a browser. When they complete the authorization, they will be given an auth code to input back into your app.

If you are using the deprecated Implicit Grant flow, the redirect after authentication will provide you an OAuth2 token. In all other cases, you will have an authorization code, and you must call make another call to obtain a token. See Authorization, which is used to do this.

Implementations

Return a new builder for the given client ID and auth flow type, with all fields set to defaults.

Set whether the user should be prompted to approve the request regardless of whether they have approved it before.

Set whether the user should have to re-login when approving the request.

Set whether new user signups should be allowed or not while approving the request.

Set the URI the approve request should redirect the user to when completed. If no redirect URI is specified, the user will be shown the code directly and will have to manually input it into your app.

Up to 500 bytes of arbitrary data that will be passed back to your redirect URI. This parameter should be used to protect against cross-site request forgery (CSRF).

If this parameter is specified, the user will be asked to authorize with a particular type of Dropbox account, either work for a team account or personal for a personal account. Your app should still verify the type of Dropbox account after authorization since the user could modify or remove the require_role parameter.

Force a specific locale when prompting the user, instead of the locale indicated by their browser.

What type of token should be requested. Defaults to TokenType::ShortLivedAndRefresh.

This parameter allows your user to authorize a subset of the scopes selected in the App Console. Multiple scopes are separated by a space. If this parameter is omitted, the authorization page will request all scopes selected on the Permissions tab.

Build the OAuth2 authorization URL from the previously given parameters.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.