Simple HTTP auth (#372)

HTTP Basic Auth form validation
This commit is contained in:
dgtlmoon
2022-01-15 22:52:39 +01:00
committed by GitHub
parent e5fe095f16
commit a896493797
4 changed files with 69 additions and 2 deletions

View File

@@ -103,4 +103,14 @@ def live_server_setup(live_server):
print("\n>> Test notification endpoint was hit.\n")
return "Text was set"
# Just return the verb in the request
@live_server.app.route('/test-basicauth', methods=['GET'])
def test_basicauth_method():
from flask import request
auth = request.authorization
ret = " ".join([auth.username, auth.password, auth.type])
return ret
live_server.start()