diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | TODO.md | 9 |
2 files changed, 12 insertions, 14 deletions
| @@ -1,25 +1,22 @@ | |||
| 1 | # Gradecoin | 1 | # Gradecoin |
| 2 | 2 | ||
| 3 | This will sit behind nginx reverse proxy so running at 127.0.0.1:8080 is no problem, or https. | 3 | This will sit behind nginx reverse proxy so running at 127.0.0.1:8080 or not using https is not a problem. |
| 4 | 4 | ||
| 5 | ``` | 5 | ``` |
| 6 | $ cargo run | 6 | # Test the project |
| 7 | 7 | $ cargo test | |
| 8 | $ curl --location --request POST 'localhost:8080/transaction' --header 'Content-Type: application/json' --data-raw '{ | 8 | |
| 9 | "source": "Myself Truly", | 9 | # Read the documentation |
| 10 | "target": "Literally Anybody Else", | 10 | $ cargo doc --open |
| 11 | "amount": 12, | ||
| 12 | "timestamp": "2021-04-07T00:17:00" | ||
| 13 | }' | ||
| 14 | ``` | 11 | ``` |
| 15 | 12 | ||
| 16 | # how? | 13 | # how? |
| 17 | |||
| 18 | ## authentication | 14 | ## authentication |
| 19 | > Uses /register endpoint | 15 | > Uses /register endpoint |
| 20 | - Student creates their own 2048 bit RSA `keypair` | 16 | - Student creates their own 2048 bit RSA `keypair` |
| 21 | - Downloads Gradecoin's Public Key from Moodle | 17 | - Downloads Gradecoin's Public Key from Moodle |
| 22 | - Encrypts their JSON wrapped Public Key and Student ID using Gradecoin's Public Key | 18 | - Encrypts their JSON wrapped Public Key and Student ID using Gradecoin's Public Key |
| 19 | - Sends that to the /register endpoint with a POST request | ||
| 23 | - Their public key is now in our database and can be used to sign their JWT's during requests | 20 | - Their public key is now in our database and can be used to sign their JWT's during requests |
| 24 | 21 | ||
| 25 | ## transactions | 22 | ## transactions |
| @@ -1,12 +1,13 @@ | |||
| 1 | # TODO | 1 | # TODO |
| 2 | 2 | ||
| 3 | ## Proof-of-work | 3 | ## Authentication |
| 4 | So far so good | 4 | - [ ] /register is currently accepting non-encrypted (regular JSON) payloads |
| 5 | 5 | ||
| 6 | ## Authentication(DONE/DONE) | 6 | ## Authorization |
| 7 | - [ ] POST requests to /block should be authenticated as well | ||
| 7 | 8 | ||
| 8 | ## Verbosity | 9 | ## Verbosity |
| 9 | - [ ] Verbose error messages (use error.rs?) | 10 | - [ ] Verbose error messages (use error.rs ❓) |
| 10 | 11 | ||
| 11 | ## Tests | 12 | ## Tests |
| 12 | - [ ] Schema Tests | 13 | - [ ] Schema Tests |
