mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
Merge pull request #48 from mkomitee/master
401 is a more proper status_code for failed authentication
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user