2020-05-13 10:38:37 +00:00
|
|
|
from django.db.models import Model, CharField, ForeignKey, CASCADE, DateTimeField
|
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
|
|
|
from dbsettings.functions import getValue
|
|
|
|
|
|
|
|
import pyotp
|
|
|
|
|
|
|
|
class TOTPUser(Model):
|
2020-05-22 16:13:23 +00:00
|
|
|
secret = CharField(max_length=32, default=pyotp.random_base32)
|
2020-05-13 10:38:37 +00:00
|
|
|
user = ForeignKey(get_user_model(), CASCADE)
|