-
Notifications
You must be signed in to change notification settings - Fork 41
/
auth.stone
106 lines (81 loc) · 3.34 KB
/
auth.stone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
namespace auth
import common
struct TokenScopeError
required_scope String
"The required scope to access the route."
union AuthError
"Errors occurred during authentication."
invalid_access_token
"The access token is invalid."
invalid_select_user
"The user specified in 'Dropbox-API-Select-User' is no longer on the team."
invalid_select_admin
"The user specified in 'Dropbox-API-Select-Admin' is not a Dropbox Business team admin."
user_suspended
"The user has been suspended."
expired_access_token
"The access token has expired."
missing_scope TokenScopeError
"The access token does not have the required scope to access the route."
route_access_denied
"The route is not available to public."
route token/revoke(Void, Void, Void)
"Disables the access token used to authenticate the call.
If there is a corresponding refresh token for the access token,
this disables that refresh token, as well as any other access tokens for that refresh token."
attrs
allow_app_folder_app = true
union RateLimitReason
too_many_requests
"You are making too many requests in the past few minutes."
too_many_write_operations
"There are currently too many write operations happening in the user's Dropbox."
struct RateLimitError
"Error occurred because the app is being rate limited."
reason RateLimitReason
"The reason why the app is being rate limited."
retry_after UInt64 = 1
"The number of seconds that the app should wait
before making another request."
#
# OAuth 1.0 token conversion
#
struct TokenFromOAuth1Arg
oauth1_token String(min_length=1)
"The supplied OAuth 1.0 access token."
oauth1_token_secret String(min_length=1)
"The token secret associated with the supplied access token."
example default
oauth1_token = "qievr8hamyg6ndck"
oauth1_token_secret = "qomoftv0472git7"
struct TokenFromOAuth1Result
oauth2_token String(min_length=1)
"The OAuth 2.0 token generated from the supplied OAuth 1.0 token."
example default
oauth2_token = "9mCrkS7BIdAAAAAAAAAAHHS0TsSnpYvKQVtKdBnN5IuzhYOGblSgTcHgBFKFMmFn"
union TokenFromOAuth1Error
invalid_oauth1_token_info
"Part or all of the OAuth 1.0 access token info is invalid."
app_id_mismatch
"The authorized app does not match the app associated with the supplied access token."
route token/from_oauth1(TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) deprecated
"Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token."
attrs
auth = "app"
allow_app_folder_app = true
union AccessError
"Error occurred because the account doesn't have permission to access the resource."
invalid_account_type InvalidAccountTypeError
"Current account type cannot access the resource."
paper_access_denied PaperAccessError
"Current account cannot access Paper."
union PaperAccessError
paper_disabled
"Paper is disabled."
not_paper_user
"The provided user has not used Paper yet."
union InvalidAccountTypeError
endpoint
"Current account type doesn't have permission to access this route endpoint."
feature
"Current account type doesn't have permission to access this feature."