From 9a54104bddfad6e4a96c6a3504e7806259bb4656 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 23 Dec 2024 14:12:48 -0600 Subject: [PATCH] Add TODOs for planning --- Dockerfile | 1 + demo/src/main.rs | 1 + frontend/src/components/StatefulDemo.tsx | 1 + src/main.rs | 5 +++++ 4 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 347b328..1e0b75f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apt update && apt install -y g++-mingw-w64-x86-64 RUN rustup target add x86_64-pc-windows-gnu RUN rustup target add x86_64-unknown-linux-gnu +# TODO: Add support for macOS # RUN rustup target add x86_64-apple-darwin COPY ./demo ./ diff --git a/demo/src/main.rs b/demo/src/main.rs index a22827b..a6c4afe 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs @@ -26,6 +26,7 @@ fn main() { return; } + // TODO: Use token to make request // Check the hash of the value let value_hash = sha2::Sha256::digest(key_data.value.as_bytes()); let hash_match = hex::encode(value_hash) == key_data.value_hash; diff --git a/frontend/src/components/StatefulDemo.tsx b/frontend/src/components/StatefulDemo.tsx index b09bd45..d71cea9 100644 --- a/frontend/src/components/StatefulDemo.tsx +++ b/frontend/src/components/StatefulDemo.tsx @@ -46,6 +46,7 @@ const StatefulDemo = ({ class: className }: StatefulDemoProps) => { socket.close(); }; }, []); + // TODO: Toasts const randomBits = (bits: number) => Math.floor(Math.random() * 2 ** bits) .toString(16) diff --git a/src/main.rs b/src/main.rs index abf9247..d849611 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,6 +204,11 @@ async fn main() { let static_dir = StaticDir::new(["./public"]).defaults("index.html"); + // TODO: Move handlers to a separate file + // TODO: Improved Token Generation + // TODO: Advanded HMAC Verification + // TODO: Session Purging + let router = Router::new() .hoop(CatchPanic::new()) .hoop(cors)