dropbox_sdk/generated/async_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<'a>(
17    client: &'a impl crate::async_client_trait::AppAuthClient,
18    arg: &'a TokenFromOAuth1Arg,
19) -> impl std::future::Future<Output=Result<TokenFromOAuth1Result, crate::Error<TokenFromOAuth1Error>>> + Send + 'a {
20    crate::client_helpers::request(
21        client,
22        crate::client_trait_common::Endpoint::Api,
23        crate::client_trait_common::Style::Rpc,
24        "auth/token/from_oauth1",
25        arg,
26        None)
27}
28
29/// Disables the access token used to authenticate the call. If there is a corresponding refresh
30/// token for the access token, this disables that refresh token, as well as any other access tokens
31/// for that refresh token.
32pub fn token_revoke(
33    client: &impl crate::async_client_trait::UserAuthClient,
34) -> impl std::future::Future<Output=Result<(), crate::Error<crate::NoError>>> + Send + '_ {
35    crate::client_helpers::request(
36        client,
37        crate::client_trait_common::Endpoint::Api,
38        crate::client_trait_common::Style::Rpc,
39        "auth/token/revoke",
40        &(),
41        None)
42}
43