diff options
| author | mrw1593 <botahamec@outlook.com> | 2023-05-29 17:18:39 -0400 |
|---|---|---|
| committer | mrw1593 <botahamec@outlook.com> | 2023-05-29 17:18:39 -0400 |
| commit | f1a64b059d430cd2e334e297c43ae8053104ab05 (patch) | |
| tree | 16d6d62d8157aa692d6b8e06fde7739a86579071 | |
| parent | 4782cd0c9f1b930f05fe24118001a4de45893b79 (diff) | |
Optional authorization
| -rw-r--r-- | src/api/oauth.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/oauth.rs b/src/api/oauth.rs index a563ac8..d77695e 100644 --- a/src/api/oauth.rs +++ b/src/api/oauth.rs @@ -67,14 +67,16 @@ struct TokenRequest { #[serde(flatten)] grant_type: GrantType, scope: String, // TODO lol no + // TODO support optional client credentials in here } #[post("/token")] async fn token( db: web::Data<MySqlPool>, req: web::Form<TokenRequest>, - authorization: web::Header<authorization::BasicAuthorization>, // TODO make this optional + authorization: Option<web::Header<authorization::BasicAuthorization>>, ) -> HttpResponse { + // TODO protect against brute force attacks todo!() } |
