Commit ade0afac authored by David Mendez's avatar David Mendez
Browse files

Admin: add blueprint for admin login

parent 9c1a4055
......@@ -12,6 +12,7 @@ from import job_submission_service
from app.blueprints.swagger_description.swagger_description_blueprint import SWAGGER_BLUEPRINT
from app.blueprints.job_submission.controllers.job_submissions_controller import SUBMISSION_BLUEPRINT
from app.blueprints.job_status.job_status_controller import JOB_STATUS_BLUEPRINT
from app.blueprints.admin.controllers.authorisation_controller import ADMIN_AUTH_BLUEPRINT
def create_app():
......@@ -50,6 +51,7 @@ def create_app():
flask_app.register_blueprint(SWAGGER_BLUEPRINT, url_prefix=f'{base_path}/swagger')
flask_app.register_blueprint(SUBMISSION_BLUEPRINT, url_prefix=f'{base_path}/submit')
flask_app.register_blueprint(JOB_STATUS_BLUEPRINT, url_prefix=f'{base_path}/status')
flask_app.register_blueprint(ADMIN_AUTH_BLUEPRINT, url_prefix=f'{base_path}/admin')
return flask_app
Blueprint for authorisation endpoints for the administration of the system
from flask import Blueprint, jsonify
ADMIN_AUTH_BLUEPRINT = Blueprint('admin_auth', __name__)
@ADMIN_AUTH_BLUEPRINT.route('/login', methods = ['GET'])
def login():
print('LOGGING IN!')
return jsonify({'token': 'kkk'})
\ No newline at end of file
......@@ -184,7 +184,7 @@ paths:
- 'Admin'
summary: 'Allow to login to the administration of the system.'
summary: 'Allows to login to the administration of the system.'
description: 'If the correct password is given, it will return a token that is valid for 1 hour'
operationId: 'admin_login'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment