Enum dropbox_sdk::oauth2::Oauth2Type[][src]

pub enum Oauth2Type {
    AuthorizationCode(String),
    PKCE(PkceCode),
    ImplicitGrant(String),
}
Expand description

Which type of OAuth2 flow to use.

Variants

AuthorizationCode(String)

Tuple Fields

0: String

The Authorization Code flow yields a temporary authorization code which must be turned into an OAuth2 token by making another call. The authorization page can do a web redirect back to your app with the code (if it is a server-side app), or can be used without a redirect URI, in which case the authorization page displays the authorization code to the user and they must then input the code manually into the program.

PKCE(PkceCode)

Tuple Fields

The PKCE flow is an extension of the Authorization Code flow which uses dynamically generated codes instead of an app secret to perform the OAuth exchange. This both avoids having a hardcoded secret in the app (useful for client-side / mobile apps) and also ensures that the authorization code can only be used by the client.

ImplicitGrant(String)

Tuple Fields

0: String

In Implicit Grant flow, the authorization page directly includes an OAuth2 token when it redirects the user’s web browser back to your program, and no separate call to generate a token is needed. This can ONLY be used with a redirect URI.

This flow is considered “legacy” and is not as secure as the other flows.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.