aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.lock
diff options
context:
space:
mode:
authorYigit Sever2021-04-11 21:39:18 +0300
committerYigit Sever2021-04-12 00:03:23 +0300
commitd3889bd5945b2ffc63d20942b7730b5a1d0e3a42 (patch)
treea8b2dfcd416f308e7fae4baea95d6107a9871c43 /Cargo.lock
parent11b498dc44a7d2ed8f1acc62d64be7f114adc336 (diff)
downloadgradecoin-d3889bd5945b2ffc63d20942b7730b5a1d0e3a42.tar.gz
gradecoin-d3889bd5945b2ffc63d20942b7730b5a1d0e3a42.tar.bz2
gradecoin-d3889bd5945b2ffc63d20942b7730b5a1d0e3a42.zip
Implement User handling and authentication
New struct: User, corresponds to a student Blocks and users are persistent (written to a text file) PostgreSQL would've been overkill, we have 30 students AuthRequest is the representation for incoming register requests and User is the inner representation Students who are enrolled to the class are hardcoded, only they can register new accounts There are two new tests, one checks if a priviliged (=enrolled) user can create an account and the other checks if a unpriviliged one cannot There are quick verbose error messages that I'm not married to, might move on to something better honestly There's nothing stopping a malicious user to pre-register everyone with mock public keys and effectively lock everyone out, what's a good secret we can use?
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 45ae0a0..d4d5926 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -281,6 +281,7 @@ name = "gradecoin"
281version = "0.1.0" 281version = "0.1.0"
282dependencies = [ 282dependencies = [
283 "chrono", 283 "chrono",
284 "lazy_static",
284 "log", 285 "log",
285 "parking_lot", 286 "parking_lot",
286 "pretty_env_logger", 287 "pretty_env_logger",