mirror of
https://github.com/nikdoof/test-auth.git
synced 2026-01-31 08:28:15 +00:00
PEP8 of most of the API app
This commit is contained in:
@@ -2,12 +2,13 @@ from django.http import HttpResponseForbidden
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from api.models import AuthAPIKey
|
||||
|
||||
|
||||
class APIKeyAuthentication(object):
|
||||
|
||||
def is_authenticated(self, request):
|
||||
|
||||
params = {}
|
||||
for key,value in request.GET.items():
|
||||
for key, value in request.GET.items():
|
||||
params[key.lower()] = value
|
||||
|
||||
if 'apikey' in params:
|
||||
@@ -24,4 +25,3 @@ class APIKeyAuthentication(object):
|
||||
|
||||
def challenge(self):
|
||||
return HttpResponseForbidden('Access Denied, use a API Key')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user