diff --git a/api/auth.py b/api/auth.py index 1143fe6..445e488 100644 --- a/api/auth.py +++ b/api/auth.py @@ -6,10 +6,13 @@ class APIKeyAuthentication(object): def is_authenticated(self, request): - apikey = request.GET.get('apikey', None) - if apikey: + params = {} + for key,value in request.GET.items(): + params[key.lower()] = value + + if params['apikey']: try: - keyobj = AuthAPIKey.objects.get(key=apikey) + keyobj = AuthAPIKey.objects.get(key=params['apikey']) except: keyobj = None diff --git a/api/handlers.py b/api/handlers.py index cfa7ac8..158163c 100755 --- a/api/handlers.py +++ b/api/handlers.py @@ -107,8 +107,8 @@ class EveAPIProxyHandler(BaseHandler): for key,value in request.GET.items(): params[key.lower()] = value - if request.GET.get('userid', None): - obj = get_object_or_404(EVEAccount, pk=request.GET.get('userid', None)) + if 'userid' in params: + obj = get_object_or_404(EVEAccount, pk=params['userid']) params['apikey'] = obj.api_key print params