2FA: Support for adding TOTP-based devices

This commit is contained in:
Raphael Michel
2016-10-08 14:11:59 +02:00
parent 508a4f8e86
commit 2f24af824e
18 changed files with 290 additions and 17 deletions

View File

@@ -102,3 +102,10 @@ class UserSettingsForm(forms.ModelForm):
self.instance.set_password(password1)
return self.cleaned_data
class User2FADeviceAddForm(forms.Form):
name = forms.CharField(label=_('Device name'))
devicetype = forms.ChoiceField(label=_('Device type'), widget=forms.RadioSelect, choices=(
('totp', _('Smartphone with the Authenticator application')),
))