Skip to main content

dropbox_sdk/generated/sync_routes/
auth.rs

1// DO NOT EDIT
2// This file was @generated by Stone
3
4#![allow(
5    clippy::too_many_arguments,
6    clippy::large_enum_variant,
7    clippy::result_large_err,
8    clippy::doc_markdown,
9    clippy::doc_lazy_continuation,
10)]
11
12#[allow(unused_imports)]
13pub use crate::generated::types::auth::*;
14
15/// Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token.
16#[deprecated]
17pub fn token_from_oauth1(
18    client: &impl crate::client_trait::AppAuthClient,
19    arg: &TokenFromOAuth1Arg,
20) -> Result<TokenFromOAuth1Result, crate::Error<TokenFromOAuth1Error>> {
21    crate::client_helpers::unwrap_async(
22        crate::client_helpers::request(
23            client,
24            crate::client_trait_common::Endpoint::Api,
25            crate::client_trait_common::Style::Rpc,
26            "auth/token/from_oauth1",
27            arg,
28            None)
29    )
30}
31
32/// Disables the access token used to authenticate the call. If there is a corresponding refresh
33/// token for the access token, this disables that refresh token, as well as any other access tokens
34/// for that refresh token.
35pub fn token_revoke(
36    client: &impl crate::client_trait::UserAuthClient,
37) -> Result<(), crate::Error<crate::NoError>> {
38    crate::client_helpers::unwrap_async(
39        crate::client_helpers::request(
40            client,
41            crate::client_trait_common::Endpoint::Api,
42            crate::client_trait_common::Style::Rpc,
43            "auth/token/revoke",
44            &(),
45            None)
46    )
47}
48