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