Initial mfa support (for internal users) #93591
@ -168,12 +168,12 @@ urlpatterns = [
|
||||
),
|
||||
path(
|
||||
'mfa/totp/',
|
||||
mfa.TotpView.as_view(),
|
||||
mfa.TotpRegisterView.as_view(),
|
||||
name='mfa_totp',
|
||||
),
|
||||
path(
|
||||
'mfa/u2f/',
|
||||
mfa.U2fView.as_view(),
|
||||
mfa.U2fRegisterView.as_view(),
|
||||
name='mfa_u2f',
|
||||
),
|
||||
path(
|
||||
|
@ -96,10 +96,10 @@ class InvalidateRecoveryView(mixins.MfaRequiredIfConfiguredMixin, View):
|
||||
return redirect('bid_main:mfa')
|
||||
|
||||
|
||||
class TotpView(mixins.MfaRequiredIfConfiguredMixin, FormView):
|
||||
class TotpRegisterView(mixins.MfaRequiredIfConfiguredMixin, FormView):
|
||||
form_class = TotpRegisterForm
|
||||
success_url = reverse_lazy('bid_main:mfa')
|
||||
template_name = "bid_main/mfa/totp.html"
|
||||
template_name = "bid_main/mfa/totp_register.html"
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
@ -134,10 +134,10 @@ class TotpView(mixins.MfaRequiredIfConfiguredMixin, FormView):
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
class U2fView(mixins.MfaRequiredIfConfiguredMixin, FormView):
|
||||
class U2fRegisterView(mixins.MfaRequiredIfConfiguredMixin, FormView):
|
||||
form_class = U2fRegisterForm
|
||||
success_url = reverse_lazy('bid_main:mfa')
|
||||
template_name = "bid_main/mfa/u2f.html"
|
||||
template_name = "bid_main/mfa/u2f_register.html"
|
||||
|
||||
def get_form_kwargs(self):
|
||||
Oleg-Komarov marked this conversation as resolved
|
||||
credentials = [
|
||||
|
Loading…
Reference in New Issue
Block a user
is
context['first_device'] = not devices_for_user(self.request.user)
necessary here as well?