增加两步验证基础代码

This commit is contained in:
virusdefender
2015-12-11 22:43:23 +08:00
parent fbbc3558b9
commit 2222a56d0a
6 changed files with 290 additions and 6 deletions

View File

@@ -40,6 +40,9 @@ class User(AbstractBaseUser):
reset_password_token_create_time = models.DateTimeField(blank=True, null=True)
# 论坛授权token
auth_token = models.CharField(max_length=40, blank=True, null=True)
# 是否开启两步验证
two_factor_auth = models.BooleanField(default=False)
tfa_token = models.CharField(max_length=10, blank=True, null=True)
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = []