mirror of
https://github.com/FAUSheppy/atlantis-event-dispatcher
synced 2025-12-06 06:21:36 +01:00
change: remove inbuilt authentication
This commit is contained in:
13
interface.py
13
interface.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user