diff --git a/mfa/TrustedDevice.py b/mfa/TrustedDevice.py index 780fa99..127ee19 100644 --- a/mfa/TrustedDevice.py +++ b/mfa/TrustedDevice.py @@ -6,7 +6,6 @@ import user_agents from django.conf import settings from django.http import HttpResponse from django.shortcuts import render -from django.template.context import RequestContext from django.template.context_processors import csrf from django.utils import timezone from jose import jwt diff --git a/mfa/U2F.py b/mfa/U2F.py index 4a24d61..c6d8e0e 100644 --- a/mfa/U2F.py +++ b/mfa/U2F.py @@ -19,6 +19,7 @@ from u2flib_server.u2f import ( complete_registration, ) +from .Common import get_redirect_url from .models import User_Keys from .views import login diff --git a/mfa/helpers.py b/mfa/helpers.py index c2f9640..fed0457 100644 --- a/mfa/helpers.py +++ b/mfa/helpers.py @@ -1,10 +1,9 @@ -import pyotp import simplejson from django.shortcuts import HttpResponse from . import FIDO2, U2F, TrustedDevice, totp from .models import User_Keys -from .views import goto, verify +from .views import verify def has_mfa(request, username): diff --git a/mfa/totp.py b/mfa/totp.py index 8e90842..72288c3 100644 --- a/mfa/totp.py +++ b/mfa/totp.py @@ -7,11 +7,11 @@ import simplejson from django.conf import settings from django.http import HttpResponse from django.shortcuts import render -from django.template.context import RequestContext from django.template.context_processors import csrf from django.utils import timezone from django.views.decorators.cache import never_cache +from .Common import get_redirect_url from .models import User_Keys from .views import login diff --git a/mfa/views.py b/mfa/views.py index ffa7b2d..7827adf 100644 --- a/mfa/views.py +++ b/mfa/views.py @@ -1,12 +1,9 @@ import importlib from django.conf import settings -from django.contrib import auth from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render -from django.template.context import RequestContext -from django.template.context_processors import csrf from user_agents import parse try: