🐛 Fix login via Authorization header
This commit is contained in:
1 parent
1d2ceefb72
commit
547962f4bc
1 file changed
+5
-1
@@ -50,7 +50,11 @@ def loginFromAuthorizationHeaderRequestHandler():
|
||||
"""
|
||||
``before_request`` handler for creating login sessions based on the Authorization header.
|
||||
"""
|
||||
loginUserFromApiKey()
|
||||
try:
|
||||
if loginUserFromAuthorizationHeader():
|
||||
_flask.g.login_via_header = True
|
||||
except InvalidApiKeyException:
|
||||
return _flask.make_response("Invalid API key", 403)
|
||||
|
||||
|
||||
class InvalidApiKeyException(Exception): pass
|
||||
|
||||
Reference in new issue
Block a user