diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 17 |
1 files changed, 7 insertions, 10 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 |
