MCPcopy
hub / github.com/postmanlabs/httpbin / basic_auth

Function basic_auth

httpbin/core.py:459–465  ·  view source on GitHub ↗

Prompts the user for authorization using HTTP Basic Auth.

(user='user', passwd='passwd')

Source from the content-addressed store, hash-verified

457
458@app.route('/basic-auth/<user>/<passwd>')
459def basic_auth(user='user', passwd='passwd'):
460 """Prompts the user for authorization using HTTP Basic Auth."""
461
462 if not check_basic_auth(user, passwd):
463 return status_code(401)
464
465 return jsonify(authenticated=True, user=user)
466
467
468@app.route('/hidden-basic-auth/<user>/<passwd>')

Callers

nothing calls this directly

Calls 3

check_basic_authFunction · 0.85
status_codeFunction · 0.85
jsonifyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…