Throttling TOTP

This commit is contained in:
Mohamed El-Kalioby
2021-06-23 20:43:31 +03:00
parent 6d59258393
commit 0b83758625
2 changed files with 18 additions and 2 deletions

View File

@@ -30,3 +30,14 @@ class UserKey(models.Model):
class Meta:
app_label = "mfa"
class OTPTracker(models.Model):
username = models.CharField(max_length=50)
value = models.CharField(max_length = 6)
success = models.BooleanField(blank=True)
done_on = models.DateTimeField(auto_now=True)
class Meta:
app_label = 'mfa'
indexes = [models.Index(fields=['username'])]