mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
Use jsonify for digest_auth() and hidden_basic_auth() too
This commit is contained in:
+2
-2
@@ -215,7 +215,7 @@ def hidden_basic_auth(user='user', passwd='passwd'):
|
||||
|
||||
if not check_basic_auth(user, passwd):
|
||||
return status_code(404)
|
||||
return dict(authenticated=True, user=user)
|
||||
return jsonify(authenticated=True, user=user)
|
||||
|
||||
|
||||
@app.route('/digest-auth/<qop>/<user>/<passwd>')
|
||||
@@ -239,7 +239,7 @@ def digest_auth(qop=None, user='user', passwd='passwd'):
|
||||
return response
|
||||
elif not check_digest_auth(user, passwd):
|
||||
return status_code(403)
|
||||
return dict(authenticated=True, user=user)
|
||||
return jsonify(authenticated=True, user=user)
|
||||
|
||||
|
||||
@app.route('/base64/<value>')
|
||||
|
||||
Reference in New Issue
Block a user