Merge pull request #48 from mkomitee/master

401 is a more proper status_code for failed authentication
This commit is contained in:
Kenneth Reitz
2012-06-05 01:22:44 -07:00
+1 -1
View File
@@ -269,7 +269,7 @@ def digest_auth(qop=None, user='user', passwd='passwd'):
response.headers['WWW-Authenticate'] = auth.to_header()
return response
elif not check_digest_auth(user, passwd):
return status_code(403)
return status_code(401)
return jsonify(authenticated=True, user=user)