From 35bc38608739891d7695bf1cb2490a5189888304 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Thu, 1 Aug 2019 11:59:27 +0200 Subject: [PATCH] clean up response handling in vault --- accounts/accounts/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accounts/accounts/api.py b/accounts/accounts/api.py index 8fba6ae..aad2ab4 100644 --- a/accounts/accounts/api.py +++ b/accounts/accounts/api.py @@ -83,6 +83,9 @@ def post_login(): @json_error def get_login(): auth_cookie = request.cookies.get(COOKIE_KEY) + if not auth_cookie: + return jsonify({"error": "no auth cookie in request", "status": 401}), 401 + public_keys = app.config["JWT_PUBLIC_KEYS"] token = None