Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Examples/rest_endpoints/rest_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@
from main_app import app


def autologin_func():
"""
I strongly recommend in real scenario use something more secure than storing plain text
username and password in a workflow file.
:return: username and password
"""
return "testuser", "testuser"


def get_configurations():
"""
A simple example that connects to BAM and retrieves a list of configurations
Expand Down Expand Up @@ -81,22 +72,6 @@ def rest_put_test():
return jsonify({"result": request.get_json()["foo"] + " plus some extra"})


#
# Autologin Example
#
@route(app, "/rest_endpoints/list_configurations", methods=["GET", "POST"])
@util.autologin(autologin_func)
@util.rest_exception_catcher
def rest_test_autologin():
"""
Autologin

:return:
"""
# in this case it is always executed
return get_configurations()


#
# Example of an endpoint with no authentication required
#
Expand Down