Fix the authentication handler to actually work

This commit is contained in:
2011-01-10 10:01:47 +00:00
parent a89de619ee
commit 4b8595eb52

View File

@@ -15,12 +15,18 @@ class V2AuthenticationHandler(BaseHandler):
allowed_methods = ('GET') allowed_methods = ('GET')
def read(self, request, username, password): def read(self, request):
""" """
Validates login details for the provided user as Validates login details for the provided user as
long as 'username' and 'password' are provided. long as 'username' and 'password' are provided.
""" """
username = request.GET.get('username', None)
password = request.GET.get('password', None)
if not username or not password:
return rc.BAD_REQUEST
try: try:
user = User.object.get(username=username) user = User.object.get(username=username)
except User.DoesNotExist: except User.DoesNotExist: