rm commented code

This commit is contained in:
Tobias Bengfort
2021-06-17 10:21:04 +02:00
parent 007872bd8a
commit d54cd20d9b
8 changed files with 1 additions and 15 deletions

View File

@@ -5,7 +5,6 @@ import datetime, random
from random import randint
from .models import *
# from django.template.context import RequestContext
from .views import login
from .Common import send

View File

@@ -7,7 +7,6 @@ from django.template.context_processors import csrf
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
# from django.template.context import RequestContext
import simplejson
from fido2 import cbor
from django.http import HttpResponse

View File

@@ -87,9 +87,6 @@ def add(request):
tk.properties["user_agent"] = ua
tk.save()
context["success"] = True
# tk.properties["user_agent"]=ua
# tk.save()
# context["success"]=True
else:
context[

View File

@@ -10,7 +10,6 @@ from cryptography.hazmat.primitives.serialization import Encoding
from django.shortcuts import render
import simplejson
# from django.template.context import RequestContext
from django.template.context_processors import csrf
from django.conf import settings
from django.http import HttpResponse

View File

@@ -3,10 +3,6 @@ from jsonfield import JSONField
from jose import jwt
from django.conf import settings
# from jsonLookup import shasLookup, hasLookup
# JSONField.register_lookup(shasLookup)
# JSONField.register_lookup(hasLookup)
class User_Keys(models.Model):
username = models.CharField(max_length=50)

View File

@@ -91,7 +91,6 @@ def verify(request):
uk = User_Keys()
uk.username = request.user.username
uk.properties = {"secret_key": secret_key}
# uk.name="Authenticatior #%s"%User_Keys.objects.filter(username=user.username,type="TOTP")
uk.key_type = "TOTP"
uk.save()
return HttpResponse("Success")

View File

@@ -1,11 +1,10 @@
from . import views, totp, U2F, TrustedDevice, helpers, FIDO2, Email
# app_name='mfa'
try:
from django.urls import re_path as url
except:
from django.conf.urls import url
urlpatterns = [
url(r"totp/start/", totp.start, name="start_new_otop"),
url(r"totp/getToken", totp.getToken, name="get_new_otop"),
@@ -43,4 +42,3 @@ urlpatterns = [
url(r"delete", views.delKey, name="mfa_delKey"),
url(r"reset", views.reset_cookie, name="mfa_reset_cookie"),
]
# print(urlpatterns)

View File

@@ -34,7 +34,6 @@ def index(request):
def verify(request, username):
request.session["base_username"] = username
# request.session["base_password"] = password
keys = User_Keys.objects.filter(username=username, enabled=1)
methods = list(set([k.key_type for k in keys]))