mirror of
https://github.com/KevinMidboe/Node-Com-Handler.git
synced 2025-10-29 17:50:27 +00:00
Fixed authentication required
This commit is contained in:
Binary file not shown.
18
v1/app.py
18
v1/app.py
@@ -23,15 +23,15 @@ users = {
|
||||
}
|
||||
|
||||
# Flask function for checking password sent with http request
|
||||
@auth.verify_password
|
||||
def verify_password(email, password):
|
||||
return verifyHash(password)
|
||||
# @auth.verify_password
|
||||
# def verify_password(email, password):
|
||||
# return verifyHash(password)
|
||||
|
||||
# Costum function for hashing and verifying the sent password.
|
||||
# TODO Read if ok to send in cleartext like this if use https
|
||||
def verifyHash(pw):
|
||||
pw_hash = generate_password_hash(pw)
|
||||
return check_password_hash(pw_hash, pw)
|
||||
# # Costum function for hashing and verifying the sent password.
|
||||
# # TODO Read if ok to send in cleartext like this if use https
|
||||
# def verifyHash(pw):
|
||||
# pw_hash = generate_password_hash(pw)
|
||||
# return check_password_hash(pw_hash, pw)
|
||||
|
||||
# Flask function for getting password matching username sent by http request
|
||||
@auth.get_password
|
||||
@@ -101,4 +101,4 @@ def get_uptimesLoad():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0',port=63580,debug=True)
|
||||
app.run(host='0.0.0.0', port=63588)
|
||||
|
||||
Reference in New Issue
Block a user