Enum dropbox_sdk::oauth2::Oauth2Type
source · [−]Expand description
Which type of OAuth2 flow to use.
Variants
AuthorizationCode(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)
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)
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
sourceimpl Clone for Oauth2Type
impl Clone for Oauth2Type
sourcefn clone(&self) -> Oauth2Type
fn clone(&self) -> Oauth2Type
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Oauth2Type
impl Send for Oauth2Type
impl Sync for Oauth2Type
impl Unpin for Oauth2Type
impl UnwindSafe for Oauth2Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more