diff options
| author | Yigit Sever | 2021-04-20 00:43:21 +0300 |
|---|---|---|
| committer | Yigit Sever | 2021-04-20 00:43:21 +0300 |
| commit | 4275cafb93552563be2e87531fe9ab88c76906db (patch) | |
| tree | 50dd3ee1ff986b56a5ba792ef51ab1880c6e60a8 /src/schema.rs | |
| parent | 7a8130dc235eb4c7d683d86568a05d6cbcfbd1a3 (diff) | |
| download | gradecoin-4275cafb93552563be2e87531fe9ab88c76906db.tar.gz gradecoin-4275cafb93552563be2e87531fe9ab88c76906db.tar.bz2 gradecoin-4275cafb93552563be2e87531fe9ab88c76906db.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 { |
