change: remove inbuilt authentication

This commit is contained in:
2023-07-21 15:27:40 +02:00
parent f90bb56f1c
commit 32c8226fc0
2 changed files with 0 additions and 21 deletions

View File

@@ -5,7 +5,6 @@ import flask
import sys
import subprocess
import os
from functools import wraps
import datetime
import secrets
@@ -38,17 +37,6 @@ class DispatchObject(db.Model):
method = Column(String)
dispatch_secret = Column(String)
def login_required(f):
@wraps(f)
def decorated_function(*args, **kwargs):
auth = flask.request.authorization
print(auth.password)
print(type(auth.password))
if not auth or not auth.lower() == app.config["PASSWORD"]:
return (flask.jsonify({ 'message' : 'Authentication required' }), 401)
return f(*args, **kwargs)
return decorated_function
@app.route('/get-dispatch')
def get_dispatch():
@@ -104,7 +92,6 @@ def confirm_dispatch():
@app.route('/smart-send', methods=["POST"])
@login_required
def smart_send_to_clients():
'''Send to clients based on querying the LDAP
requests MAY include: