hurl/integration/tests_ok/basic_authentication_per_request.py

10 lines
299 B
Python
Raw Normal View History

from app import app
2020-11-10 09:35:27 +03:00
from flask import request
@app.route("/basic-authentication-per-request")
def basic_authentication_per_request():
print(request.headers["Authorization"])
assert request.headers["Authorization"] == "Basic Ym9iQGVtYWlsLmNvbTpzZWNyZXQ="
return "You are authenticated"