From 0cc703bc74539f123d57d2d392eaf6b99eca26e7 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 13 Apr 2021 04:05:11 +0300 Subject: Update todo and readme --- README.md | 17 +++++++---------- TODO.md | 9 +++++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ff951b1..da95cce 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,22 @@ # Gradecoin -This will sit behind nginx reverse proxy so running at 127.0.0.1:8080 is no problem, or https. +This will sit behind nginx reverse proxy so running at 127.0.0.1:8080 or not using https is not a problem. ``` -$ cargo run - -$ curl --location --request POST 'localhost:8080/transaction' --header 'Content-Type: application/json' --data-raw '{ - "source": "Myself Truly", - "target": "Literally Anybody Else", - "amount": 12, - "timestamp": "2021-04-07T00:17:00" -}' +# Test the project +$ cargo test + +# Read the documentation +$ cargo doc --open ``` # how? - ## authentication > Uses /register endpoint - Student creates their own 2048 bit RSA `keypair` - Downloads Gradecoin's Public Key from Moodle - Encrypts their JSON wrapped Public Key and Student ID using Gradecoin's Public Key +- Sends that to the /register endpoint with a POST request - Their public key is now in our database and can be used to sign their JWT's during requests ## transactions diff --git a/TODO.md b/TODO.md index 622c95a..f762b01 100644 --- a/TODO.md +++ b/TODO.md @@ -1,12 +1,13 @@ # TODO -## Proof-of-work -So far so good +## Authentication +- [ ] /register is currently accepting non-encrypted (regular JSON) payloads -## Authentication(DONE/DONE) +## Authorization +- [ ] POST requests to /block should be authenticated as well ## Verbosity -- [ ] Verbose error messages (use error.rs?) +- [ ] Verbose error messages (use error.rs ❓) ## Tests - [ ] Schema Tests -- cgit v1.2.3-70-g09d2