diff options
| author | Yigit Sever | 2021-04-20 00:43:21 +0300 |
|---|---|---|
| committer | Yigit Sever | 2021-04-20 00:43:21 +0300 |
| commit | a53ccc6f5ca64d46abb94ae743dc5d063a87959e (patch) | |
| tree | 75feb35db75b627d6e7e1a333b22094b58fca780 /src/schema.rs | |
| parent | 10afcb0b0ea8794b5b14acedba48bf291b164e41 (diff) | |
| download | gradecoin-a53ccc6f5ca64d46abb94ae743dc5d063a87959e.tar.gz gradecoin-a53ccc6f5ca64d46abb94ae743dc5d063a87959e.tar.bz2 gradecoin-a53ccc6f5ca64d46abb94ae743dc5d063a87959e.zip | |
Bugfix
Users cannot authenticate twice now
Diffstat (limited to 'src/schema.rs')
| -rw-r--r-- | src/schema.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs index 81bfc1b..40c6329 100644 --- a/src/schema.rs +++ b/src/schema.rs | |||
| @@ -253,6 +253,12 @@ pub struct MetuId { | |||
| 253 | passwd: String, | 253 | passwd: String, |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | impl MetuId { | ||
| 257 | pub fn quick_equal(&self, other: &str) -> bool { | ||
| 258 | self.id == other | ||
| 259 | } | ||
| 260 | } | ||
| 261 | |||
| 256 | /// The plaintext of the initial user authentication request | 262 | /// The plaintext of the initial user authentication request |
| 257 | #[derive(Serialize, Deserialize, Debug, PartialEq)] | 263 | #[derive(Serialize, Deserialize, Debug, PartialEq)] |
| 258 | pub struct AuthRequest { | 264 | pub struct AuthRequest { |
