Skip to content

Commit 0330ebd

Browse files
authored
Add OAuth2Token, OAuth2TokenRevocation, and OAuth2AuthorizationCurrent to Route (#2935)
This adds routes to `Route` that are related to OAuth2 and token exchanges. This is a step towards resolving #762 and #2475.
1 parent 640fa8a commit 0330ebd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/http/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,7 @@ impl Http {
29442944
multipart: None,
29452945
headers: None,
29462946
method: LightMethod::Get,
2947-
route: Route::Oauth2ApplicationCurrent,
2947+
route: Route::OAuth2ApplicationCurrent,
29482948
params: None,
29492949
})
29502950
.await

src/http/routing.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,22 @@ routes! ('a, {
361361
api!("/invites/{}", code),
362362
Some(RatelimitingKind::Path);
363363

364-
Oauth2ApplicationCurrent,
364+
OAuth2Token,
365+
api!("/oauth2/token"),
366+
None;
367+
368+
OAuth2TokenRevocation,
369+
api!("/oauth2/token/revoke"),
370+
None;
371+
372+
OAuth2ApplicationCurrent,
365373
api!("/oauth2/applications/@me"),
366374
None;
367375

376+
OAuth2AuthorizationCurrent,
377+
api!("/oauth2/@me"),
378+
None;
379+
368380
StatusIncidentsUnresolved,
369381
status!("/incidents/unresolved.json"),
370382
None;

0 commit comments

Comments
 (0)