INNER CODE UNIT · Python

login_endpoint

fescobar/allure-docker-service · allure-docker-api/app.py:551

def login_endpoint():
    try:
        if ENABLE_SECURITY_LOGIN is False:
            body = {
                'meta_data': {
                    'message' : 'SECURITY is not enabled'
                }
            }
            resp = jsonify(body)
            return resp, 404

        content_type = str(request.content_type)
        if content_type is None and content_type.startswith('application/json') is False:
            raise Exception("Header 'Content-Type' must be 'application/json'")

        if not request.is_json:
            raise Exception("Missing JSON in body request")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…