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
<!-- Generated by box-gantry. DO NOT EDIT. -->
# AuthorizationManager
Reach these methods through the `authorization` field on `client::Client`.
## authorize
`GET /authorize`
| Parameter | In | Type | Required |
|---|---|---|---|
| `response_type` | query | `GetAuthorizeResponseType` | yes |
| `client_id` | query | `String` | yes |
| `redirect_uri` | query | `String` | no |
| `state` | query | `String` | no |
| `scope` | query | `String` | no |
**Returns:** text (`String`)
**Example**
```rust
let result = client.authorization.authorize(Default::default(), "CLIENT_ID".to_string(), None).await?;
```
## create_oauth2_token
`POST /oauth2/token`
**Request body** (`application/x-www-form-urlencoded`): `PostOAuth2Token`
**Returns:** `AccessToken`
**Example**
```rust
let result = client.authorization.create_oauth2_token(schemas::PostOAuth2Token { /* … */ }).await?;
```
## create_oauth2_token_refresh
`POST /oauth2/token`
**Request body** (`application/x-www-form-urlencoded`): `PostOAuth2TokenRefreshAccessToken`
**Returns:** `AccessToken`
**Example**
```rust
let result = client.authorization.create_oauth2_token_refresh(schemas::PostOAuth2TokenRefreshAccessToken { /* … */ }).await?;
```
## revoke_oauth2
`POST /oauth2/revoke`
**Request body** (`application/x-www-form-urlencoded`): `PostOAuth2Revoke`
**Returns:** no content
**Example**
```rust
client.authorization.revoke_oauth2(schemas::PostOAuth2Revoke { /* … */ }).await?;
```