diff options
author | Yigit Sever | 2021-04-11 21:39:18 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-12 00:03:23 +0300 |
commit | 518a99a132707ba0e2572b24ca18f6b9606d7334 (patch) | |
tree | c7cbe183f088b286903389f58743b1e5688119c5 /Cargo.toml | |
parent | 217398c52c68b3b73454d3e9f66c85b5a1638f3f (diff) | |
download | gradecoin-518a99a132707ba0e2572b24ca18f6b9606d7334.tar.gz gradecoin-518a99a132707ba0e2572b24ca18f6b9606d7334.tar.bz2 gradecoin-518a99a132707ba0e2572b24ca18f6b9606d7334.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.toml')
-rw-r--r-- | Cargo.toml | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,7 +14,8 @@ chrono = { version = "0.4.10", features = ["serde"] } | |||
14 | log = "0.4.8" | 14 | log = "0.4.8" |
15 | pretty_env_logger = "0.3.1" | 15 | pretty_env_logger = "0.3.1" |
16 | parking_lot = "0.10.0" | 16 | parking_lot = "0.10.0" |
17 | serde_json = "1.0.59" | ||
18 | lazy_static = "1.4.0" | ||
17 | 19 | ||
18 | [dev-dependencies] | 20 | [dev-dependencies] |
19 | serde_json = "1.0.44" | 21 | serde_test = "1.0.117" |
20 | serde_test = "1.0.104" | ||