From 147742b2145ed0b864b973aa9830060b40c84cd7 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Wed, 1 Mar 2023 11:43:29 -0500 Subject: [PATCH] commit before cargo-fix --- trifid-api/src/routes/v1/auth/check_session.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trifid-api/src/routes/v1/auth/check_session.rs b/trifid-api/src/routes/v1/auth/check_session.rs index 0bab53d..07b256e 100644 --- a/trifid-api/src/routes/v1/auth/check_session.rs +++ b/trifid-api/src/routes/v1/auth/check_session.rs @@ -17,6 +17,14 @@ use rocket::{post, options}; use crate::auth::{PartialUserInfo, TOTPAuthenticatedUserInfo}; +/* +These endpoints do not return any actual data, and are used purely to check auth tokens +by the client code. +Since PartialUserInfo implements FromRequest, and will error out the req even before +it gets to our handler if the auth is invalid, these reqs just have to have +it as a param. They therefore don't need to s + */ + #[options("/v1/auth/check_session")] pub async fn options() -> &'static str { ""